I've created a new task which will generate a libraries.ent file based on the components contained in the graph which includes the correct version numbers in the classpath.
A new target has been created in the secondary-dependency-test.xml file to support this.
<target name="generate-lib-file" depends="synchronize">
| <gen-lib-file filename="versionedLibraries.ent" path="../tools/etc/buildmagic/" />
| </target>
The target accepts 2 attributes, file name, and the path to where the file should be written. If these are not included, a default filename and path are used.
The general premise is that for each component in the graph which the visitor encounters the following will be written to the file:
1) An identifier comment
2) A root property name
3) A library property name (now with version number included in the path)
4) A list of path elements (the jar files)
The values used are currently (this may need to be adjusted) based off of the component id as shown below for component "antlr".
<!-- antlr -->
| <property name="antlr.antlr.root" value="${project.thirdparty}/antlr"/>
| <property name="antlr.antlr.lib" value="${antlr.antlr.root}/2.7.5H3/lib/"
| <path id="antlr.antlr.classpath">
| <pathelement path="${antlr.antlr.lib}/antlr.jar"/>
| </path>
For some entries in the existing libraries.ent file, various naming schemes were used for the property name. Finding a common method to faithfully reproduce them programatically may be troublesome, but I think we can get close.
To see this in action execute the following commands:
mkdir test
cd test
cvs checkout jbossas
cvs checkout tools
cd jbossas
ant -f secondary-dependency-test.xml generate-lib-file
cd ../tools/etc/buildmagic
emacs versionedLibraries.ent
Ruel Loehr
JBoss QA
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882195#3882195
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882195
|