You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2002/02/23 05:01:49 UTC
cvs commit: jakarta-turbine-maven/src/templates/build Control.vm build.xml test.sh
jvanzyl 02/02/22 20:01:49
Modified: . NOTES build-bootstrap.xml
src/templates/build Control.vm build.xml
Removed: . build-bootstrap.sh
src/templates/build test.sh
Log:
- cleaning up the bootstrap (thanks to dan for the pointer :-))
- added the use of the genjar task so everything maven needs can be bundled
up into a single jar. it's still big. we'll trim it down though :-)
you will need to get genjar.jar from the site
- also enforce the use of lib.repo by creating a classpath for the
maven jar in the build.xml file so that people don't have to put
the maven.jar in the ANT_LIB/home.
Revision Changes Path
1.6 +19 -0 jakarta-turbine-maven/NOTES
Index: NOTES
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/NOTES,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NOTES 22 Feb 2002 23:45:17 -0000 1.5
+++ NOTES 23 Feb 2002 04:01:48 -0000 1.6
@@ -1,3 +1,22 @@
+bootstrap:
+needs to parse the maven project descriptor which is used to generate
+the build system. so we'll bootstrap the build of all of maven using
+the build-bootstrap.xml.
+
+this produces the classes in /work
+
+then we make a big fat jar with everything that maven needs using the
+make-fat-jar.sh
+
+copy the fat jar into the ANT_HOME/lib directory and run ant to see
+if maven can build with itself
+
+remove the maven jar from ANT_HOME/lib until it's ready for real.
+
+---
+. have to figure out the structure for a jar repository and the naming
+ conventions.
+
. separate the test inputs from the test classes, makes the include/exclude
patterns much easier to deal with
1.6 +98 -5 jakarta-turbine-maven/build-bootstrap.xml
Index: build-bootstrap.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/build-bootstrap.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- build-bootstrap.xml 22 Feb 2002 03:47:15 -0000 1.5
+++ build-bootstrap.xml 23 Feb 2002 04:01:48 -0000 1.6
@@ -1,35 +1,128 @@
<?xml version="1.0"?>
+<!--
+
+. check and make sure ${lib.repo} has been defined
+
+-->
+
<project name="Maven" default="generate-build" basedir=".">
<!-- Allow any user specific values to override the defaults -->
<property file="${user.home}/build.properties" />
+ <property name="work.dir" value="work"/>
+
+ <path id="classpath">
+ <pathelement location="${lib.repo}/dom4j-1.1.jar"/>
+ <pathelement location="${lib.repo}/commons-util-0.1-dev.jar"/>
+ <pathelement location="${lib.repo}/commons-beanutils.jar"/>
+ <pathelement location="${lib.repo}/commons-collections.jar"/>
+ <pathelement location="${lib.repo}/commons-graph.jar"/>
+ <pathelement location="${lib.repo}/log4j-1.1.3.jar"/>
+ <pathelement location="${lib.repo}/stratum-0.1-dev.jar"/>
+ <pathelement location="${lib.repo}/velocity-1.3-dev.jar"/>
+ <pathelement location="${lib.repo}/bcel.jar"/>
+ <pathelement location="${lib.repo}/oro.jar"/>
+ <pathelement location="${lib.repo}/gnu-regexp-1.1.4.jar"/>
+ <pathelement location="${lib.repo}/genjar.jar"/>
+ <pathelement location="${work.dir}"/>
+ </path>
+
<!-- ================================================================== -->
<!-- G E N E R A T E B U I L D S Y S T E M -->
<!-- ================================================================== -->
<target
name="generate-build">
-
- <mkdir dir="work"/>
+ <delete dir="${work.dir}"/>
+ <mkdir dir="${work.dir}"/>
+
+ <javac
+ srcdir="src/java"
+ destdir="${work.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}">
+ <classpath refid="classpath"/>
+ </javac>
+
<taskdef
name="create-build-system"
classname="org.apache.maven.build.BaseProjectTask">
+ <classpath refid="classpath"/>
</taskdef>
<create-build-system
controlTemplate="Control.vm"
- outputDirectory="./work"
+ outputDirectory="${work.dir}"
templatePath="src/templates/build"
outputFile="bootstrap.report"
projectDescriptor="project-maven.xml"
/>
+ <taskdef
+ name="genjar"
+ classname="org.apache.tools.ant.taskdefs.optional.genjar.GenJar">
+ <classpath refid="classpath"/>
+ </taskdef>
+
+ <genjar
+ jarfile="${work.dir}/maven.jar">
+ <class name="org.apache.maven.Reactor"/>
+ <class name="org.apache.maven.build.BaseProjectTask"/>
+ <class name="org.apache.maven.build.ProjectProperties"/>
+ <!-- The project classes have to be all list, dynamic loading -->
+ <class name="org.apache.maven.project.BaseObject"/>
+ <class name="org.apache.maven.project.Build"/>
+ <class name="org.apache.maven.project.Dependency"/>
+ <class name="org.apache.maven.project.Developer"/>
+ <class name="org.apache.maven.project.Jar"/>
+ <class name="org.apache.maven.project.MailingList"/>
+ <class name="org.apache.maven.project.Profile"/>
+ <class name="org.apache.maven.project.Project"/>
+ <class name="org.apache.maven.project.Repository"/>
+ <class name="org.apache.maven.project.Target"/>
+ <class name="org.apache.maven.project.Workspace"/>
+
+ <classfilter>
+ <include name="org.apache.stratum."/>
+ <include name="org.apache.commons."/>
+ <include name="org.apache.log4j."/>
+ <include name="org.apache.velocity."/>
+ <include name="org.apache.bcel."/>
+ <include name="org.apache.oro."/>
+ <exclude name="org.apache.log."/>
+ </classfilter>
+ <!-- The GenJar task doesn't accept a classpath refid
+ so I have to dupe the list here. I will fix.
+ -->
+ <classpath>
+ <pathelement location="${lib.repo}/dom4j-1.1.jar"/>
+ <pathelement location="${lib.repo}/commons-util-0.1-dev.jar"/>
+ <pathelement location="${lib.repo}/commons-beanutils.jar"/>
+ <pathelement location="${lib.repo}/commons-collections.jar"/>
+ <pathelement location="${lib.repo}/commons-graph.jar"/>
+ <pathelement location="${lib.repo}/log4j-1.1.3.jar"/>
+ <pathelement location="${lib.repo}/stratum-0.1-dev.jar"/>
+ <pathelement location="${lib.repo}/velocity-1.3-dev.jar"/>
+ <pathelement location="${lib.repo}/bcel.jar"/>
+ <pathelement location="${lib.repo}/oro.jar"/>
+ <pathelement location="${lib.repo}/gnu-regexp-1.1.4.jar"/>
+ <pathelement location="${work.dir}"/>
+ </classpath>
+ </genjar>
+
<copy tofile="work/project.xml" file="project-maven.xml"/>
- <chmod file="work/test.sh" perm="+x"/>
- <copy todir="work">
+
+ <chmod perm="+x">
+ <fileset dir="${work.dir}">
+ <include name="*.sh"/>
+ </fileset>
+ </chmod>
+
+ <copy todir="${work.dir}">
<fileset dir=".">
<include name="src/**"/>
</fileset>
1.5 +1 -1 jakarta-turbine-maven/src/templates/build/Control.vm
Index: Control.vm
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/Control.vm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Control.vm 23 Feb 2002 00:49:24 -0000 1.4
+++ Control.vm 23 Feb 2002 04:01:49 -0000 1.5
@@ -1,4 +1,4 @@
-#set ($buildElements = ["build-docs.xml","build-test.xml","build.xml","default.properties","LICENSE","README.txt","build-maven-jar.sh","maven-in-ant-home.sh","maven-out-ant-home.sh"])
+#set ($buildElements = ["build-docs.xml","build-test.xml","build.xml","default.properties","LICENSE","README.txt"])
$project
$project.name
1.9 +6 -0 jakarta-turbine-maven/src/templates/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- build.xml 23 Feb 2002 00:49:24 -0000 1.8
+++ build.xml 23 Feb 2002 04:01:49 -0000 1.9
@@ -14,6 +14,10 @@
<!-- Set default values for the build -->
<property file="default.properties" />
+ <path id="maven-classpath">
+ <pathelement location="${lib.repo}/maven.jar"/>
+ </path>
+
<!-- ================================================================== -->
<!-- I N I T I A L I Z E -->
<!-- ================================================================== -->
@@ -33,6 +37,7 @@
<taskdef
name="project-properties"
classname="org.apache.maven.build.ProjectProperties">
+ <classpath refid="maven-classpath"/>
</taskdef>
<!-- This task will create the 'classpath' and 'src.set'
@@ -78,6 +83,7 @@
<taskdef
name="httpget"
className="org.apache.tdk.task.Get">
+ <classpath refid="maven-classpath"/>
</taskdef>
</target>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>