Explicity use ant name space. In prep for removal of jeez etc

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113204 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion 2003-03-27 13:21:38 +00:00
parent 7f943882cf
commit 311a1cd941
10 changed files with 329 additions and 321 deletions

View File

@ -2,6 +2,7 @@
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:doc="doc">
@ -23,15 +24,15 @@
|
-->
<path id="clover.classpath">
<pathelement path="${plugin.getDependencyPath('clover')}"/>
</path>
<ant:path id="clover.classpath">
<ant:pathelement path="${plugin.getDependencyPath('clover')}"/>
</ant:path>
<j:set var="tmp.clover.excludes">
<j:forEach var="pat" items="${pom.build.unitTest.includes}"> ${pat} </j:forEach>
</j:set>
<property name="clover.excludes" value="${tmp.clover.excludes}"/>
<ant:property name="clover.excludes" value="${tmp.clover.excludes}"/>
<goal name="maven-clover-plugin:register">
@ -68,7 +69,7 @@
${pom.getContext().removeVariable('build.compiler')}
</postGoal>
<property
<ant:property
name="clover.initstring"
value="${maven.clover.database.dir}/clover_coverage.db"/>
@ -78,9 +79,9 @@
<maven:addPath id="maven.dependency.classpath" refid="clover.classpath"/>
<mkdir dir="${maven.build.clover}"/>
<mkdir dir="${maven.build.clover.classes}"/>
<mkdir dir="${maven.clover.database.dir}"/>
<ant:mkdir dir="${maven.build.clover}"/>
<ant:mkdir dir="${maven.build.clover.classes}"/>
<ant:mkdir dir="${maven.clover.database.dir}"/>
<j:set var="tmp" value="${maven.build.clover.classes}"/>
@ -107,19 +108,19 @@
| Grab the value maven.docs.dest from the xdoc plugin.
|
-->
<mkdir dir="${cloverReportDirectory}"/>
<ant:mkdir dir="${cloverReportDirectory}"/>
<java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter"
<ant:java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter"
fork="true">
<arg line="-o ${cloverReportDirectory}"/>
<arg line="-i ${clover.initstring}"/>
<arg line="-t '${pom.name} - ${pom.currentVersion}'"/>
<classpath>
<path refid="maven-classpath"/>
<pathelement path="${plugin.getDependencyPath('velocity')}"/>
<pathelement path="${plugin.getDependencyPath('clover')}"/>
</classpath>
</java>
<ant:arg line="-o ${cloverReportDirectory}"/>
<ant:arg line="-i ${clover.initstring}"/>
<ant:arg line="-t '${pom.name} - ${pom.currentVersion}'"/>
<ant:classpath>
<ant:path refid="maven-classpath"/>
<ant:pathelement path="${plugin.getDependencyPath('velocity')}"/>
<ant:pathelement path="${plugin.getDependencyPath('clover')}"/>
</ant:classpath>
</ant:java>
</goal>
@ -128,17 +129,17 @@
prereqs="clover:on,test:test"
description="Generate Swing test coverage reports with Clover">
<mkdir dir="${cloverReportDirectory}"/>
<ant:mkdir dir="${cloverReportDirectory}"/>
<java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer"
<ant:java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer"
fork="yes">
<arg line="${clover.initstring}"/>
<classpath>
<path refid="maven-classpath"/>
<pathelement path="${plugin.getDependencyPath('velocity')}"/>
<pathelement path="${plugin.getDependencyPath('clover')}"/>
</classpath>
</java>
<ant:arg line="${clover.initstring}"/>
<ant:classpath>
<ant:path refid="maven-classpath"/>
<ant:pathelement path="${plugin.getDependencyPath('velocity')}"/>
<ant:pathelement path="${plugin.getDependencyPath('clover')}"/>
</ant:classpath>
</ant:java>
</goal>

View File

