Hi,

this week-end I have created a set of poms to describe all our jars.

I wanted to bring the exercise to the point where one can actually build the 
ant jars with maven.

And I did it.

I found some oddities in the process which I corrected :

ant-launcher was depending upon o.a.t.a.MagicNames.java. I changed that to make 
it the other way around. Just a story of static string definition called 
ANTHOME_PROPERTY in Launcher.java and ANT_HOME in MagicNames.

ant.jar was pulling in some classes which were dependent upon optional classes 
or even in one case directly upon library dependencies (JDepend.jar I think). I 
fixed that in the build file.

So I have changed the exact classes which get into ant.jar, ant-nodeps.jar, 
ant-junit.jar, ant-trax.jar, ant-apache-bsf.jar. Xalan2Executor (dead wood now) 
which I moved from ant-trax.jar to ant-junit.jar. The old ScriptRunner under 
org/apache/tools/ant/util/ was moved from ant.jar to ant-apache-bsf.jar.

I did some technical build changes too. defaultManifest.mf and version.txt now 
are processed in the build using <expandproperties/> and not any more using 
tokens. The reason for doing this is that Maven can do something similar to 
<expandproperties/> but I am not sure how Maven supports @[EMAIL PROTECTED] 

What I did not manage to do was to run our tests successfully (or with the same 
level of success as with ant) from Maven. There might be a number of reasons to 
that. The main one is that the maven-surefire-plugin (equivalent of our 
<junit/> task sets a system property called ... basedir which is the directory 
containing the pom file. Does not work too good with our BuildFileTests. I did 
not even try the antunit tests, I have no clue how I would run them (maybe 
using the antrun plugin).

I will create a JIRA issue asking our colleagues to make the basedir system 
property optionally omitted.

If someone wants to see how this maven build goes, the way to do it is

cd src/etc/poms
mvn package

you will need to disable the tests to be successful. A good way to disable the 
test is to put the testSourceDirectory in the nirvana in the pom file. Actually 
right now it is wrong in all the poms except in src/etc/poms/ant/pom.xml (the 
one which builds ant.jar).

Also, I changed the build.xml to be able to deliver the poms to the 
java-repository parallel to the jars. The build will also deliver the POM for 
the artifact ant-parent which is the top level POM.

Regards,

Antoine



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to