#24 Make ANT friendlier

release_2.1
closed
None
5
2012-10-10
2002-01-29
Oliver Burn
No
  • Don't name your JAR files with the version number on the filename. The
    distribution already identifies the version number, and its much easier to
    drop in a new version of a dependency when all you have to do is switch the
    directory name and not also the JAR file names. I use a method of
    indirection using Ant properties to switch library versions, and having JAR
    files named with the version number wreak havoc on it.

  • Include a properties file in your JAR that has this line:
    checkstyle=com.puppycrawl.tools.checkstyle.CheckStyleTask
    This allows folks to integrate Checkstyle without having to know the
    classname by doing this:
    <taskdef resource="anttasks.properties" classpath="checkstyle-1.4.jar"/>

Discussion

  • dion gillard

    dion gillard - 2002-02-07

    Logged In: YES
    user_id=36058

    I'd much rather have the version number in the jar file.

    We use a properties file and specifyin that

    checkstyle.jar=/usr/java/checkstyle-2.0/checkstyle-2.0.jar

    and use ${checkstyle.jar} in the ant build file.

     
  • Oliver Burn

    Oliver Burn - 2002-02-09

    Logged In: YES
    user_id=218824

    I will continue to have the version number in the JAR name.

    You can now do a taskdef as:

        &lt;taskdef resource=&quot;anttasks.properties&quot;&gt;
            &lt;classpath refid=&quot;run.classpath&quot;/&gt;
        &lt;/taskdef&gt;
    
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks