Community
Participate
Working Groups
I20031023 All our export scripts produce wrong results because the property named "version" can no longer be set. It seems that ant support reads in some stuff which sets the version property (to "2.4.1"). I run the script in debug+verbose mode but unfortunately it only shows that it cannot set the version - it does not show who sets it before me. Here's the output: Apache Ant version 1.5.4 compiled on August 12 2003 Apache Ant version 1.5.4 compiled on August 12 2003 Buildfile: c:\eclipse\workspaces\Development_2_2\plugins\org.eclipse.compare\scripts\exportplugin.xml +User task: pde.convertSchemaToHTML org.eclipse.pde.ant.ConvertSchemaToHTML +User task: eclipse.checkDebugAttributes org.eclipse.jdt.core.CheckDebugAttributes +User task: eclipse.fetch org.eclipse.pde.internal.build.tasks.FetchTask +User task: eclipse.buildScript org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTask +User task: eclipse.buildManifest org.eclipse.pde.internal.build.tasks.BuildManifestTask +User task: eclipse.assembler org.eclipse.pde.internal.build.tasks.AssemblerTask +User task: eclipse.idReplacer org.eclipse.pde.internal.build.tasks.IdReplaceTask +User task: eclipse.unzipperBuilder org.eclipse.pde.internal.build.tasks.UnzipperGeneratorTask +User task: eclipse.fetchFilesGenerator org.eclipse.pde.internal.build.tasks.FetchFileGeneratorTask +User task: eclipse.convertPath org.eclipse.core.resources.ant.ConvertPath +User task: eclipse.incrementalBuild org.eclipse.core.resources.ant.IncrementalBuild +User task: eclipse.refreshLocal org.eclipse.core.resources.ant.RefreshLocalTask parsing buildfile c:\eclipse\workspaces\Development_2_2\plugins\org.eclipse.compare\scripts\exportplugin.xml with URI = file:c:/eclipse/workspaces/Development_2_2/plugins/org.eclipse.compare/scripts/exportplugin.xml Setting ro project property: ant.project.name -> org.eclipse.compare Adding reference: org.eclipse.compare -> org.apache.tools.ant.Project@a2fa71 Project base dir set to: C:\eclipse\workspaces\Development_2_2\plugins\org.eclipse.compare +Target: init +Task: tstamp +Task: property +Task: property +Task: property +Task: property +Target: build +Task: eclipse.incrementalBuild +Target: export +Task: mkdir +Task: delete +Task: mkdir +Task: jar +Task: copy +Task: copy +Task: copy +Task: zip Arguments: -verbose -debug -Dorg.eclipse.ant.ui.ATTR_ANT_PROCESS_ID=1067421017146 Build sequence for target `export' is [init, build, export] Complete build sequence is [init, build, export] init: Adding reference: eclipse.progress.monitor -> org.eclipse.core.runtime.SubProgressMonitor@17fff3f Setting project property: DSTAMP -> 20031029 Setting project property: TSTAMP -> 1050 Setting project property: TODAY -> October 29 2003 Adding reference: eclipse.progress.monitor -> org.eclipse.core.runtime.SubProgressMonitor@1c35b6c Setting project property: destdir -> ../../plugin-export Adding reference: eclipse.progress.monitor -> org.eclipse.core.runtime.SubProgressMonitor@6dda07 Setting project property: plugin -> org.eclipse.compare Adding reference: eclipse.progress.monitor -> org.eclipse.core.runtime.SubProgressMonitor@531ff Override ignored for property version
Someone is setting a system property named "version" with the value "2.4.1" It is not the Ant integration. I have not tracked done who/what is setting it. The workaround is to explictly set a property version: either using the version tab of the Ant launch configuration or specifying using -D as a argument on the main tab.
I did not include any other script and expect mine to be executed as it would be when running the ant script outside Eclipse. I assume this comes from some offered Eclipse ant tasks which predefine the property "version" (which is a bad idea, they should do it like ant does i.e. use <component>.version like ant.version). The workaround is not handy since either all of us have to fix their scripts or change how we launch the export scripts. I used -debug and -verbose and could not get a log which shows me who sets the version (is getting a full log also not under your control)? Isn't the ant task who probably sets the version property an optional task? If so, isn't it an ant support bug if any optional task that I did not even choose to run/use affects my ant script? How can I write a valid ant script then at all? Do I have to try out until I find a set of still unused properties?
It is nothing to do with Ant that is setting the property. That is why no debug or verbose is showing anything. Someone (likely a plugin?) is setting a System property (java.lang.System). When the Ant build occurs in the same VM as Eclipse, it sets all System properties to be Ant properties. Again, nothing from an Ant task etc. I will try to track down what is setting the System property and I agree that it is really bad form that they are not setting a fully qualified property name. When did this problem start?
Note: I now switched to use J9 which does not show this problem. 2.4.1 sounds like a version number of Xalan.
André just had the same problem. It is Xalan who sets two system properties which then break the stuff.
Until Xalan changes, there is not much we can do except possibly a readme notation?
If it cannot be fixed then it should be in the readme. I added the keyword.
Added to the Ant readme section.
Please verify DarinW.
Verified.