Bug 45717 - [Readme] Can no longer use "version" property
Summary: [Readme] Can no longer use "version" property
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC4   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
Depends on:
Blocks:
 
Reported: 2003-10-29 05:13 EST by Dani Megert CLA
Modified: 2004-08-05 11:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2003-10-29 05:13:53 EST
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
Comment 1 Darin Swanson CLA 2003-10-29 17:19:30 EST
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.
Comment 2 Dani Megert CLA 2003-10-30 03:07:03 EST
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?
Comment 3 Darin Swanson CLA 2003-10-30 11:09:10 EST
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?
Comment 4 Dani Megert CLA 2003-10-31 10:50:56 EST
Note: I now switched to use J9 which does not show this problem. 2.4.1 sounds
like a version number of Xalan.
Comment 5 Dani Megert CLA 2003-11-06 09:26:33 EST
André just had the same problem. It is Xalan who sets two system properties
which then break the stuff.
Comment 6 Darin Swanson CLA 2003-11-13 02:52:55 EST
Until Xalan changes, there is not much we can do except possibly a readme 
notation?
Comment 7 Dani Megert CLA 2003-11-13 05:34:08 EST
If it cannot be fixed then it should be in the readme. I added the keyword.
Comment 8 Darin Swanson CLA 2004-06-21 19:12:04 EDT
Added to the Ant readme section.
Comment 9 Darin Swanson CLA 2004-06-21 19:12:19 EDT
Please verify DarinW.
Comment 10 Darin Wright CLA 2004-08-05 11:17:34 EDT
Verified.