Lukas,
Thanks for replying. I've attached the whole maven.xml. We also have
separate maven.xml for each of subprojects.
Also, the problem with your suggestion is that if I add
<maven:addPath id="maven.test.compile.src.set"
refid="your_test_sources"/>
it'll fail with the same error as it requires maven.test.compile.src.set
to be already present. Do I need to declare an empty
maven.test.compile.src.set set somehow?
Alexey Yudichev.
-----Original Message-----
From: Lukas Theussl [mailto:[EMAIL PROTECTED]
Sent: 31 July 2008 17:51
To: Maven Users List
Subject: Re: maven-test-plugin-1.8.2/plugin.jelly:46:72:
<maven:addPath>: cannot find the path to add to specified by 'id':
maven.test.compile.src.set
You are using a custom goal in maven.xml, so we'd need to see what's in
there to be able to help you. The maven.test.compile.src.set property
[1] holds the directory of test sources so you probably need something
like
<maven:addPath id="maven.test.compile.src.set"
refid="your_test_sources"/>
HTH,
-Lukas
[1] http://maven.apache.org/maven-1.x/plugins/test/properties.html
[EMAIL PROTECTED] wrote:
> I am getting the following internal exception in maven test plugin
1.8.2
> working inside maven 1.1. Where is this property
> (maven.test.compile.src.set) supposed to be set initially?
>
>
>
> Errors stack :
>
>
>>>Unable to obtain goal [all:rebuildWithoutTest]
>
>
>>>File...... file:/C:/p4/tcw/TCW_S_Dev/fo_tcw_fip/TCW/maven.xml
>
>
>>>Element... m:reactor
>
>
>>>Line...... 24
>
>
>>>Column.... 45
>
>
>>>Unable to obtain goal [tcw:buildWithoutTest]
>
>
>>>cannot find the path to add to specified by 'id':
>
> maven.test.compile.src.set
>
>
>>>File......
>
> file:/c:/temp/.maven/cache/maven-test-plugin-1.8.2/plugin.jelly
>
>
>>>Element... maven:addPath
>
>
>>>Line...... 46
>
>
>>>Column.... 72
>
>
>
>
> Exception stack traces :
>
> org.apache.maven.werkz.UnattainableGoalException: Unable to obtain
goal
> [all:rebuildWithoutTest]
>
> at org.apache.maven.werkz.Goal.fire(Goal.java:698)
>
> at org.apache.maven.werkz.Goal.attain(Goal.java:623)
>
> at org.apache.maven.werkz.Goal.attainPrecursors(Goal.java:526)
>
> at org.apache.maven.werkz.Goal.attain(Goal.java:621)
>
> at
>
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:712
> )
>
> at
> org.apache.maven.MavenSession.attainGoals(MavenSession.java:265)
>
> at org.apache.maven.cli.App.doMain(App.java:307)
>
> at org.apache.maven.cli.App.main(App.java:217)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
>
> at com.werken.forehead.Forehead.run(Forehead.java:551)
>
> at com.werken.forehead.Forehead.main(Forehead.java:581)
>
> Caused by: org.apache.commons.jelly.JellyTagException:
> file:/C:/p4/tcw/TCW_S_Dev/fo_tcw_fip/TCW/maven.xml:24:45: <m:reactor>
> Reactor subproje
>
> ct failure occurred
>
> at
>
org.apache.maven.jelly.tags.maven.ReactorTag.doTag(ReactorTag.java:380)
>
> at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>
> at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.j
> ava:83)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAc
> tion(MavenGoalTag.java:116)
>
> at org.apache.maven.werkz.Goal.fire(Goal.java:691)
>
> at org.apache.maven.werkz.Goal.attain(Goal.java:623)
>
> at
> org.apache.maven.werkz.WerkzProject.attainGoal(WerkzProject.java:209)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGo
> alTag.java:115)
>
> at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>
> at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.j
> ava:83)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAc
> tion(MavenGoalTag.java:116)
>
> at org.apache.maven.werkz.Goal.fire(Goal.java:691)
>
> ... 13 more
>
> Caused by: org.apache.maven.werkz.UnattainableGoalException: Unable to
> obtain goal [tcw:buildWithoutTest]
>
> at org.apache.maven.werkz.Goal.fire(Goal.java:698)
>
> at org.apache.maven.werkz.Goal.attain(Goal.java:623)
>
> at
>
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:712
> )
>
> at
> org.apache.maven.MavenSession.attainGoals(MavenSession.java:265)
>
> at
>
org.apache.maven.jelly.tags.maven.ReactorTag.doTag(ReactorTag.java:370)
>
> ... 26 more
>
> Caused by: org.apache.commons.jelly.JellyTagException:
> file:/c:/temp/.maven/cache/maven-test-plugin-1.8.2/plugin.jelly:46:72:
> <maven:addPath>
>
> cannot find the path to add to specified by 'id':
> maven.test.compile.src.set
>
> at
> org.apache.maven.jelly.tags.maven.AddPathTag.doTag(AddPathTag.java:67)
>
> at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>
> at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.j
> ava:83)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAc
> tion(MavenGoalTag.java:116)
>
> at org.apache.maven.werkz.Goal.fire(Goal.java:691)
>
> at org.apache.maven.werkz.Goal.attain(Goal.java:623)
>
> at
> org.apache.maven.werkz.WerkzProject.attainGoal(WerkzProject.java:209)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGo
> alTag.java:115)
>
> at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>
> at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.j
> ava:83)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAc
> tion(MavenGoalTag.java:116)
>
> at org.apache.maven.werkz.Goal.fire(Goal.java:691)
>
> at org.apache.maven.werkz.Goal.attain(Goal.java:623)
>
> at
> org.apache.maven.werkz.WerkzProject.attainGoal(WerkzProject.java:209)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttainGo
> alTag.java:115)
>
> at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>
> at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.j
> ava:83)
>
> at
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAc
> tion(MavenGoalTag.java:116)
>
> at org.apache.maven.werkz.Goal.fire(Goal.java:691)
>
> ... 30 more
>
>
>
> Alexey Yudichev.
>
>
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged
or otherwise protected from disclosure. If you are not an intended
recipient of this e-mail, do not duplicate or redistribute it by any
means. Please delete it and any attachments and notify the sender that
you have received it in error. Unless specifically indicated, this
e-mail is not an offer to buy or sell or a solicitation to buy or sell
any securities, investment products or other financial product or
service, an official confirmation of any transaction, or an official
statement of Barclays. Any views or opinions presented are solely those
of the author and do not necessarily represent those of Barclays. This
e-mail is subject to terms available at the following link:
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent
to the foregoing. Barclays Capital is the investment banking division
of Barclays Bank PLC, a company registered in England (number 1026167)
with its registered off
ice at 1 Churchill Place, London, E14 5HP. This email may relate to or
be sent from other members of the Barclays Group.
> _______________________________________________
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_______________________________________________
This e-mail may contain information that is confidential, privileged or
otherwise protected from disclosure. If you are not an intended recipient of
this e-mail, do not duplicate or redistribute it by any means. Please delete it
and any attachments and notify the sender that you have received it in error.
Unless specifically indicated, this e-mail is not an offer to buy or sell or a
solicitation to buy or sell any securities, investment products or other
financial product or service, an official confirmation of any transaction, or
an official statement of Barclays. Any views or opinions presented are solely
those of the author and do not necessarily represent those of Barclays. This
e-mail is subject to terms available at the following link:
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the
foregoing. Barclays Capital is the investment banking division of Barclays
Bank PLC, a company registered in England (number 1026167) with its registered
office at 1 Churchill Place, London, E14 5HP. This email may relate to or be
sent from other members of the Barclays Group.
_______________________________________________
<project default="all:build"
xmlns:a="jelly:ant"
xmlns:m="jelly:maven"
xmlns:j="jelly:core"
xmlns:artifact="artifact"
xmlns:license="license"
xmlns:maven="jelly:maven"
xmlns:util="jelly:util"
xmlns:doc="doc">
<!--
=====================================
= all
= This is a pseudo-plugin for doing actions that apply to all the sub-project. In many cases this duplicates
= the functionality of the multiproject plugin, however all is quicker to type, and allows us to bundle up
= some other things as well
=====================================
-->
<goal name="all">
<m:reactor
basedir="${basedir}"
includes="Workflow-Common/project.xml,Workflow-Helper/project.xml,TradeModel/project.xml,jniloader/project.xml,Core/project.xml,TestMxData/project.xml,CashflowGenerator/project.xml,SnowcapVBBridge/project.xml,SummitSettlementFeed/project.xml,QAWrapper2/project.xml,Workflow/project.xml,Swapswire/project.xml,SwapswireTests/project.xml,SwapswireManager/project.xml,ChannelFramework/project.xml,IntegrationTests/project.xml,Options/project.xml,PrimeBrokerage/project.xml,Reports/project.xml,Workflow-BarxFeed/project.xml,Workflow-Delegate/project.xml,Workflow-WSDL/project.xml,Workflow-WebService/project.xml"
goals="${maven.all.goals}"/>
</goal>
<goal name="workflow">
<j:choose>
<j:when test="${rebuild}">
<j:set var="workflow.goal">tcw:rebuildWithoutTest</j:set>
</j:when>
<j:otherwise>
<j:set var="workflow.goal">tcw:buildWithoutTest</j:set>
</j:otherwise>
</j:choose>
<m:reactor
basedir="${basedir}"
includes="Workflow-Common/project.xml,Workflow-Helper/project.xml,TradeModel/project.xml,Core/project.xml,Workflow-WSDL/project.xml,Workflow/project.xml,Options/project.xml,Workflow-WebService/project.xml"
goals="${workflow.goal}"
ignoreFailures="false"/>
</goal>
<goal name="delegate">
<j:choose>
<j:when test="${rebuild}">
<j:set var="delegate.goal">tcw:rebuildWithoutTest</j:set>
</j:when>
<j:otherwise>
<j:set var="delegate.goal">tcw:buildWithoutTest</j:set>
</j:otherwise>
</j:choose>
<m:reactor
basedir="${basedir}"
includes="Workflow-Common/project.xml,Workflow-WSDL/project.xml,Workflow-Delegate/project.xml"
goals="${delegate.goal}"
ignoreFailures="false"/>
<j:if test="${deploy}">
<attainGoal name="tcw:clientdeploy"/>
</j:if>
</goal>
<goal name="generateconfigscript">
<echo>Generating TCWConfigUpdate.txt...</echo>
<filter token="config.dir" value="${basedir}\TMSConfigFiles"/>
<delete file="${basedir}/TMSConfigFiles/TCWConfigUpdate.txt"/>
<copy file="${basedir}/TMSConfigFiles/TCWConfigUpdate-template.txt" tofile="${basedir}/TMSConfigFiles/TCWConfigUpdate.txt" filtering="true"/>
</goal>
<goal name="all:eclipse">
<echo>################################################</echo>
<echo>all:eclipse</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">eclipse</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:clean">
<echo>################################################</echo>
<echo>all:clean</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">clean:clean</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:build">
<echo>################################################</echo>
<echo>all:build</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">tcw:build</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:rebuild">
<echo>################################################</echo>
<echo>all:rebuild</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">tcw:rebuild</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:release">
<echo>################################################</echo>
<echo>all:release</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">tcw:release</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:compile">
<echo>################################################</echo>
<echo>all:compile</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">tcw:compile</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:test">
<echo>################################################</echo>
<echo>all:test</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">test:test</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:rebuildWithoutTest" prereqs="all:clean">
<echo>################################################</echo>
<echo>all:rebuildWithoutTest</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">tcw:buildWithoutTest</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:buildWithoutTest">
<echo>################################################</echo>
<echo>all:buildWithoutTest</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">tcw:buildWithoutTest</j:set>
<attainGoal name="all"/>
</goal>
<goal name="all:deploy">
<echo>################################################</echo>
<echo>all:deploy</echo>
<echo>################################################</echo>
<j:set var="maven.all.goals">tcw:deploy</j:set>
<attainGoal name="all"/>
</goal>
<!--
=====================================
= tcw
= This is a pseudo-plugin for doing common TCW build actions, mostly on a single sub-project.
= The intent is that there are some standard goals, which are then implemented in the most sensible way for that project.
= e.g. tcw:build
= - for a jar project builds the jar
= - for a webservice project could build all the (env specific) wars
= - for a webservice client project could generate the stubs from wsdl and then build and jar them up
=
= Default implementations for standard jar projects are provided
=====================================
-->
<goal name="tcw:compile">
<attainGoal name="test:compile"/>
</goal>
<goal name="tcw:buildWithoutTest">
<attainGoal name="tcw:compile"/>
<attainGoal name="tcw:jar"/>
</goal>
<goal name="tcw:build">
<attainGoal name="tcw:compile"/>
<attainGoal name="tcw:test"/>
<attainGoal name="tcw:jar"/>
</goal>
<goal name="tcw:rebuild" prereqs="clean:clean,tcw:build"/>
<goal name="tcw:rebuildWithoutTest" prereqs="clean:clean,tcw:buildWithoutTest"/>
<goal name="tcw:test">
<j:if test="${context.getVariable('tcw.skiptest') != 'true'}">
<attainGoal name="test:test"/>
</j:if>
</goal>
<goal name="tcw:dummyJar">
<a:copy tofile="${maven.build.dir}/${maven.final.name}.jar">
<a:fileset file="${basedir}\..\dummyDependency.jar"/>
</a:copy>
<artifact:install
artifact="${maven.build.dir}/${maven.final.name}.jar"
type="jar"
project="${pom}"
/>
</goal>
<goal name="tcw:deploy">
</goal>
<goal name="tcw:release" prereqs="tcw:rebuildWithoutTest,tcw:deploy"/>
<!-- NOTE: postRebase does not run test:test under any circumstance -->
<goal name="tcw:postRebase" prereqs="all:rebuildWithoutTest,all:eclipse"/>
<goal name="tcw:syncWithDepot">
<exec executable="p4.exe" failonerror="true">
<arg line='sync'/>
</exec>
</goal>
<goal name="tcw:integrationBuild">
<attainGoal name="tcw:syncWithDepot"/>
<j:expr value="${context.setVariable('maven.env', 'parent', 'TEST')}"/>-->
<!-- <j:set var="${maven.env}" scope="parent">TEST</j:set>-->
<echo>System property maven.env forced to ${context.getVariable('maven.env')}</echo>
<j:set var="maven.tcw.envs" scope="parent">swaps-scratch,swaps-uat,exotics</j:set>
<j:set var="maven.tcw.buildtype" scope="parent">integrationBuild</j:set>
<attainGoal name="all:clean"/>
<attainGoal name="all:buildWithoutTest"/>
<attainGoal name="all:test"/>
<attainGoal name="all:deploy"/>
</goal>
<goal name="tcw:integrationBuildWithoutSync">
<j:expr value="${context.setVariable('maven.env', 'parent', 'TEST')}"/>-->
<!-- <j:set var="${maven.env}" scope="parent">TEST</j:set>-->
<echo>System property maven.env forced to ${context.getVariable('maven.env')}</echo>
<j:set var="maven.tcw.envs" scope="parent">swaps-scratch,swaps-uat,exotics</j:set>
<j:set var="maven.tcw.buildtype" scope="parent">integrationBuild</j:set>
<attainGoal name="all:clean"/>
<attainGoal name="all:buildWithoutTest"/>
<attainGoal name="all:test"/>
</goal>
<preGoal name="tcw:setupPath">
<echo>base dir = ${basedir}</echo>
<a:copy file="${basedir}/../log4j.properties" tofile="${maven.build.dir}/test-classes/log4j.properties"/>
</preGoal>
<goal name="tcw:setupPath">
<!-- Note that when this is called we will be in a project dir, hence the apparent extra .. -->
<j:set var="java.library.path">${java.library.path};${basedir}\..\..\Release\bin</j:set>
</goal>
<preGoal name="tcw:fatjar">
<attainGoal name="tcw:copyDependencies"/>
<attainGoal name="tcw:copyMainLibrary"/>
</preGoal>
<goal name="tcw:fatjar">
<echo>Creating fat jar: ${maven.build.dir}/${pom.artifactId}-${pom.currentVersion}-fat.jar</echo>
<a:zip destfile="${maven.build.dir}/${pom.artifactId}-${pom.currentVersion}-fat.jar" basedir="${maven.build.dir}/fat"/>
</goal>
<!-- Copies main library for the purpose of fat jar -->
<goal name="tcw:copyMainLibrary">
<echo>Copying Main Library from ${maven.build.dir}/${maven.final.name}.jar to ${maven.build.dir}/fat/main/main.jar</echo>
<mkdir dir="${maven.build.dir}/fat/main"/>
<a:copy tofile="${maven.build.dir}/fat/main/main.jar" file="${maven.build.dir}/${maven.final.name}.jar"/>
</goal>
<!-- Anything that should be included as a dependency in a jar should have a property jar.manifest.classpath=='true' -->
<goal name="tcw:copyDependencies">
<echo>Copying Dependent Libraries</echo>
<mkdir dir="${maven.build.dir}/fat/lib"/>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:if test="${dep.getProperty('jar.manifest.classpath')=='true'}">
<a:copy todir="${maven.build.dir}/fat/lib" file="${lib.path}"/>
</j:if>
<j:if test="${dep.getProperty('jar.expand')=='true'}">
<a:unzip dest="${maven.build.dir}/fat" src="${lib.path}"/>
</j:if>
</j:forEach>
</goal>
<!-- Copies source -->
<goal name="tcw:copySource">
<echo>Copying Source from ${pom.build.sourceDirectory} to ${maven.build.dest}/${maven.jar.source.path}</echo>
<mkdir dir="${maven.build.dest}"/>
<a:copy todir="${maven.build.dest}/${maven.jar.source.path}">
<a:fileset dir="${pom.build.sourceDirectory}"/>
</a:copy>
</goal>
<!-- Copies test source -->
<goal name="tcw:copyTestSource">
<echo>Copying Test Source</echo>
<mkdir dir="${maven.build.dest}"/>
<a:copy todir="${maven.build.dest}/${maven.jar.source.path}">
<a:fileset dir="${pom.build.unitTestSourceDirectory}"/>
</a:copy>
</goal>
<!-- Copies test classes -->
<goal name="tcw:copyTestClasses">
<echo>Copying Test Classes</echo>
<mkdir dir="${maven.build.dest}"/>
<a:copy todir="${maven.build.dest}/${maven.jar.source.path}">
<a:fileset dir="${maven.test.dest}"/>
</a:copy>
</goal>
<!-- ================================================================== -->
<!-- J A R -->
<!-- ================================================================== -->
<goal name="tcw:jar" description="Create the deliverable jar file.">
<j:choose>
<j:when test="${pom.currentVersion == null}">
<a:fail>You must define currentVersion in your POM.</a:fail>
</j:when>
</j:choose>
<a:available property="maven.jar.manifest.available"
file="${maven.jar.manifest}"/>
<j:set var="specificationTitle" value="${pom.shortDescription.trim()}"/>
<j:if test="${specificationTitle.length() gt 49}">
<a:echo>Warning: shortDescription is greater than 49 characters - trimming for specification title.</a:echo>
<j:set var="specificationTitle" value="${specificationTitle.substring(0,46)}..."/>
</j:if>
<!-- See http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html -->
<!-- See http://java.sun.com/j2se/1.4.1/docs/guide/jar/jar.html -->
<a:jar
jarfile="${maven.build.dir}/${maven.final.name}.jar"
basedir="${maven.build.dest}"
index="${maven.jar.index}"
compress="${maven.jar.compress}"
excludes="${maven.jar.excludes}">
<j:if test="${maven.jar.manifest.available}">
<a:setProperty name="manifest" value="${maven.jar.manifest}"/>
</j:if>
<j:if test="${context.getVariable('maven.jar.includes') != null}">
<a:setProperty name="includes" value="${maven.jar.includes}"/>
</j:if>
<j:set var="licenseFileName">
<license:fileName/>
</j:set>
<util:file name="${licenseFileName}" var="licenseFile"/>
<a:metainf dir="${licenseFile.canonicalFile.parent}">
<a:include name="${licenseFile.canonicalFile.name}"/>
</a:metainf>
<a:manifest>
<a:attribute name="Built-By" value="${user.name}"/>
<a:attribute name="Created-By" value="Apache Maven"/>
<a:attribute name="Package" value="${pom.package}"/>
<a:attribute name="Build-Jdk" value="${java.version}"/>
<j:set var="jarClasspath" value="${maven.jar.manifest.classpath.add}"/>
<j:if test="${jarClasspath}">
<j:forEach var="dep" items="${pom.dependencies}">
<j:if test="${dep.getProperty('jar.manifest.classpath')=='true'}">
<j:set var="maven.jar.classpath" value="${maven.jar.classpath} ${dep.artifact}"/>
</j:if>
</j:forEach>
<j:if test="${maven.jar.classpath.length() != 0}">
<a:attribute name="Class-Path" value="${maven.jar.classpath}"/>
</j:if>
</j:if>
<!-- added supplementary entries -->
<a:attribute name="Extension-Name" value="${pom.artifactId}"/>
<a:attribute name="Specification-Title" value="${specificationTitle}"/>
<a:attribute name="Specification-Vendor" value="${pom.organization.name}"/>
<!--
<a:attribute name="Specification-Version" value="${pom.currentVersion}"/>
-->
<a:attribute name="Implementation-Title" value="${pom.package}"/>
<a:attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
<a:attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<j:set var="mainclass" value="${maven.jar.mainclass}"/>
<j:if test="${!empty(mainclass)}">
<a:attribute name="Main-Class" value="${mainclass}"/>
</j:if>
<j:set var="jarExtensions" value="${maven.jar.manifest.extensions.add}"/>
<j:if test="${jarExtensions == 'true'}">
<j:set var="extensionList" value=""/>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
<j:if test="${dep.type == 'jar' || empty(dep.type)}">
<j:set var="extensionList" value="${extensionList} ${dep.artifactId}"/>
</j:if>
</j:forEach>
<j:if test="${extensionList.length() != 0}">
<j:set var="extensionList" value="${extensionList.substring(1)}"/>
<a:attribute name="Extension-List" value="${extensionList}"/>
</j:if>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
<j:if test="${dep.type == 'jar' || empty(dep.type)}">
<a:attribute name="${dep.artifactId}-Extension-Name" value="${dep.artifactId}"/>
<a:attribute name="${dep.artifactId}-Implementation-Version" value="${dep.version}"/>
<j:choose>
<j:when test="${empty(dep.url) || dep.url.toString().trim().length() == 0}">
<a:attribute name="${dep.artifactId}-Implementation-URL" value="http://www.ibiblio.org/maven${artifact.urlPath}"/>
</j:when>
<j:otherwise>
<a:attribute name="${dep.artifactId}-Implementation-URL" value="${dep.url}"/>
</j:otherwise>
</j:choose>
</j:if>
</j:forEach>
</j:if>
<j:if test="${context.getVariable('maven.jar.manifest.attributes.list') != null}">
<util:tokenize var="attributeList" delim="," trim="true">${maven.jar.manifest.attributes.list}</util:tokenize>
<j:forEach var="attribute" items="${attributeList}">
<j:set var="name" value="maven.jar.manifest.attribute.${attribute}"/>
<j:set var="value" value="${context.findVariable(name)}"/>
<a:attribute name="${attribute}" value="${value}"/>
</j:forEach>
</j:if>
<j:if test="${context.getVariable('maven.jar.manifest.groups.list') != null}">
<util:tokenize var="groupList" delim="," trim="true">${maven.jar.manifest.groups.list}</util:tokenize>
<j:forEach var="group" items="${groupList}">
<j:set var="nameVar" value="maven.jar.manifest.${group}.name"/>
<j:set var="groupName" value="${context.findVariable(nameVar)}"/>
<j:set var="attributeListVar" value="maven.jar.manifest.${group}.attributes.list"/>
<j:set var="groupAttributes" value="${context.findVariable(attributeListVar)}"/>
<util:tokenize var="attributeList" delim="," trim="true">${groupAttributes}</util:tokenize>
<a:section name="${groupName}">
<j:forEach var="attribute" items="${attributeList}">
<j:set var="name" value="maven.jar.manifest.${group}.attribute.${attribute}"/>
<j:set var="value" value="${context.findVariable(name)}"/>
<a:attribute name="${attribute}" value="${value}"/>
</j:forEach>
</a:section>
</j:forEach>
</j:if>
</a:manifest>
</a:jar>
<artifact:install
artifact="${maven.build.dir}/${maven.final.name}.jar"
type="jar"
project="${pom}"
/>
</goal>
<!-- ================================================================== -->
<!-- Pre goals for existing maven goals -->
<!-- ================================================================== -->
<preGoal name="test:test-resources">
<delete verbose="true">
<fileset dir="${basedir}" includes="**/junit*.properties"/>
</delete>
</preGoal>
<preGoal name="clean:clean">
<attainGoal name="tcw:dummyJar"/>
</preGoal>
<preGoal name="test:compile">
<attainGoal name="tcw:setupPath"/>
</preGoal>
<preGoal name="test:single">
<attainGoal name="tcw:setupPath"/>
</preGoal>
<goal name="tcw:clientdeploy">
<attainGoal name="tcw:signjars"/>
<a:copy file="SignedJars\tcw-fip-workflow-common.jar" tofile="${ddm.ticket.deployment.path}\tcw-fip-workflow-common-${et.env}.jar"/>
<a:copy file="SignedJars\tcw-fip-workflow-wsdl.jar" tofile="${ddm.ticket.deployment.path}\tcw-fip-workflow-wsdl-${et.env}.jar"/>
<a:copy file="SignedJars\tcw-fip-workflow-delegate.jar" tofile="${ddm.ticket.deployment.path}\tcw-fip-workflow-delegate-${et.env}.jar"/>
<a:copy file="workflow-common\target\tcw-fip-workflow-common-${pom.currentVersion}.jar"
tofile="${ddm.ticket.deployment.path}\tcw-fip-workflow-common-${et.env}-unsigned.jar"/>
<a:copy file="workflow-wsdl\target\tcw-fip-workflow-wsdl-${pom.currentVersion}.jar"
tofile="${ddm.ticket.deployment.path}\tcw-fip-workflow-wsdl-${et.env}-unsigned.jar"/>
<a:copy file="workflow-delegate\target\tcw-fip-workflow-delegate-${pom.currentVersion}.jar"
tofile="${ddm.ticket.deployment.path}\tcw-fip-workflow-delegate-${et.env}-unsigned.jar"/>
</goal>
<goal name="tcw:signjar">
<a:signjar jar="${jar.unsigned}" signedjar="${jar.signed}"
alias="${fox.keystore.key}" keystore="${fox.keystore.filename}" storepass="${fox.keystore.password}"/>
</goal>
<!--
add arg -Dtcw.signedjar.labelversion=true when running do fall back to jars with version
-->
<goal name="tcw:signjars">
<j:if test="${context.getVariable('tcw.signedjar.labelversion') == 'true'}">
<j:set var="jar.signed.suffix">-${pom.currentVersion}</j:set>
<echo>Appending -${pom.currentVersion} to jars</echo>
</j:if>
<!-- Holding directory for signed jars -->
<a:delete dir="SignedJars"/>
<a:mkdir dir="SignedJars"/>
<j:set var="jar.unsigned">workflow-common\target\tcw-fip-workflow-common-${pom.currentVersion}.jar</j:set>
<j:set var="jar.signed">signedjars\tcw-fip-workflow-common${jar.signed.suffix}.jar</j:set>
<attainGoal name="tcw:signjar"/>
<j:set var="jar.unsigned">workflow-wsdl\target\tcw-fip-workflow-wsdl-${pom.currentVersion}.jar</j:set>
<j:set var="jar.signed">signedjars\tcw-fip-workflow-wsdl${jar.signed.suffix}.jar</j:set>
<attainGoal name="tcw:signjar"/>
<j:set var="jar.unsigned">workflow-delegate\target\tcw-fip-workflow-delegate-${pom.currentVersion}.jar</j:set>
<j:set var="jar.signed">signedjars\tcw-fip-workflow-delegate${jar.signed.suffix}.jar</j:set>
<attainGoal name="tcw:signjar"/>
</goal>
<goal name="tcw:cleanDocs">
<a:delete file="cobertura.ser"/>
<a:delete dir="./target/cobertura"/>
<a:delete dir="./target/checkstyle"/>
<a:delete dir="./target/docs"/>
</goal>
<preGoal name="checkstyle:init">
<j:set var="maven.checkstyle.excludes" value="**/*Test*.java,**/test/*.java"/>
</preGoal>
<postGoal name="checkstyle:report-internal">
<j:set var="maven.docs.src" value="."/>
<attainGoal name="xdoc:transform"/>
</postGoal>
<goal name="srn">
<a:tstamp>
<a:format property="start.timestamp" pattern="dd-MMM-yy HH:mm:ss"/>
</a:tstamp>
<echo message="Build started: ${start.timestamp}"/>
</goal>
<goal name="tcw:cobertura-merge">
<a:delete dir="Cobertura-Results"/>
<a:mkdir dir="Cobertura-Results"/>
<a:mkdir dir="Cobertura-Results/src/java"/>
<a:copy todir="Cobertura-Results/src/java">
<fileset dir="Workflow-Delegate/src/java/">
<include name="**/*.java"/>
</fileset>
</a:copy>
<a:copy todir="Cobertura-Results/src/java">
<fileset dir="Workflow/src/java/">
<include name="**/*.java"/>
</fileset>
</a:copy>
<a:copy todir="Cobertura-Results/src/java">
<fileset dir="Core/src/java/">
<include name="**/*.java"/>
</fileset>
</a:copy>
<a:copy todir="Cobertura-Results/src/java">
<fileset dir="Workflow-Common/src/java/">
<include name="**/*.java"/>
</fileset>
</a:copy>
<a:copy todir="Cobertura-Results/src/java">
<fileset dir="Workflow-Delegate-Test/src/java/">
<include name="**/*.java"/>
</fileset>
</a:copy>
<a:copy todir="Cobertura-Results/src/java">
<fileset dir="Swapswire/src/java/">
<include name="**/*.java"/>
</fileset>
</a:copy>
<a:taskdef inheritsRefs="true" classpathref="maven.dependency.classpath" name="cobertura-merge" classname="net.sourceforge.cobertura.ant.MergeTask"/>
<j:set var="maven.cobertura.datafile" value="Cobertura-Results/cobertura.ser"/>
<a:cobertura-merge datafile="Cobertura-Results/cobertura.ser">
<a:fileset dir=".">
<a:include name="**/cobertura.ser"/>
</a:fileset>
</a:cobertura-merge>
<j:set var="maven.cobertura.format" value="html"/>
<j:set var="maven.docs.dest" value="Cobertura-Results"/>
<j:set var="sourceDir" value="Cobertura-Results/src/java/"/>
<attainGoal name="cobertura:report-internal"/>
</goal>
<postGoal name="tcw:integrationBuild">
<j:if test="${context.getVariable('tcw.cobertura.on') != null}">
<attainGoal name="tcw:cobertura-merge"/>
</j:if>
</postGoal>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]