Re: Enhydra 5.1 always recompiling dods

"Sinisa Milosevic" <[email protected]> Tue, 6 Jan 2004 10:47:52 +0100
Newsgroups gmane.comp.java.enhydra.general
Message-ID <[email protected]>
Hi,

It seems that was a bug in DODS. If you use '.' in directory name (in your case '/Projects/PapillonEnh5.1/classes), DODS doesn't calculate correctly if the doml file is changed or not. If you don't use '.' in directory names and use force="false" parameter everything works fine.

Next patch will solve this problem:

//org.enhydra.ant.taskdefs.DomlValidateTask.java; line 123

-  doml.indexOf(".")) + ".uptodate";
+ doml.lastIndexOf(".")) + ".uptodate";

Sinisa Milosevic

  ----- Original Message ----- 
  From: Mathieu MANGEOT-NAGATA 
  To: [email protected] 
  Cc: Sinisa Milosevic ; Petr Stehlik 
  Sent: Monday, January 05, 2004 3:06 PM
  Subject: Re: Enhydra: Enhydra 5.1 always recompiling dods


  Hello Sinisa, Petr,

  I am compiling my project with enhydra5.1 that I compiled before with enhydra5.0 and
  I have the same problem as Petr: when I execute ant make, ant executes everytime the dods task and regenerates every time the dods java classes. (I have no pb with the XMLC task by the way).

  I added the force="false" attribute on the dods and XMLC tasks as you indicated in my build.xml file but in my case it did not change anything. Could you please send me any build.xml file that is OK?

  Here is the output of the compiler when I relaunch ant without touching anything:
  dods:
  [dods] Buildfile: /Library/Java/Extensions/enhydra5.1/dods/build/generate.xml
  [dods] dods:copy_doml:
  [dods] dods:create_tables_file:
  [dods] Regenerating DODS files from /Projects/PapillonEnh5.1/papillon.doml... 
  [dods] dods:build_java:
  [dods] [ejen] Creating '/Projects/PapillonEnh5.1/classes/DODS_Generated_Source/main/data/build_java.xml'
  [dods] [ejen] Creating '/Projects/PapillonEnh5.1/classes/DODS_Generated_Source/main/data/build_sql.xml'
  [dods] dods:build_dods:
  [dods] [ejen] Creating '/Projects/PapillonEnh5.1/classes/DODS_Generated_Source/main/data/build_dods.xml'
  [dods] [copy] Copying 1 file to /Projects/PapillonEnh5.1/classes/DODS_Generated_Source/main/data
  [dods] dods:java:
  [dods] validate:
  [dods] [xmlvalidate] 1 file(s) have been successfully validated.
  [dods] dods:
  [dods] Regenerating DODS files from /Projects/PapillonEnh5.1/classes/DODS_Generated_Source/main/data/papillon.doml... 
  [dods] [DODS_XMLBuilder] Creating TransientXML
  [dods] [DODS_XMLBuilder] Creating /Projects/PapillonEnh5.1/classes/DODS_Generated_Source/main/data/main/data/VolumeEntry.xml


  I send here attached my build.xml file if you want to have a look.

  Thank you for your help!

  Mathieu



------------------------------------------------------------------------------



  On 23 déc. 03, at 20:25, Sinisa Milosevic wrote:

    Hi,
        If you don't want your source code to be compiled every time you run the project, please change your running target from Rebuild to Make.
      Steps for changing running target:
            1. Go to "Project" submenu (of JBuilder's main many) and chose "Project Properties.." option,
            2. Chose "Run" tab, chose your "Runtime configuration" (probably the only one suggested) and click on "Edit" button,
            3. Change "Build target" combo option from Rebuild to Make and close two opened dialogs by pressing "OK" button.
    This should make you source code (java files placed in src folder) compiled only if it's changed (Make target should not delete classes directory on it's execution like Rebuild target).
    ------------------------------------------------------------------------------------------
    Initially, XMLC is set to process input pages every time also.
    To change this, please edit projects build.xml file.

    Operation is rather simple:
            Just comment
                <delete dir="${basedir}/xmlc_for_compile"/>
            command placed (hopefully) at the end of target named "makexmlc". 

    Now, XMLC will process only the pages, which source is changed, and everything else will remain as is.
    ----------------------------------------------------------------------------------------------
    Also, initially, DODS is set to generate source code every time.
    To change this, you'll have to edit projects build.xml file (again).
           
     Just change initial setting of dods attribute  'force' to "false".(placed in dods task, which is called in target named "dods" - as a default, this attribute is set to "true").
     Now, only if you change *.doml file new source code will be generated.
        Sinisa Milosevic,

        Together Serbia
    On Mon, 2003-12-22 at 15:52, Petr Stehlik wrote:
    Hi,

    JBuilder9 keeps recompiling the whole project even if there is no change
    in source files - whenever I click on 'Run' it starts with XMLC and then
    the whole java source files set.

    Any idea how to fix this?
    Petr


  Mathieu MANGEOT-NAGATA
  Visiting Researcher National Institute of Informatics
  Hitotsubashi 2-1-2-1913 Chiyoda-ku Tokyo 101-8430 Japan
  Tel: +81-3-4212-2672 Fax: +81-3-3556-1916
  http://www-clips.imag.fr/geta/mathieu.mangeot
  Papillon project: http://www.papillon-dictionary.org