dion 2002/11/19 15:12:17
Added: src/plugins-build/examples/exampleear-1.0 build.xml
project.properties project.xml maven.xml
LICENSE.txt
src/plugins-build/ejb plugin.properties maven.xml
project.properties project.xml plugin.jelly
src/plugins-build/ear/xdocs properties.xml goals.xml
changes.xml navigation.xml index.xml
src/plugins-build/examples/exampleejb-1.0 project.xml
project.properties build.xml LICENSE.txt
src/plugins-build/ejb/xdocs tasks.xml goals.xml changes.xml
navigation.xml properties.xml index.xml
src/plugins-build/ear project.properties plugin.properties
maven.xml project.xml plugin.jelly
src/plugins-build/examples/exampleejb-1.0/src/java/org/apache/maven/ejb/example
ExampleEJBBean.java ExampleEJBRemote.java
really_useful_resource.xml ExampleEJBHome.java
src/plugins-build/examples/exampleejb-1.0/src/ejb/META-INF
ejb-jar.xml MANIFEST.MF
src/plugins-build/examples/exampleear-1.0/src/application/META-INF
MANIFEST.MF application.xml
src/plugins-build/examples/exampleejb-1.0/src/ejb foo.txt
Log:
Added Nathan Coast's ear and ejb plugins
Revision Changes Path
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleear-1.0/build.xml
Index: build.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project default="jar" name="exampleear" basedir=".">
<property name="defaulttargetdir" value="target"></property>
<property name="classesdir" value="target/classes"></property>
<property name="testclassesdir" value="target/test-classes"></property>
<property name="testreportdir" value="target/test-reports"></property>
<property name="distdir" value="dist"></property>
<property name="javadocdir" value="target/docs/apidocs"></property>
<property name="final.name" value="exampleear-1.0"></property>
<target name="init" description="o Initializes some properties">
<condition property="noget">
<equals arg2="only" arg1="${build.sysclasspath}"></equals>
</condition>
</target>
<target name="compile" description="o Compile the code" depends="get-deps">
<mkdir dir="${classesdir}"></mkdir>
<javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false"
excludes="**/package.html">
<src>
<pathelement location="src"></pathelement>
</src>
<classpath>
<fileset dir="lib">
<include name="*.jar"></include>
</fileset>
</classpath>
</javac>
</target>
<target name="jar" description="o Create the jar" depends="compile,test">
<jar jarfile="target/${final.name}.jar" excludes="**/package.html"
basedir="${classesdir}"></jar>
</target>
<target name="clean" description="o Clean up the generated directories">
<delete dir="${defaulttargetdir}"></delete>
<delete dir="${distdir}"></delete>
</target>
<target name="dist" description="o Create a distribution" depends="jar, javadoc">
<mkdir dir="dist"></mkdir>
<copy todir="dist">
<fileset dir="${defaulttargetdir}"></fileset>
</copy>
</target>
<target name="test" description="o Run the test cases" depends="compile-tests">
<mkdir dir="${testreportdir}"></mkdir>
<junit dir="./" printSummary="yes" fork="true" haltonerror="true">
<sysproperty key="basedir" value="src/test"></sysproperty>
<formatter type="xml"></formatter>
<formatter usefile="true" type="plain"></formatter>
<classpath>
<fileset dir="lib">
<include name="*.jar"></include>
</fileset>
<pathelement location="target/${final.name}.jar"></pathelement>
<pathelement path="${testclassesdir}"></pathelement>
</classpath>
<batchtest todir="${testreportdir}">
<fileset dir="src/test">
</fileset>
</batchtest>
</junit>
</target>
<target name="compile-tests" depends="compile">
<mkdir dir="${testclassesdir}"></mkdir>
<javac destdir="${testclassesdir}" deprecation="true" debug="true"
optimize="false" excludes="**/package.html">
<src>
<pathelement location="src/test"></pathelement>
</src>
<classpath>
<fileset dir="lib">
<include name="*.jar"></include>
</fileset>
<pathelement location="target/${final.name}.jar"></pathelement>
</classpath>
</javac>
<copy todir="${testclassesdir}">
<fileset dir="src/test">
</fileset>
</copy>
</target>
<target name="javadoc" description="o Generate javadoc" depends="jar">
<mkdir dir="${javadocdir}"></mkdir>
<tstamp>
<format pattern="2002-yyyy" property="year"></format>
</tstamp>
<property name="copyright" value="Copyright &copy; Nettec. All Rights
Reserved."></property>
<property name="title" value="exampleear 1.0 API"></property>
<javadoc use="true" private="true" destdir="${javadocdir}" author="true"
version="true" sourcepath="src" packagenames="net.nettec.marsh.begin.*">
<classpath>
<fileset dir="lib">
<include name="*.jar"></include>
</fileset>
<pathelement location="target/${final.name}.jar"></pathelement>
</classpath>
</javadoc>
</target>
<target name="get-deps" unless="noget" depends="init">
<mkdir dir="lib"></mkdir>
<get dest="lib/commons-logging-1.0.2.jar" usetimestamp="true"
ignoreerrors="true"
src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.2.jar"></get>
<get dest="lib/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"
src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar"></get>
</target>
<target name="install-maven">
<get dest="${user.home}/maven-install-latest.jar" usetimestamp="true"
src="${maven.repo.remote}/maven/maven-install-latest.jar"></get>
<unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar"></unjar>
</target>
</project>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleear-1.0/project.properties
Index: project.properties
===================================================================
maven.deployable.component=${maven.final.name}.ear
maven.j2ee.ear.appxml=${maven.conf.dir}/application.xml
maven.weblogic.home=C:\\bea\\wlserver6.1
maven.weblogic.host=localhost
maven.weblogic.port=7001
maven.weblogic.server=myserver
maven.weblogic.username=system
maven.weblogic.password=weblogic
maven.weblogic.component=${maven.final.name}
maven.weblogic.debug=true
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleear-1.0/project.xml
Index: project.xml
===================================================================
<?xml version="1.0"?>
<project>
<pomVersion>3</pomVersion>
<name>exampleear</name>
<id>exampleear</id>
<currentVersion>1.0</currentVersion>
<organization>
<name>Nettec</name>
<url>http://www.nettec.net</url>
</organization>
<inceptionYear>2002</inceptionYear>
<package>net.nettec.marsh.begin</package>
<shortDescription>Marsh Begin TTS Maven</shortDescription>
<!-- Gump integration -->
<gumpRepositoryId/>
<description>
TTS Begin
</description>
<url/>
<issueTrackingUrl>
http://bugzilla
</issueTrackingUrl>
<siteAddress>www.nettec.net</siteAddress>
<siteDirectory/>
<distributionDirectory/>
<repository>
<connection>
scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-turbine-maven
</connection>
<url>
http://cvs.apache.org/viewcvs/jakarta-turbine-maven/
</url>
</repository>
<versions/>
<mailingLists/>
<developers>
<developer>
<name>Nathan Coast</name>
<id>nathanc</id>
<email>[EMAIL PROTECTED]</email>
<organization>Shadow Solutions</organization>
<role>Java Developer</role>
</developer>
</developers>
<dependencies>
<dependency>
<id>commons-logging</id>
<version>1.0.2</version>
<url>http://jakarta.apache.org/commons/logging.html</url>
<properties>
<ear.bundle.jar>true</ear.bundle.jar>
</properties>
</dependency>
</dependencies>
<build>
<nagEmailAddress>
[EMAIL PROTECTED]
</nagEmailAddress>
<sourceDirectory>src</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<integrationUnitTestSourceDirectory/>
<aspectSourceDirectory/>
<!-- Unit test cases -->
<!--unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/RepositoryTest.java</exclude>
</excludes>
</unitTest-->
<!-- J A R R E S O U R C E S -->
<!-- Resources that are packaged up inside the JAR file -->
<resources>
<!--includes>
<include>*.xsd</include>
<include>log4j.properties</include>
</includes-->
</resources>
<!-- Integration unit test cases -->
<integrationUnitTest/>
<jars>
</jars>
</build>
</project>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleear-1.0/maven.xml
Index: maven.xml
===================================================================
<project default="begin:dist">
<goal name="begin:dist"
description="Build each component">
<attainGoal name="ear:install"/>
</goal>
</project>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleear-1.0/LICENSE.txt
Index: LICENSE.txt
===================================================================
mung beans
1.1 jakarta-turbine-maven/src/plugins-build/ejb/plugin.properties
Index: plugin.properties
===================================================================
# -------------------------------------------------------------------
# P L U G I N
P R O P E R T I E S
#
-------------------------------------------------------------------
# ejb plugin.
#
-------------------------------------------------------------------
# Location of
where ejb sources (non-java) are located.
maven.ejb.src=${maven.src.dir}/ejb
#
Location of ejb xml configs - not used atm due to using jar task not ejbjar
maven.ejb.descriptordir=${maven.ejb.src}/META-INF
maven.ejb.manifest=${maven.ejb.descriptordir}/MANIFEST.MF
1.1 jakarta-turbine-maven/src/plugins-build/ejb/maven.xml
Index: maven.xml
===================================================================
<project default="plugin"
xmlns:j="jelly:core"
xmlns:m="maven">
<goal
name="plugin">
<j:if test="${sourcesPresent == 'true'}">
<attainGoal name="java:compile"/>
<attainGoal name="test:test"/>
</j:if>
<property name="assemblyDir" value="target/assemblyDir"/>
<mkdir dir="${assemblyDir}"/>
<copy todir="${assemblyDir}">
<fileset dir=".">
<exclude name="target/**"/>
<exclude name="src/**"/>
<exclude name="maven.xml"/>
<exclude name="maven.log"/>
</fileset>
</copy>
<j:if test="${sourcesPresent == 'true'}">
<copy todir="${assemblyDir}">
<fileset dir="target/classes"/>
</copy>
</j:if>
<jar
jarfile="${maven.build.dir}/${maven.final.name}.jar">
<fileset dir="${assemblyDir}"/>
</jar>
<copy
file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.repo.local}/maven/jars"
/>
</goal>
<goal name="plugin:install"
prereqs="plugin"
description="Install the plugin in Maven's plugins dir">
<copy
file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.home}/plugins"
/>
</goal>
<goal name="plugin:deploy"
prereqs="plugin"
description="Install an unpacked version of the plugin">
<mkdir dir="${maven.home}/plugins/${maven.final.name}"/>
<unzip
src="${maven.build.dir}/${maven.final.name}.jar"
dest="${maven.home}/plugins/${maven.final.name}"
/>
</goal>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/ejb/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C
T P R O P E R T I E S
#
-------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
1.1 jakarta-turbine-maven/src/plugins-build/ejb/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<id>maven-ejb-plugin</id>
<name>Maven ejb Plugin</name>
<currentVersion>1.0-SNAPSHOT</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
<logo>http://jakarta.apache.org/turbine/maven/images/jakarta-logo-blue.gif</logo>
</organization>
<inceptionYejb>2001</inceptionYejb>
<package>org.apache.maven</package>
<logo>http://jakarta.apache.org/turbine/maven/images/maven.jpg</logo>
<description>ejb Plugin for Maven</description>
<shortDescription>War Plugin for Maven</shortDescription>
<url>http://jakarta.apache.org/turbine/maven/reference/plugins/ejb/</url>
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/turbine/maven/reference/plugins/ejb/</siteDirectory>
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
<repository>
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-turbine-maven/src/plugins-build/ejb/</connection>
<url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/src/plugins-build/ejb/</url>
</repository>
<versions/>
<branches/>
<mailingLists/>
<developers>
<developer>
<name>Nathan Coast</name>
<id>nathan</id>
<email>[EMAIL PROTECTED]</email>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<dependencies/>
<build>
<nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
<sourceDirectory/>
<unitTestSourceDirectory/>
<!-- Unit test classes -->
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
</build>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/ejb/plugin.jelly
Index: plugin.jelly
===================================================================
<?xml version="1.0"?>
<project xmlns:j="jelly:core">
<!--==================================================================-->
<!-- Default goal : Builds a ejb file -->
<!--==================================================================-->
<goal name="ejb" prereqs="ejb:ejb" description="Build an ejb file"/>
<!--==================================================================-->
<!-- Initializations -->
<!--==================================================================-->
<goal name="ejb:init">
<j:if test="${sourcesPresent == 'true'}">
<attainGoal name="java:compile"/>
<attainGoal name="test:test"/>
</j:if>
</goal>
<!--==================================================================-->
<!-- Builds an ejb file -->
<!--==================================================================-->
<goal name="ejb:ejb" prereqs="ejb:init" description="Build an ejb file">
<echo>Building ejb ${pom.id}</echo>
<available property="maven.ejb.manifest.available"
file="${maven.ejb.manifest}"/>
<j:forEach var="dep" items="${pom.dependencies}">
<j:if test="${dep.getProperty('ejb.manifest.classpath')=='true'}">
<j:set var="maven.ejb.classpath" value="${maven.ejb.classpath}
${dep.getArtifact()}"/>
</j:if>
</j:forEach>
<!-- 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">
<!-- 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.getProjectId()}/jars/">
<include name="${dep.getArtifact()}"/>
</fileset>
</j:if>
</j:forEach>
<j:if test="${maven.ejb.manifest.available}">
<setProperty name="manifest" value="${maven.ejb.manifest}" />
</j:if>
<metainf dir="${basedir}">
<include name="LICENSE.txt"/>
</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.id}"/>
<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>
<fileset dir="${maven.ejb.src}"/>
<fileset dir="${maven.build.dest}"/>
</jar>
</goal>
<!--==================================================================-->
<!-- Install the ejb in the local repository -->
<!--==================================================================-->
<goal name="ejb:install"
prereqs="ejb:ejb"
description="Install the ejb in the local repository">
<property name="maven.ejb.install.dir"
value="${maven.repo.local}/${pom.id}/ejbs"/>
<mkdir dir="${maven.ejb.install.dir}"/>
<copy file="${maven.build.dir}/${maven.final.name}.jar"
tofile="${maven.ejb.install.dir}/${maven.final.name}.jar"/>
</goal>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/ear/xdocs/properties.xml
Index: properties.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>Properties</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<section name="ejb jar settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th><th>Default</th></tr>
<tr>
<td>maven.ear.manifest</td>
<td>Yes</td>
<td>
Location of the manifest file to be used within the ear file.
</td>
<td>
src/application/META-INF/MANIFEST.MF
</td>
</tr>
</table>
</section>
<section name="other settings">
<table>
<tr><th>Property</th><th>Description</th><th>See</th></tr>
<tr>
<td>maven.build.dir</td>
<td>where the comonent will be assembled</td>
<td>
<A href="../../../java/target/docs/properties.html#Other
Settings">maven.build.dir</A>
</td>
</tr>
<tr>
<td>maven.final.name</td>
<td>The assembled component will be
<code>${maven.build.dir}/${maven.final.name}.ear</code></td>
<td>
<A href="../../../java/target/docs/properties.html#Other
Settings">maven.final.name</A>
</td>
</tr>
</table>
</section>
<section name="Including jars in the ear file">
<p>
You must tell Maven what jars you want included in the ear. This
is achieved by specifying meta-information in the POM, using the
following syntax:
</p>
<source><![CDATA[
<dependency>
<id>jarid</id>
<version>jarversion</version>
<properties>
<ear.bundle.jar>true</ear.bundle.jar>
</properties>
</dependency>
]]></source>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ear/xdocs/goals.xml
Index: goals.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Ear Plug-in Goals</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<section name="Goals">
<table>
<tr><th>Goal</th><th>Description</th></tr>
<tr>
<td>ear</td>
<td>
Default goal - see ear:ear
</td>
</tr>
<tr>
<td>ear:ear</td>
<td>
constructs the ear file from the compiled sources
and resources.
</td>
</tr>
<tr>
<td>ear:install</td>
<td>
Installs the generated ear file into the local repository
</td>
</tr>
</table>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ear/xdocs/changes.xml
Index: changes.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Changes</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<release version="1.0" date="2002-08-04">
<action dev="ncoast" type="add">
Initial plugin created
</action>
</release>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ear/xdocs/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Maven Java Plugin">
<title>Maven Ear Plugin</title>
<body>
<links>
<item name="Maven" href="http://jakarta.apache.org/turbine/maven/"/>
<item name="Ear" href="http://java.sun.com/j2ee/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
</menu>
</body>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/ear/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Ear Plug-in</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<section name="Maven Ear Plug-in">
<p>
This plug-in provides your basic facilities for constructing ear files.
</p>
<p>
For more information on the functionality provided by this plugin,
please see the <a href="goals.html">Goals</a> document.
</p>
<p>
For more information on how to customise the functionality provided
by this plugin, please see the <a href="properties.html">properties</a>
document.
</p>
</section>
</body>
</document>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/project.xml
Index: project.xml
===================================================================
<?xml version="1.0"?>
<project>
<version>3</version>
<name>exampleejb</name>
<id>exampleejb</id>
<currentVersion>1.0</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
</organization>
<inceptionYear>2001</inceptionYear>
<package>org.apache.maven</package>
<shortDescription>Project Management Tools</shortDescription>
<!-- Gump integration -->
<gumpRepositoryId>jakarta</gumpRepositoryId>
<description>
</description>
<url>http://jakarta.apache.org/turbine/maven/</url>
<cvsWebUrl>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/</cvsWebUrl>
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/turbine/maven/</siteDirectory>
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
<cvsRoot>:pserver:[EMAIL PROTECTED]:/home/cvspublic</cvsRoot>
<cvsModule>jakarta-turbine-maven</cvsModule>
<distributions>
</distributions>
<branches>
</branches>
<mailingLists>
<mailingList>
</mailingList>
</mailingLists>
<developers>
</developers>
<!-- Need to mark these as compile-time/run-time -->
<dependencies>
<dependency>
<id>commons-logging</id>
<version>1.0.2</version>
<url>http://jakarta.apache.org/commons/logging.html</url>
<properties>
<ejb.manifest.classpath>true</ejb.manifest.classpath>
<ejb.bundle.jar>true</ejb.bundle.jar>
</properties>
</dependency>
<dependency>
<id>ejb</id>
<jar>ejb.jar</jar>
</dependency>
</dependencies>
<build>
<nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<integrationUnitTestSourceDirectory/>
<aspectSourceDirectories>
</aspectSourceDirectories>
<!-- Unit test classes -->
<unitTestPatterns>
<unitTestPattern>include = **/*Test.java</unitTestPattern>
</unitTestPatterns>
<!-- Integration unit test classes -->
<integrationUnitTestPatterns>
</integrationUnitTestPatterns>
<!-- J A R R E S O U R C E S -->
<!-- Resources that are packaged up inside the JAR file -->
<resources>
<includes>
<include>**/*.xml</include>
</includes>
</resources>
<jars>
</jars>
</build>
</project>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/project.properties
Index: project.properties
===================================================================
maven.jarResources.basedir=${pom.build.SourceDirectory}
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<project name="maven" default="maven:jar" basedir=".">
<!-- Give user a chance to override without editing this file
(and without typing -D each time they invoke a target) -->
<!-- Allow any user specific values to override the defaults -->
<property file="${user.home}/build.properties" />
<!-- Allow user defaults for this build -->
<property file="build.properties" />
<!-- Set default values for the project -->
<property file="project.properties" />
<!-- maven:start -->
<!-- ================================================================== -->
<!-- D E L E G A T O R S -->
<!-- ================================================================== -->
<target name="maven:site">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="site"/>
</target>
<target name="maven:dist">
<ant antfile="${maven.home}/plugins/core/build.xml" target="dist"/>
</target>
<target name="maven:env">
<ant antfile="${maven.home}/plugins/core/build.xml" target="env"/>
</target>
<target name="maven:test">
<ant antfile="${maven.home}/plugins/test/build.xml" target="test"/>
</target>
<target name="maven:announce">
<ant antfile="${maven.home}/plugins/core/build.xml" target="announce"/>
</target>
<target name="maven:activity-log">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="activity-log"/>
</target>
<target name="maven:compile">
<ant antfile="${maven.home}/plugins/core/build.xml" target="compile"/>
</target>
<target name="maven:validate-war">
<ant antfile="${maven.home}/plugins/j2ee/build.xml" target="validate-war"/>
</target>
<target name="maven:pdf">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="pdf"/>
</target>
<target name="maven:iutest">
<ant antfile="${maven.home}/plugins/iutest/build.xml" target="iutest"/>
</target>
<target name="maven:deploy-site">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="deploy-site"/>
</target>
<target name="maven:deploy-dist">
<ant antfile="${maven.home}/plugins/core/build.xml" target="deploy-dist"/>
</target>
<target name="maven:war">
<ant antfile="${maven.home}/plugins/j2ee/build.xml" target="war"/>
</target>
<target name="maven:verify-project">
<ant antfile="${maven.home}/plugins/core/build.xml" target="verify-project"/>
</target>
<target name="maven:cvs-change-log">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="cvs-change-log"/>
</target>
<target name="maven:ear">
<ant antfile="${maven.home}/plugins/j2ee/build.xml" target="ear"/>
</target>
<target name="maven:cross-ref">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="cross-ref"/>
</target>
<target name="maven:update-jars">
<ant antfile="${maven.home}/plugins/core/build.xml" target="update-jars"/>
</target>
<target name="maven:validate-pom">
<ant antfile="${maven.home}/plugins/core/build.xml" target="validate-pom"/>
</target>
<target name="maven:install-jar">
<ant antfile="${maven.home}/plugins/core/build.xml" target="install-jar"/>
</target>
<target name="maven:fo">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="fo"/>
</target>
<target name="maven:javadocs">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="javadocs"/>
</target>
<target name="maven:validate-struts-war">
<ant antfile="${maven.home}/plugins/struts/build.xml"
target="validate-struts-war"/>
</target>
<target name="maven:task-list">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="task-list"/>
</target>
<target name="maven:ejb">
<ant antfile="${maven.home}/plugins/j2ee/build.xml" target="ejb"/>
</target>
<target name="maven:docs">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="docs"/>
</target>
<target name="maven:clean">
<ant antfile="${maven.home}/plugins/core/build.xml" target="clean"/>
</target>
<target name="maven:dist-build">
<ant antfile="${maven.home}/plugins/core/build.xml" target="dist-build"/>
</target>
<target name="maven:metrics">
<ant antfile="${maven.home}/plugins/metrics/build.xml" target="metrics"/>
</target>
<target name="maven:docs-quick">
<ant antfile="${maven.home}/plugins/docs/build.xml" target="docs-quick"/>
</target>
<target name="maven:run-singletest">
<ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
</target>
<target name="maven:check-source">
<ant antfile="${maven.home}/plugins/core/build.xml" target="check-source"/>
</target>
<target name="maven:generate-reactor">
<ant antfile="${maven.home}/plugins/reactor/build.xml"
target="generate-reactor"/>
</target>
<target name="maven:jar">
<ant antfile="${maven.home}/plugins/core/build.xml" target="jar"/>
</target>
<target name="maven:maven-update">
<ant antfile="${maven.home}/plugins/core/build.xml" target="maven-update"/>
</target>
<target name="maven:gump-descriptor">
<ant antfile="${maven.home}/plugins/core/build.xml" target="gump-descriptor"/>
</target>
<!-- maven:end -->
</project>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/LICENSE.txt
Index: LICENSE.txt
===================================================================
foo
1.1 jakarta-turbine-maven/src/plugins-build/ejb/xdocs/tasks.xml
Index: tasks.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Tasks</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<section name="Tasks">
<p>
Lists of todos and ideas for future versions.
</p>
<subsection name="1.0">
<p>
<ul>
<li>
utilise the ant ejbjar task to build the ejb jar.
</li>
<li>
Add code for local ejb-jars and client ejb-jars.
</li>
</ul>
</p>
</subsection>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ejb/xdocs/goals.xml
Index: goals.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven EJB Plug-in Goals</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<section name="Goals">
<table>
<tr><th>Goal</th><th>Description</th></tr>
<tr>
<td>ejb</td>
<td>
Default goal - see ejb:ejb
</td>
</tr>
<tr>
<td>ejb:ejb</td>
<td>
constructs the ejb-jar file from the compiled sources
and resources.
</td>
</tr>
<tr>
<td>ejb:install</td>
<td>
Installs the generated ejb-jar file into the local repository
</td>
</tr>
</table>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ejb/xdocs/changes.xml
Index: changes.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Changes</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<release version="1.0" date="2002-08-04">
<action dev="ncoast" type="add">
Initial plugin created
</action>
</release>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ejb/xdocs/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Maven Java Plugin">
<title>Maven EJB Plugin</title>
<body>
<links>
<item name="Maven" href="http://jakarta.apache.org/turbine/maven/"/>
<item name="EJB" href="http://java.sun.com/products/ejb/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
<item name="Tasks" href="/tasks.html" />
</menu>
</body>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/ejb/xdocs/properties.xml
Index: properties.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>Properties</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<section name="ejb jar settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th><th>Default</th></tr>
<tr>
<td>maven.ejb.src</td>
<td>Yes</td>
<td>
Root of files to be included within the ejb-jar. The same directory
structure will be followed within the assembled jar file.
</td>
<td>
src/ejb
</td>
</tr>
<tr>
<td>maven.ejb.manifest</td>
<td>Yes</td>
<td>
Location of the manifest file to be used within the ejb jar file.
</td>
<td>
${maven.ejb.src}/META-INF/MANIFEST.MF
</td>
</tr>
</table>
</section>
<section name="other settings">
<table>
<tr><th>Property</th><th>Description</th><th>See</th></tr>
<tr>
<td>maven.build.dir</td>
<td>where the comonent will be assembled</td>
<td>
<A href="../../../java/target/docs/properties.html#Other
Settings">maven.build.dir</A>
</td>
</tr>
<tr>
<td>maven.final.name</td>
<td>The assembled component will be
<code>${maven.build.dir}/${maven.final.name}.jar</code></td>
<td>
<A href="../../../java/target/docs/properties.html#Other
Settings">maven.final.name</A>
</td>
</tr>
</table>
</section>
<section name="Including Jars in standalone ejb jars">
<p>
You must tell Maven what jars you want included in the ejb. This is
probably only needed if you are building a standalone ejb jar. This
is achieved by specifying meta-information in the POM, using the
following syntax:
</p>
<source><![CDATA[
<dependency>
<id>jarid</id>
<version>jarversion</version>
<properties>
<ejb.bundle.jar>true</ejb.bundle.jar>
</properties>
</dependency>
]]></source>
</section>
<section name="Generating the manifest Class-Path entry">
<p>
To access the classes within other jars (either within the same
ear file or embedded within the same ejbjar), you will need to
use the manifest Class-Path entry. To generate the classpath
for an ejb-jar from the dependencies use this syntax.
</p>
<source><![CDATA[
<dependency>
<id>jarid</id>
<version>jarversion</version>
<properties>
<ejb.manifest.classpath>true</ejb.manifest.classpath>
</properties>
</dependency>
]]></source>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ejb/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven EJB Plug-in</title>
<author email="[EMAIL PROTECTED]">Nathan Coast</author>
</properties>
<body>
<section name="Maven EJB Plug-in">
<p>
This plug-in provides your basic ejb jar facilities.
</p>
<p>
For more information on the functionality provided by this plugin,
please see the <a href="goals.html">Goals</a> document.
</p>
<p>
For more information on how to customise the functionality provided
by this plugin, please see the <a href="properties.html">properties</a>
document.
</p>
<p>
Tasks and todos for future development of this plugin,
please see the <a href="tasks.html">tasks</a> document.
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/ear/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C
T P R O P E R T I E S
#
-------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
1.1 jakarta-turbine-maven/src/plugins-build/ear/plugin.properties
Index: plugin.properties
===================================================================
# -------------------------------------------------------------------
# P L U G I N
P R O P E R T I E S
#
-------------------------------------------------------------------
# ear plugin.
#
-------------------------------------------------------------------
# Location of
additional sources to include in the ear file
maven.ear.src=${maven.src.dir}/application
# Location of xml configs and manifest
files
maven.ear.descriptordir=${maven.ear.src}/META-INF
maven.ear.appxml=${maven.ear.descriptordir}/application.xml
maven.ear.manifest=${maven.ear.descriptordir}/MANIFEST.MF
1.1 jakarta-turbine-maven/src/plugins-build/ear/maven.xml
Index: maven.xml
===================================================================
<project default="plugin"
xmlns:j="jelly:core"
xmlns:m="maven">
<goal
name="plugin">
<j:if test="${sourcesPresent == 'true'}">
<attainGoal name="java:compile"/>
<attainGoal name="test:test"/>
</j:if>
<property name="assemblyDir" value="target/assemblyDir"/>
<mkdir dir="${assemblyDir}"/>
<copy todir="${assemblyDir}">
<fileset dir=".">
<exclude name="target/**"/>
<exclude name="src/**"/>
<exclude name="maven.xml"/>
<exclude name="maven.log"/>
</fileset>
</copy>
<j:if test="${sourcesPresent == 'true'}">
<copy todir="${assemblyDir}">
<fileset dir="target/classes"/>
</copy>
</j:if>
<jar
jarfile="${maven.build.dir}/${maven.final.name}.jar">
<fileset dir="${assemblyDir}"/>
</jar>
<copy
file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.repo.local}/maven/jars"
/>
</goal>
<goal name="plugin:install"
prereqs="plugin"
description="Install the plugin in Maven's plugins dir">
<copy
file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.home}/plugins"
/>
</goal>
<goal name="plugin:deploy"
prereqs="plugin"
description="Install an unpacked version of the plugin">
<mkdir dir="${maven.home}/plugins/${maven.final.name}"/>
<unzip
src="${maven.build.dir}/${maven.final.name}.jar"
dest="${maven.home}/plugins/${maven.final.name}"
/>
</goal>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/ear/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<id>maven-ear-plugin</id>
<name>Maven EAR Plugin</name>
<currentVersion>1.0</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
<logo>http://jakarta.apache.org/turbine/maven/images/jakarta-logo-blue.gif</logo>
</organization>
<inceptionYear>2001</inceptionYear>
<package>org.apache.maven</package>
<logo>http://jakarta.apache.org/turbine/maven/images/maven.jpg</logo>
<description>Ear Plugin for Maven</description>
<shortDescription>War Plugin for Maven</shortDescription>
<url>http://jakarta.apache.org/turbine/maven/reference/plugins/ear/</url>
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/turbine/maven/reference/plugins/ear/</siteDirectory>
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
<repository>
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-turbine-maven/src/plugins-build/ear/</connection>
<url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/src/plugins-build/ear/</url>
</repository>
<versions/>
<branches/>
<mailingLists/>
<developers>
<developer>
<name>Nathan Coast</name>
<id>nathan</id>
<email>[EMAIL PROTECTED]</email>
<organization/>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<dependencies/>
<build>
<nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
<sourceDirectory/>
<unitTestSourceDirectory/>
<!-- Unit test classes -->
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
</build>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/ear/plugin.jelly
Index: plugin.jelly
===================================================================
<?xml version="1.0"?>
<project xmlns:j="jelly:core">
<!--==================================================================-->
<!-- Default goal : Builds a ear file -->
<!--==================================================================-->
<goal name="ear" prereqs="ear:ear" description="Build an ear file"/>
<!--==================================================================-->
<!-- Initializations -->
<!--==================================================================-->
<goal name="ear:init">
</goal>
<!--==================================================================-->
<!-- Builds an ear file -->
<!--==================================================================-->
<goal name="ear:ear" prereqs="ear:init" description="Build an ear file">
<echo>Building EAR ${pom.id} with appxml "${maven.ear.appxml}"</echo>
<mkdir dir="${maven.build.dir}" />
<available property="maven.ear.manifest.available"
file="${maven.ear.manifest}"/>
<ear destfile="${maven.build.dir}/${maven.final.name}.ear"
appxml="${maven.ear.appxml}"
basedir="${maven.ear.src}"
excludes="${maven.ear.appxml}">
<!-- 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.getProjectId()}/jars/">
<include name="${dep.getArtifact()}"/>
</fileset>
</j:if>
</j:forEach>
<!-- include license -->
<metainf dir="${basedir}">
<include name="LICENSE.txt"/>
</metainf>
<j:if test="${maven.ear.manifest.available}">
<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.id}" />
<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>
</ear>
</goal>
<!--==================================================================-->
<!-- Install the ear in the local repository -->
<!--==================================================================-->
<goal name="ear:install"
prereqs="ear:ear"
description="Install the ear in the local repository">
<property name="maven.ear.install.dir"
value="${maven.repo.local}/${pom.id}/ears"/>
<mkdir dir="${maven.ear.install.dir}"/>
<copy file="${maven.build.dir}/${maven.final.name}.ear"
tofile="${maven.ear.install.dir}/${maven.final.name}.ear"/>
</goal>
</project>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/src/java/org/apache/maven/ejb/example/ExampleEJBBean.java
Index: ExampleEJBBean.java
===================================================================
package org.apache.maven.ejb.example;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.ejb.EJBException;
/**
* @author Nathan Coast
*/
public class ExampleEJBBean implements SessionBean{
private SessionContext mSessionContext;
public boolean exampleMethod(){
return true;
}
public void setSessionContext(SessionContext context)
{
mSessionContext = context;
}
public void ejbCreate(){}
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbRemove(){}
}
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/src/java/org/apache/maven/ejb/example/ExampleEJBRemote.java
Index: ExampleEJBRemote.java
===================================================================
package org.apache.maven.ejb.example;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
/**
*/
public interface ExampleEJBRemote
extends EJBObject
{
public boolean exampleMethod()
throws RemoteException;
}
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/src/java/org/apache/maven/ejb/example/really_useful_resource.xml
Index: really_useful_resource.xml
===================================================================
really useful file
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/src/java/org/apache/maven/ejb/example/ExampleEJBHome.java
Index: ExampleEJBHome.java
===================================================================
package org.apache.maven.ejb.example;
import javax.ejb.EJBHome;
import javax.ejb.CreateException;
import java.rmi.RemoteException;
public interface ExampleEJBHome
extends EJBHome
{
public ExampleEJBRemote create() throws CreateException, RemoteException;
}
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/src/ejb/META-INF/ejb-jar.xml
Index: ejb-jar.xml
===================================================================
<?xml version="1.0" ?>
<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Prashant Purkar
(LevelSeas) -->
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<description>reuters ejbs</description>
<display-name>Reuters EJBs</display-name>
<enterprise-beans>
<!-- ********************** Session Bean Example *********************
-->
<session>
<display-name>Example Session Bean</display-name>
<ejb-name>ExampleEJB</ejb-name>
<home>org.apache.maven.ejb.example.ExampleEJBHome</home>
<remote>org.apache.maven.ejb.example.ExampleEJBRemote</remote>
<ejb-class>org.apache.maven.ejb.example.ExampleEJBBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
</assembly-descriptor>
</ejb-jar>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/src/ejb/META-INF/MANIFEST.MF
Index: MANIFEST.MF
===================================================================
mung: beans
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleear-1.0/src/application/META-INF/MANIFEST.MF
Index: MANIFEST.MF
===================================================================
mung: beans
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleear-1.0/src/application/META-INF/application.xml
Index: application.xml
===================================================================
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application
1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>workflow ejb app</display-name>
<module>
<ejb>workflow.jar</ejb>
</module>
<module>
<ejb>business.jar</ejb>
</module>
<module>
<ejb>begin_workflow.jar</ejb>
</module>
</application>
1.1
jakarta-turbine-maven/src/plugins-build/examples/exampleejb-1.0/src/ejb/foo.txt
Index: foo.txt
===================================================================
zfvczxcv
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>