@ -2,6 +2,7 @@
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:define="jelly:define"
xmlns:deploy="deploy"
@ -62,22 +63,22 @@
<j:set var="typeX" value="${type}X"/>
<j:choose>
<j:when test="${typeX != 'X'}">
<property
<ant:property
name="resolvedDirectory"
value="${siteDirectory}/${pom.artifactDirectory}/${type}"
/>
</j:when>
<j:otherwise>
<property
<ant:property
name="resolvedDirectory"
value="${siteDirectory}/${pom.artifactDirectory}"
/>
</j:otherwise>
</j:choose>
<echo>
<ant:echo>
Moving ${artifact} to the ${resolvedDirectory} on ${siteAddress}
</echo>
</ant:echo>
<!--
||
@ -87,15 +88,15 @@
<j:set var="assureDirectoryCommandX" value="${assureDirectoryCommand}X"/>
<j:if test="${assureDirectoryCommandX != 'X'}">
<exec dir="." executable="${commander}">
<arg line="-l ${username} ${siteAddress} '${assureDirectoryCommand} ${resolvedDirectory}'"/>
</exec>
<ant:exec dir="." executable="${commander}">
<ant:arg line="-l ${username} ${siteAddress} '${assureDirectoryCommand} ${resolvedDirectory}'"/>
</ant:exec>
</j:if>
<exec dir="." executable="${copier}">
<arg value="${artifact}"/>
<arg value="${username}@${siteAddress}:${resolvedDirectory}"/>
</exec>
<ant:exec dir="." executable="${copier}">
<ant:arg value="${artifact}"/>
<ant:arg value="${username}@${siteAddress}:${resolvedDirectory}"/>
</ant:exec>
<!--
||
@ -113,13 +114,13 @@
value='${strings.replace(siteCommand, "@deployDirectory@", resolvedDirectory)}'
/>
<echo>
<ant:echo>
Executing ${siteCommand} with the username ${username} on ${siteAddress}
</echo>
</ant:echo>
<exec dir="." executable="${commander}">
<arg line="-l ${username} ${siteAddress} '${siteCommand}'"/>
</exec>
<ant:exec dir="." executable="${commander}">
<ant:arg line="-l ${username} ${siteAddress} '${siteCommand}'"/>
</ant:exec>
</j:if>
@ -140,22 +141,22 @@
</j:if>
<j:set var="mavenRepoLocal" value='${context.getVariable("maven.repo.local")}'/>
<mkdir dir="${todir}"/>
<copy todir="${todir}" flatten="true">
<fileset dir="${mavenRepoLocal}">
<ant:mkdir dir="${todir}"/>
<ant:copy todir="${todir}" flatten="true">
<ant:fileset dir="${mavenRepoLocal}">
<j:forEach var="dep" items="${pom.dependencies}">
<include name="${dep.artifactDirectory}/jars/${dep.artifact}"/>
<ant:include name="${dep.artifactDirectory}/jars/${dep.artifact}"/>
</j:forEach>
<j:if test="${excludes != ''}">
<!-- The excludes are a list of dep ids -->
<util:tokenize var="excludeItems" delim=",">${excludes}</util:tokenize>
<j:forEach var="exclude" items="${excludeItems}">
<j:set var="depToExclude" value="${pom.getDependency(exclude)}"/>
<exclude name="${depToExclude.artifactDirectory}/jars/${depToExclude.artifact}"/>
<ant:exclude name="${depToExclude.artifactDirectory}/jars/${depToExclude.artifact}"/>
</j:forEach>
</j:if>
</fileset>
</copy>
</ant:fileset>
</ant:copy>
</define:tag>
</define:taglib>

View File

@ -2,6 +2,7 @@
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:util="jelly:util"
xmlns:changelog="changelog"
xmlns:doc="doc">
@ -36,7 +37,7 @@
<j:when test="${maven.mode.online}">
<j:set var="_connection">${pom.repository.connection}</j:set>
<j:if test="${!empty(_connection)}">
<echo>Generating the developer activity report</echo>
<ant:echo>Generating the developer activity report</ant:echo>
<!--
|
@ -76,7 +77,7 @@
</j:when>
<j:otherwise>
<echo>The Activity report is only available in online mode.</echo>
<ant:echo>The Activity report is only available in online mode.</ant:echo>
</j:otherwise>
</j:choose>

142
dist/plugin.jelly vendored
View File

