Re: Subversion revision integration

From: Chuck Hill (chil..lobal-village.net)
Date: Thu Jun 28 2007 - 11:31:39 EDT

  • Next message: Gary Hunt: "Re: WOSMTPHost not being read in Properties file? [SOLVED]"

    On Jun 28, 2007, at 4:43 AM, Ken Anderson wrote:

    > Chuck,
    >
    > Thanks much. This is very helpful. Unfortunately, I'm having
    > trouble getting SVNAnt to load - I get the following error:
    >
    > /Users/kanderson/.../WebObjects/CTMaint/build.xml:107: taskdef A
    > class needed by class org.tigris.subversion.svnant.SvnTask cannot
    > be found: org/apache/tools/ant/Task
    >
    > I would think that the ant jars are already loaded...shouldn't they
    > be?

    I'd think so. I have seen this sort of error many times, but I don't
    recall ever seeing it for a core Ant class! Where do you have the
    SVNAnt jar(s)? Is there something in /Library/Java/Extensions that
    might be affecting this?

    > I've tried many permutations of setting up the classpath.
    > Obviously, it's finding the SvnTask fine, just not dependencies. I
    > tried what you have below for the typedef, as well as what the
    > current SVNAnt doc says:
    >
    >
    > <taskdef resource="svntask.properties"
    > classpath="project.classpath"/>
    >
    > This actually doesn't work out of the box, I changed it to point
    > to /Library/Java/Extensions instead.

    What do you have in there?

    > What's the right way to setup the classpath so that it finds the
    > apache jars?

    The Ant jars are the one thing I have never hard a problem with. At
    least not that I can recall on half a cup of coffee.

    Chuck

    >
    > On Jun 27, 2007, at 6:31 PM, Chuck Hill wrote:
    >
    >> 1.
    >> <!-- SVNAnt for access to Subversion -->
    >> <typedef resource="org/tigris/subversion/svnant/
    >> svnantlib.xml">
    >> <classpath>
    >> <fileset dir= "${your.path.to.jars}" >
    >> <include name= "*.jar" />
    >> </fileset>
    >> </classpath>
    >> </typedef>
    >>
    >>
    >> 2.
    >> <!-- Query Subversion for meta-information (e.g. revision #) -->
    >> <target name="query.svn" depends="setProps"
    >> unless="eclipse.running">
    >> <svn>
    >> <wcVersion path=".." prefix="svn." />
    >> </svn>
    >> </target>
    >>
    >>
    >> 3.
    >> <!-- This is not set in Eclipse builds to speed things up
    >> so we
    >> create a default value here indicating
    >> this. -->
    >> <property name="svn.committed.max" value="unknown eclipse
    >> build" />
    >>
    >>
    >> 4. Note the funny indentation to keep the Properties file contents
    >> clean and aligned?
    >>
    >> <!-- Add the revision number, date, and time to the
    >> Properties file -->
    >> <concat destfile="${java.properties.file}" append="true">
    >> build.version=${svn.committed.max}
    >> build.date=${DSTAMP}
    >> build.time=${TSTAMP}
    >> </concat>
    >>
    >> On Jun 27, 2007, at 3:22 PM, Ken Anderson wrote:
    >>
    >>> Does anyone on the list have a handy way to integrate the
    >>> subversion revision number into a build? I would think/assume
    >>> that it could be integrated into ANT somehow, creating a resource
    >>> file that could be read by the built app. Anyone have something
    >>> like this?
    >>>
    >>> Thanks,
    >>> Ken
    >>>
    >>>
    >>
    >> --
    >>
    >> Practical WebObjects - for developers who want to increase their
    >> overall knowledge of WebObjects or who are trying to solve
    >> specific problems.
    >> http://www.global-village.net/products/practical_webobjects
    >>
    >>
    >>
    >>
    >>
    >

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Thu Jun 28 2007 - 11:32:51 EDT