[kepler-dev] Re: Missing and duplicate jars in kepler

Matt Jones jones at nceas.ucsb.edu
Mon Mar 15 11:58:00 PST 2004


David,

The only reason the classpath is constructed that way is that we started 
using Ant and early versions didn't have support for filesets, etc. 
Kepler's build was copied from an older build file I had, and wasn't 
updated for the newer Ant features.  I think your proposals are good 
ones, and agree we should update the build file as you described.

I'd also like to note that the current build does not build some of the 
Ptolemy tree because of missing build dependencies (e.g., Java3D).  I 
recognized this when I first made the build file, but skipped them just 
to get the core stuff building.  We should revisit the build and create 
some dependency checks that allow people to build the whole Ptolemy tree 
if they have the required prerequisites.

Also, for those of you who might wonder why we are using Ant in the 
first place (given that Ptolemy has an extensive Makefile), it was 
because the make system is so much slower at java compilation (the stock 
makefile from ptolemy takes more than 10 minutes to compile from scratch 
while the ant build does it in 20 seconds).  But there are still many 
features of the Ptolemy makefile build that we have not implemented in 
the Kepler build, so the build.xml file is ripe for revision/extension.

Matt

David Buttler wrote:

> A second question I have regarding the JAR files and the build.xml file:
> 
> Currently the classpath is constructed as a long string of variables, 
> with a platform-defined separator variable.  Is there any reason why 
> this approach was taken as opposed to the ANT idiom of **/*.jar?  This 
> would allow ANT to deal with cross-platform issues in specifying the 
> classpath rather than encoding this into the build file, which would 
> allow a much more concise and understandable build file. [I have quoted 
> an example from the ANT manual at the bottom]
> 
> Dave
> 
> David Buttler wrote:
> 
>> I was trying to understand the build path in the ANT file, and I ran 
>> across the following strangeness:
>>
>> Missing JARs
>> ------------------
>> <property name="monarchjar" value="${fulllibdir}/jar/monarch.jar"/>
>> ${fulllibdir}/jar/monarch.jar
>>    <property name="ptolemy-jar" value="${ptolemydir}/lib/ptolemy.jar"/>
>>    <property name="ptolemyjar" value="${ptolemydir}"/>
>> [${ptolemydir}/lib/ptolemy.jar  does not exist, but  
>> ${ptolemydir}/ptolemy/ptolemy.jar does]
>> ${ptolemydir}  [exists in ${ptolemydir}/ptolemy/ptolemy.jar]
>>
>> ${seekwsdir}seekWebService.jar
>> [I didn't see a JAR in this directory]
>>
>> duplicate jars
>> ------------------
>> ${fulllibdir}/jar/log4j-1.2.7 with ${fulllibdir}/jar/soap/log4j-1.2.4
>>
>> It seems that at least one of these jars is redundant and should be 
>> removed
>>
>>
> 
> --------------------------
> ANT example:
> 
> In addition, DirSet 
> <http://ant.apache.org/manual/CoreTypes/dirset.html>s, FileSet 
> <http://ant.apache.org/manual/CoreTypes/fileset.html>s, and FileList 
> <http://ant.apache.org/manual/CoreTypes/filelist.html>s can be specified 
> via nested |<dirset>|, |<fileset>|, and |<filelist>| elements, 
> respectively. /Note/: The order in which the files building up a FileSet 
> are added to the path-like structure is not defined.
> 
>    <classpath>
>      <pathelement path="${classpath}"/>
>      <fileset dir="lib">
>        <include name="**/*.jar"/>
>      </fileset>
>      <pathelement location="classes"/>
>      <dirset dir="${build.dir}">
>        <include name="apps/**/classes"/>
>        <exclude name="apps/**/*Test*"/>
>      </dirset>
>      <filelist refid="third-party_jars"/>
>    </classpath>
> 
> This builds a path that holds the value of |${classpath}|, followed by 
> all jar files in the |lib| directory, the |classes| directory, all 
> directories named |classes| under the |apps| subdirectory of 
> |${build.dir}|, except those that have the text |Test| in their name, 
> and the files specified in the referenced FileList.
> 
> 
> _______________________________________________
> kepler-dev mailing list
> kepler-dev at ecoinformatics.org
> http://www.ecoinformatics.org/mailman/listinfo/kepler-dev





More information about the Kepler-dev mailing list