@ -2,6 +2,7 @@
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:deploy="deploy"
xmlns:m="maven">
@ -10,12 +11,18 @@
<!-- D I S T R I B U T I O N S -->
<!-- ================================================================== -->
<property name="maven.dist.assembly.dir" value="${maven.build.dir}/${maven.final.name}"/>
<property name="maven.dist.bin.archive.dir" value="${maven.dist.assembly.dir}/bin"/>
<property name="maven.dist.src.archive.dir" value="${maven.dist.assembly.dir}/src"/>
<property name="maven.dist.bin.assembly.dir" value="${maven.dist.assembly.dir}/bin/${maven.final.name}"/>
<property name="maven.dist.src.assembly.dir" value="${maven.dist.assembly.dir}/src/${maven.final.name}"/>
<property name="maven.dist.dir" value="${maven.build.dir}/distributions"/>
<ant:property name="maven.dist.assembly.dir"
value="${maven.build.dir}/${maven.final.name}"/>
<ant:property name="maven.dist.bin.archive.dir"
value="${maven.dist.assembly.dir}/bin"/>
<ant:property name="maven.dist.src.archive.dir"
value="${maven.dist.assembly.dir}/src"/>
<ant:property name="maven.dist.bin.assembly.dir"
value="${maven.dist.assembly.dir}/bin/${maven.final.name}"/>
<ant:property name="maven.dist.src.assembly.dir"
value="${maven.dist.assembly.dir}/src/${maven.final.name}"/>
<ant:property name="maven.dist.dir"
value="${maven.build.dir}/distributions"/>
<goal
name="dist:prepare-bin-filesystem"
@ -29,37 +36,37 @@
-->
<delete dir="${maven.dist.bin.assembly.dir}"/>
<mkdir dir="${maven.dist.bin.assembly.dir}"/>
<ant:delete dir="${maven.dist.bin.assembly.dir}"/>
<ant:mkdir dir="${maven.dist.bin.assembly.dir}"/>
<echo>
<ant:echo>
+-------------------------------------------------------+
| C R E A T I N G B I N A R Y D I S T R I B U T I O N |
+-------------------------------------------------------+
</echo>
</ant:echo>
<copy todir="${maven.dist.bin.assembly.dir}">
<fileset dir=".">
<include name="README.txt"/>
<include name="LICENSE*"/>
</fileset>
</copy>
<ant:copy todir="${maven.dist.bin.assembly.dir}">
<ant:fileset dir=".">
<ant:include name="README.txt"/>
<ant:include name="LICENSE*"/>
</ant:fileset>
</ant:copy>
<!-- Copy Jars -->
<copy todir="${maven.dist.bin.assembly.dir}">
<fileset dir="${maven.build.dir}">
<include name="${maven.final.name}.jar"/>
</fileset>
</copy>
<ant:copy todir="${maven.dist.bin.assembly.dir}">
<ant:fileset dir="${maven.build.dir}">
<ant:include name="${maven.final.name}.jar"/>
</ant:fileset>
</ant:copy>
<!-- Copy documentation -->
<j:set var="docsDest"
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
<copy todir="${maven.dist.bin.assembly.dir}/docs">
<fileset dir="${docsDest}">
<include name="**"/>
</fileset>
</copy>
<ant:copy todir="${maven.dist.bin.assembly.dir}/docs">
<ant:fileset dir="${docsDest}">
<ant:include name="**"/>
</ant:fileset>
</ant:copy>
</goal>
<goal
@ -68,45 +75,44 @@
<!-- S O U R C E D I S T R I B U T I O N -->
<delete dir="${maven.dist.src.assembly.dir}" />
<mkdir dir="${maven.dist.src.assembly.dir}" />
<ant:delete dir="${maven.dist.src.assembly.dir}" />
<ant:mkdir dir="${maven.dist.src.assembly.dir}" />
<echo>
<ant:echo>
+-------------------------------------------------------+
| C R E A T I N G S O U R C E D I S T R I B U T I O N |
+-------------------------------------------------------+
</echo>
</ant:echo>
<copy todir="${maven.dist.src.assembly.dir}">
<fileset dir=".">
<include name="README.txt"/>
<include name="LICENSE*"/>
<include name="project.properties"/>
<include name="maven.xml"/>
<include name="project.xml"/>
</fileset>
</copy>
<ant:copy todir="${maven.dist.src.assembly.dir}">
<ant:fileset dir=".">
<ant:include name="README.txt"/>
<ant:include name="LICENSE*"/>
<ant:include name="project.properties"/>
<ant:include name="maven.xml"/>
<ant:include name="project.xml"/>
</ant:fileset>
</ant:copy>
<available property="maven.dist.build.xml.avail"
<ant:available property="maven.dist.build.xml.avail"
file="${basedir}/build.xml"/>
<j:choose>
<j:when test="${maven.dist.build.xml.avail}">
<copy todir="${maven.dist.src.assembly.dir}" file="build.xml"/>
<ant:copy todir="${maven.dist.src.assembly.dir}" file="build.xml"/>
</j:when>
<j:otherwise>
<attainGoal name="ant:generate-build"/>
<move
<ant:move
file="build.xml"
tofile="${maven.dist.src.assembly.dir}/build.xml"/>
</j:otherwise>
</j:choose>
<!-- Copy Source -->
<copy todir="${maven.dist.src.assembly.dir}/src">
<fileset dir="${maven.src.dir}">
</fileset>
</copy>
<ant:copy todir="${maven.dist.src.assembly.dir}/src">
<ant:fileset dir="${maven.src.dir}" />
</ant:copy>
</goal>
<goal name="dist"
@ -123,8 +129,8 @@
<goal
name="dist:build-setup"
description="Set up directories for a distribution build">
<delete dir="${maven.dist.dir}"/>
<mkdir dir="${maven.dist.dir}"/>
<ant:delete dir="${maven.dist.dir}"/>
<ant:mkdir dir="${maven.dist.dir}"/>
</goal>
<goal
@ -133,21 +139,21 @@
description="Build the binary distribution.">
<!-- Create a tar.gz file -->
<tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}.tar">
<tarfileset dir="${maven.dist.bin.archive.dir}"/>
</tar>
<ant:tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}.tar">
<ant:tarfileset dir="${maven.dist.bin.archive.dir}"/>
</ant:tar>
<gzip
<ant:gzip
zipfile="${maven.dist.dir}/${maven.final.name}.tar.gz"
src="${maven.dist.dir}/${maven.final.name}.tar"
/>
<delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
<ant:delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
<!-- Create a zip file -->
<zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
<zipfileset dir="${maven.dist.bin.archive.dir}"/>
</zip>
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
<ant:zipfileset dir="${maven.dist.bin.archive.dir}"/>
</ant:zip>
</goal>
<goal
@ -156,21 +162,21 @@
description="Build the source distribution.">
<!-- Create a tar.gz file -->
<tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}-src.tar">
<tarfileset dir="${maven.dist.src.archive.dir}"/>
</tar>
<ant:tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}-src.tar">
<ant:tarfileset dir="${maven.dist.src.archive.dir}"/>
</ant:tar>
<gzip
<ant:gzip
zipfile="${maven.dist.dir}/${maven.final.name}-src.tar.gz"
src="${maven.dist.dir}/${maven.final.name}-src.tar"
/>
<delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
<ant:delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
<!-- Create a zip file -->
<zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
<zipfileset dir="${maven.dist.src.archive.dir}"/>
</zip>
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
<ant:zipfileset dir="${maven.dist.src.archive.dir}"/>
</ant:zip>
</goal>
@ -192,9 +198,9 @@
<attainGoal name="dist:build"/>
<tar tarfile="distributions.tar" basedir="${maven.dist.dir}"/>
<gzip zipfile="distributions.tar.gz" src="distributions.tar"/>
<delete file="distributions.tar"/>
<ant:tar tarfile="distributions.tar" basedir="${maven.dist.dir}"/>
<ant:gzip zipfile="distributions.tar.gz" src="distributions.tar"/>
<ant:delete file="distributions.tar"/>
<deploy:artifact
artifact="distributions.tar.gz"
@ -247,7 +253,7 @@
<m:user-check user="${maven.username}"/>
<j:set var="maven.final.name" value="${snapshotSignature}"/>
<echo>Building snapshot distribution: ${maven.final.name}</echo>
<ant:echo>Building snapshot distribution: ${maven.final.name}</ant:echo>
<attainGoal name="dist:deploy"/>

View File

@ -1,6 +1,7 @@
<?xml version="1.0"?>
<project xmlns:j="jelly:core">
<project xmlns:j="jelly:core"
xmlns:ant="jelly:ant">
<!-- ================================================================== -->
<!-- S I M P L E D O C B O O K D O C U M E N T A T I O N -->
@ -14,7 +15,7 @@
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.gen.docs')}"/>
${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')}
<style
<ant:style
basedir="${maven.docbook.src}"
destdir="${genDocs}" extension=".xml"
style="${plugin.resources}/docbook2document.xsl"

View File

@ -2,6 +2,7 @@
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:license="license"
xmlns:util="jelly:util">
@ -23,15 +24,15 @@
<!--==================================================================-->
<goal name="ear:ear" prereqs="ear:init" description="Build an ear file">
<echo>Building EAR ${maven.final.name} with appxml "${maven.ear.appxml}"</echo>
<ant:echo>Building EAR ${maven.final.name} with appxml "${maven.ear.appxml}"</ant:echo>
<mkdir dir="${maven.build.dir}" />
<ant:mkdir dir="${maven.build.dir}" />
<available property="maven.ear.manifest.available"
<ant:available property="maven.ear.manifest.available"
file="${maven.ear.manifest}"/>
<ear destfile="${maven.build.dir}/${maven.final.name}.ear"
<ant:ear destfile="${maven.build.dir}/${maven.final.name}.ear"
appxml="${maven.ear.appxml}"
basedir="${maven.ear.src}"
excludes="${maven.ear.appxml}">
@ -39,52 +40,51 @@
<!-- include marked dependencies -->
<j:forEach var="dep" items="${pom.dependencies}">
<j:if test="${dep.getProperty('ear.bundle.jar')=='true'}">
<fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
<include name="${dep.artifact}"/>
</fileset>
<ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
<ant:include name="${dep.artifact}"/>
</ant:fileset>
</j:if>
<j:if test="${dep.getProperty('ear.bundle.war')=='true'}">
<fileset dir="${maven.repo.local}/${dep.artifactDirectory}/wars/">
<include name="${dep.artifact}"/>
</fileset>
<ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/wars/">
<ant:include name="${dep.artifact}"/>
</ant:fileset>
</j:if>
<j:if test="${dep.getProperty('ear.bundle.ejb')=='true'}">
<fileset dir="${maven.repo.local}/${dep.artifactDirectory}/ejbs/">
<include name="${dep.artifact}"/>
</fileset>
<ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/ejbs/">
<ant:include name="${dep.artifact}"/>
</ant:fileset>
</j:if>
</j:forEach>
<!-- include license -->
<j:set var="licenseFileName"><license:fileName/></j:set>
<util:file name="${licenseFileName}" var="licenseFile"/>
<metainf dir="${licenseFile.canonicalFile.parent}">
<include name="${licenseFile.canonicalFile.name}"/>
</metainf>
<ant:metainf dir="${licenseFile.canonicalFile.parent}">
<ant:include name="${licenseFile.canonicalFile.name}"/>
</ant:metainf>
<j:if test="${maven.ear.manifest.available}">
<setProperty name="manifest" value="${maven.ear.manifest}" />
<ant:setProperty name="manifest" value="${maven.ear.manifest}" />
</j:if>
<!-- standard manifest entries -->
<manifest>
<attribute name="Built-By" value="${user.name}" />
<section name="${pom.package}">
<attribute name="Specification-Title" value="${pom.artifactId}" />
<attribute name="Specification-Version"
<ant:manifest>
<ant:attribute name="Built-By" value="${user.name}" />
<ant:section name="${pom.package}">
<ant:attribute name="Specification-Title" value="${pom.artifactId}" />
<ant:attribute name="Specification-Version"
value="${pom.currentVersion}" />
<attribute name="Specification-Vendor"
<ant:attribute name="Specification-Vendor"
value="${pom.organization.name}" />
<attribute name="Implementation-Title"
<ant:attribute name="Implementation-Title"
value="${pom.package}" />
<attribute name="Implementation-Version"
<ant:attribute name="Implementation-Version"
value="${pom.currentVersion}" />
<attribute name="Implementation-Vendor"
<ant:attribute name="Implementation-Vendor"
value="${pom.organization.name}" />
</section>
</manifest>
</ear>
</ant:section>
</ant:manifest>
</ant:ear>
</goal>
@ -95,10 +95,10 @@
prereqs="ear:ear"
description="Install the ear in the local repository">
<property name="maven.ear.install.dir"
<ant:property name="maven.ear.install.dir"
value="${maven.repo.local}/${pom.artifactDirectory}/ears"/>
<mkdir dir="${maven.ear.install.dir}"/>
<copy file="${maven.build.dir}/${maven.final.name}.ear"
<ant:mkdir dir="${maven.ear.install.dir}"/>
<ant:copy file="${maven.build.dir}/${maven.final.name}.ear"
tofile="${maven.ear.install.dir}/${maven.final.name}.ear"/>
</goal>

View File

@ -1,7 +1,9 @@
<?xml version="1.0"?>
<project xmlns:j="jelly:core"
xmlns:test="test">
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:test="test">
<test:eclipse/>
@ -15,81 +17,80 @@
<goal name="eclipse:generate-project"
description="Generate Eclipse .project and .classpath project files">
<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
<j:set var="outputDir" value="target\classes"/>
</j:if>
<echo>Creating ${basedir}/.project ...</echo>
<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
<j:set var="outputDir" value="target\classes"/>
</j:if>
<ant:echo>Creating ${basedir}/.project ...</ant:echo>
<j:file name="${basedir}/.project" prettyPrint="true" xmlns="dummy">
<projectDescription>
<name>${pom.artifactId}</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
</j:file>
<j:file name="${basedir}/.project" prettyPrint="true" xmlns="dummy">
<projectDescription>
<name>${pom.artifactId}</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
</j:file>
<echo>Creating ${basedir}/.classpath ...</echo>
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" xmlns="dummy">
<classpath>
<j:if test="${sourcesPresent}">
<classpathentry kind="src" path="${pom.build.sourceDirectory}"/>
<j:if test="${sourcesPresent}">
<classpathentry kind="src" path="${pom.build.sourceDirectory}"/>
</j:if>
<j:if test="${unitTestSourcesPresent}">
<classpathentry kind="src" path="${pom.build.unitTestSourceDirectory}"/>
<!-- Here are the rules:
If the project has maven.eclipse.junit property, add that ver of junit
If the project has maven.eclipse.junit property and it is empty, don't add junit
If the project has junit dep, use that.
Use the test plugin version
-->
<j:set var="verX" value="${maven.eclipse.junit}X"/>
<j:set var="depVersion">${pom.getPluginContext('maven-test-plugin').getVariable('plugin').getDependency('junit').getVersion()}</j:set>
<j:if test="${pom.getDependency('junit') != null}">
<j:set var="depVersion" value="${pom.getDependency('junit').getVersion()}"/>
</j:if>
<j:if test="${unitTestSourcesPresent}">
<classpathentry kind="src" path="${pom.build.unitTestSourceDirectory}"/>
<!-- Here are the rules:
If the project has maven.eclipse.junit property, add that ver of junit
If the project has maven.eclipse.junit property and it is empty, don't add junit
If the project has junit dep, use that.
Use the test plugin version
-->
<j:set var="verX" value="${maven.eclipse.junit}X"/>
<j:set var="depVersion">${pom.getPluginContext('maven-test-plugin').getVariable('plugin').getDependency('junit').getVersion()}</j:set>
<j:if test="${pom.getDependency('junit') != null}">
<j:set var="depVersion" value="${pom.getDependency('junit').getVersion()}"/>
</j:if>
<j:if test="${verX != 'X'}">
<j:set var="depVersion">${maven.eclipse.junit}</j:set>
</j:if>
<j:if test="${verX == 'noneX'}">
<j:set var="depVersion" value="none"/>
</j:if>
<j:if test="${depVersion != 'none'}">
<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
</j:if>
<j:if test="${verX != 'X'}">
<j:set var="depVersion">${maven.eclipse.junit}</j:set>
</j:if>
<j:if test="${verX == 'noneX'}">
<j:set var="depVersion" value="none"/>
</j:if>
<j:if test="${depVersion != 'none'}">
<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
</j:if>
</j:if>
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
<j:forEach var="lib" items="${pom.artifacts}">
<classpathentry kind="var" path="MAVEN_REPO${lib.urlPath}"/>
</j:forEach>
<classpathentry kind="output" path="${outputDir}"/>
</classpath>
</j:file>
<echo>Now refresh your project in Eclipse (right click on the project and select "Refresh")</echo>
<classpathentry kind="output" path="${outputDir}"/>
</classpath>
</j:file>
<ant:echo>Now refresh your project in Eclipse (right click on the project and select "Refresh")</ant:echo>
</goal>
@ -98,14 +99,14 @@
<!--==================================================================-->
<goal name="eclipse:external-tools"
description="Generate an Eclipse external tool for each goal">
<mkdir dir="${maven.build.dir}/eclipse/"/>
<ant:mkdir dir="${maven.build.dir}/eclipse/"/>
<j:set var="toolFile" value="${maven.build.dir}/eclipse/externaltools.xml" />
<echo>Creating ${toolFile}</echo>
<ant:echo>Creating ${toolFile}</ant:echo>
<j:set var="os" value="${os.name}" />
<j:set var="windows" value="${os.toLowerCase().indexOf('windows') != '-1'}"/>
<echo>Adapting the generated file for a ${os} box.</echo>
<ant:echo>Adapting the generated file for a ${os} box.</ant:echo>
<!-- Strangely, j:file inserts a space between ${maven.home} and /bin/maven ... -->
<j:set var="tool.loc" value="${maven.home}${file.separator}bin${file.separator}maven"/>
@ -151,18 +152,18 @@
<j:set var="ws" value="${maven.eclipse.workspace}X" />
<j:if test='${ws != "X"}'>
<j:set var="toDir" value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclipse.ui.externaltools/" />
<copy file="${toolFile}" todir="${toDir}"/>
<j:set var="toDir" value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclipse.ui.externaltools/" />
<ant:copy file="${toolFile}" todir="${toDir}"/>
</j:if>
<j:if test='${ws == "X"}'>
<echo>
<ant:echo>
Please set maven.eclipse.workspace to the location of your eclipse workspace.
Alternatively, copy
${maven.build.dir}/eclipse/externaltools.xml
to
[maven.eclipse.workspace]/.metadata/.plugins/org.eclipse.ui.externaltools/externaltools.xml
</echo>
</ant:echo>
</j:if>
</goal>
@ -177,10 +178,10 @@
<j:choose>
<j:when test='${ws != "X"}'>
<j:set var="variableFile" value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclipse.jdt.core/pref_store.ini" />
<propertyfile file="${variableFile}">
<entry key="org.eclipse.jdt.core.classpathVariable.MAVEN_REPO"
<ant:propertyfile file="${variableFile}">
<ant:entry key="org.eclipse.jdt.core.classpathVariable.MAVEN_REPO"
default="${maven.repo.local}" />
</propertyfile>
</ant:propertyfile>
</j:when>
<j:otherwise>The property $${maven.eclipse.workspace} was not set. MAVEN_REPO may not be set.</j:otherwise>
</j:choose>

View File

@ -1,6 +1,7 @@
<?xml version="1.0"?>
<project xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:license="license"
xmlns:util="jelly:util">
@ -28,9 +29,9 @@
<!--==================================================================-->
<goal name="ejb:ejb" prereqs="ejb:init" description="Build an ejb file">
<echo>Building ejb ${maven.final.name}</echo>
<ant:echo>Building ejb ${maven.final.name}</ant:echo>
<available property="maven.ejb.manifest.available"
<ant:available property="maven.ejb.manifest.available"
file="${maven.ejb.manifest}"/>
<j:forEach var="dep" items="${pom.dependencies}">
@ -41,47 +42,47 @@
<!-- jar task used for now due to problems with ejb jar not including
files other than class files -->
<jar jarfile="${maven.build.dir}/${maven.final.name}.jar">
<ant:jar jarfile="${maven.build.dir}/${maven.final.name}.jar">
<!-- include marked dependencies -->
<j:forEach var="dep" items="${pom.dependencies}">
<j:if test="${dep.getProperty('ejb.bundle.jar')=='true'}">
<fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
<include name="${dep.artifact}"/>
</fileset>
<ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
<ant:include name="${dep.artifact}"/>
</ant:fileset>
</j:if>
</j:forEach>
<j:if test="${maven.ejb.manifest.available}">
<setProperty name="manifest" value="${maven.ejb.manifest}" />
<ant:setProperty name="manifest" value="${maven.ejb.manifest}" />
</j:if>
<j:set var="licenseFileName"><license:fileName/></j:set>
<util:file name="${licenseFileName}" var="licenseFile"/>
<metainf dir="${licenseFile.canonicalFile.parent}">
<include name="${licenseFile.canonicalFile.name}"/>
</metainf>
<ant:metainf dir="${licenseFile.canonicalFile.parent}">
<ant:include name="${licenseFile.canonicalFile.name}"/>
</ant:metainf>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Created-By" value="Apache Jakarta Maven"/>
<attribute name="Package" value="${pom.package}"/>
<attribute name="Class-Path" value="${maven.ejb.classpath}"/>
<section name="${pom.package}">
<attribute name="Specification-Title" value="${pom.artifactId}"/>
<attribute name="Specification-Version" value="${pom.currentVersion}"/>
<attribute name="Specification-Vendor" value="${pom.organization.name}"/>
<attribute name="Implementation-Title" value="${pom.package}"/>
<attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
</section>
</manifest>
<ant:manifest>
<ant:attribute name="Built-By" value="${user.name}"/>
<ant:attribute name="Created-By" value="Apache Jakarta Maven"/>
<ant:attribute name="Package" value="${pom.package}"/>
<ant:attribute name="Class-Path" value="${maven.ejb.classpath}"/>
<ant:section name="${pom.package}">
<ant:attribute name="Specification-Title" value="${pom.artifactId}"/>
<ant:attribute name="Specification-Version" value="${pom.currentVersion}"/>
<ant:attribute name="Specification-Vendor" value="${pom.organization.name}"/>
<ant:attribute name="Implementation-Title" value="${pom.package}"/>
<ant:attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
</ant:section>
</ant:manifest>
<fileset dir="${maven.ejb.src}"/>
<fileset dir="${maven.build.dest}"/>
<ant:fileset dir="${maven.ejb.src}"/>
<ant:fileset dir="${maven.build.dest}"/>
</jar>
</ant:jar>
</goal>
@ -92,10 +93,10 @@
prereqs="ejb:ejb"
description="Install the ejb in the local repository">
<property name="maven.ejb.install.dir"
<ant:property name="maven.ejb.install.dir"
value="${maven.repo.local}/${pom.artifactDirectory}/ejbs"/>
<mkdir dir="${maven.ejb.install.dir}"/>
<copy file="${maven.build.dir}/${maven.final.name}.jar"
<ant:mkdir dir="${maven.ejb.install.dir}"/>
<ant:copy file="${maven.build.dir}/${maven.final.name}.jar"
tofile="${maven.ejb.install.dir}/${maven.final.name}.jar"/>
</goal>

View File

@ -1,41 +1,37 @@
<?xml version="1.0"?>
<project
xmlns:ant="jelly:ant"
xmlns:j="jelly:core"
xmlns:x="jelly:xml"
xmlns:html="jelly:html"
xmlns:maven="jelly:maven"
xmlns:log="jelly:log"
xmlns:util="jelly:util"
xmlns:doc="doc"
xmlns:m="maven">
xmlns:x="jelly:xml">
<goal name="faq"
description="Generates an FAQ xdoc file from an FAQ XML document">
<j:set var="destfile" value="${maven.faq.dest.file}"/>
<j:set var="destfile" value="${maven.faq.dest.file}"/>
<j:if test="${empty(destfile)}">
<j:set var="destfile" value="${maven.build.dir}/generated-xdocs/faq.xml"/>
<j:set var="destfile" value="${maven.build.dir}/generated-xdocs/faq.xml"/>
</j:if>
<mkdir dir="${maven.build.dir}/generated-xdocs"/>
<j:set var="srcfile" value="${maven.faq.src.file}"/>
<ant:mkdir dir="${maven.build.dir}/generated-xdocs"/>
<j:set var="srcfile" value="${maven.faq.src.file}"/>
<j:if test="${empty(srcfile)}">
<j:set var="srcfile" value="${basedir}/xdocs/faq.fml"/>
<j:set var="srcfile" value="${basedir}/xdocs/faq.fml"/>
</j:if>
<util:file var="srcfileFile" name="${srcfile}"/>
<j:set var="srcfile" value="${srcfileFile.getCanonicalPath()}"/>
<util:file var="destfileFile" name="${destfile}"/>
<j:set var="destfile" value="${destfileFile.getCanonicalPath()}"/>
<util:file var="srcfileFile" name="${srcfile}"/>
<j:set var="srcfile" value="${srcfileFile.getCanonicalPath()}"/>
<util:file var="destfileFile" name="${destfile}"/>
<j:set var="destfile" value="${destfileFile.getCanonicalPath()}"/>
<j:set var="outputencoding" value="${maven.docs.outputencoding}"/>
<x:parse var="doc" xml="${srcfileFile}"/>
<x:set var="root" select="$doc/*"/>
<x:parse var="doc" xml="${srcfileFile}"/>
<x:set var="root" select="$doc/*"/>
<j:file name="${destfile}" encoding="${outputencoding}" outputMode="xml">
<j:file name="${destfile}" encoding="${outputencoding}" outputMode="xml">
<document>
<properties>
@ -43,46 +39,45 @@
</properties>
<body>
<section name="Frequently Asked Questions">
<x:forEach select="$root/part">
<p>
<strong><x:expr select="title"/></strong>
</p>
<ol>
<x:forEach select="faq">
<li>
<x:element name="a">
<x:attribute name="href">#<x:expr select="@id"/></x:attribute>
<x:copyOf select="question/node()"/>
</x:element>
</li>
</x:forEach>
</ol>
</x:forEach>
</section>
<x:forEach select="$root/part">
<p>
<strong><x:expr select="title"/></strong>
</p>
<ol>
<x:forEach select="faq">
<li>
<x:element name="a">
<x:attribute name="href">#<x:expr select="@id"/></x:attribute>
<x:copyOf select="question/node()"/>
</x:element>
</li>
</x:forEach>
</ol>
</x:forEach>
</section>
<x:forEach select="$root/part">
<x:element name="section">
<x:attribute name="name"><x:expr select="title"/></x:attribute>
<x:forEach select="faq">
<dl>
<dt>
<x:element name="a">
<x:attribute name="name"><x:expr select="@id"/></x:attribute>
<x:copyOf select="question/node()"/>
</x:element>
</dt>
<dd>
<x:copyOf select="answer/node()"/>
</dd>
</dl>
</x:forEach>
</x:element>
</x:forEach>
<x:forEach select="$root/part">
<x:element name="section">
<x:attribute name="name"><x:expr select="title"/></x:attribute>
<x:forEach select="faq">
<dl>
<dt>
<x:element name="a">
<x:attribute name="name"><x:expr select="@id"/></x:attribute>
<x:copyOf select="question/node()"/>
</x:element>
</dt>
<dd>
<x:copyOf select="answer/node()"/>
</dd>
</dl>
</x:forEach>
</x:element>
</x:forEach>
</body>
</document>
</j:file>
</j:file>
</goal>
</project>

View File

@ -1,10 +1,11 @@
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:util="jelly:util"
xmlns:ant="jelly:ant"
xmlns:changelog="changelog"
xmlns:doc="doc">
xmlns:doc="doc"
xmlns:j="jelly:core"
xmlns:util="jelly:util">
<goal name="maven-file-activity-plugin:register">
<doc:registerReport
@ -85,7 +86,7 @@
</j:when>
<j:otherwise>
<echo>The Activity report is only available in online mode.</echo>
<ant:echo>The Activity report is only available in online mode.</ant:echo>
</j:otherwise>
</j:choose>