You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2004/07/10 03:24:24 UTC
cvs commit: maven/xdocs/ant-guide/qna help.xml antfarming.xml hooks.xml
brett 2004/07/09 18:24:24
Modified: xdocs Tag: MAVEN-1_0-BRANCH navigation-pdf.xml
navigation.xml
xdocs/ant-guide Tag: MAVEN-1_0-BRANCH practical.xml
xdocs/ant-guide/qna Tag: MAVEN-1_0-BRANCH antfarming.xml
hooks.xml
Added: xdocs/ant-guide/qna Tag: MAVEN-1_0-BRANCH help.xml
Log:
more doco
Revision Changes Path
No revision
No revision
1.1.2.8 +1 -0 maven/xdocs/navigation-pdf.xml
Index: navigation-pdf.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/navigation-pdf.xml,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- navigation-pdf.xml 8 Jul 2004 11:56:05 -0000 1.1.2.7
+++ navigation-pdf.xml 10 Jul 2004 01:24:24 -0000 1.1.2.8
@@ -52,6 +52,7 @@
<item name="Maven Speed" href="/ant-guide/qna/speed.html"/>
<item name="Dependencies" href="/ant-guide/qna/hooks.html"/>
<item name="Ant Targets" href="/ant-guide/qna/antfarming.html"/>
+ <item name="Project Help" href="/ant-guide/qna/help.html"/>
<item name="Properties" href="/ant-guide/qna/properties.html"/>
</item>
</item>
1.33.4.10 +1 -0 maven/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/navigation.xml,v
retrieving revision 1.33.4.9
retrieving revision 1.33.4.10
diff -u -r1.33.4.9 -r1.33.4.10
--- navigation.xml 8 Jul 2004 11:56:05 -0000 1.33.4.9
+++ navigation.xml 10 Jul 2004 01:24:24 -0000 1.33.4.10
@@ -59,6 +59,7 @@
<item name="Maven Speed" href="/ant-guide/qna/speed.html"/>
<item name="Dependencies" href="/ant-guide/qna/hooks.html"/>
<item name="Ant Targets" href="/ant-guide/qna/antfarming.html"/>
+ <item name="Project Help" href="/ant-guide/qna/help.html"/>
<item name="Properties" href="/ant-guide/qna/properties.html"/>
</item>
</item>
No revision
No revision
1.2.6.3 +1 -0 maven/xdocs/ant-guide/practical.xml
Index: practical.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/ant-guide/practical.xml,v
retrieving revision 1.2.6.2
retrieving revision 1.2.6.3
diff -u -r1.2.6.2 -r1.2.6.3
--- practical.xml 8 Jul 2004 11:56:05 -0000 1.2.6.2
+++ practical.xml 10 Jul 2004 01:24:24 -0000 1.2.6.3
@@ -39,6 +39,7 @@
<li><a href="qna/speed.html">Ant is sooo much faster than this sluggish Maven</a></li>
<li><a href="qna/hooks.html">Using hooks to make extra things happen before / after a goal</a></li>
<li><a href="qna/antfarming.html">Using Ant build targets while you're converting over to Maven</a></li>
+ <li><a href="qna/help.html">Getting help on a project</a></li>
<li><a href="qna/properties.html">Expanding properties in a file</a></li>
</ul>
</p>
No revision
No revision
1.1.2.3 +21 -1 maven/xdocs/ant-guide/qna/Attic/antfarming.xml
Index: antfarming.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/ant-guide/qna/Attic/antfarming.xml,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- antfarming.xml 10 Jul 2004 01:11:56 -0000 1.1.2.2
+++ antfarming.xml 10 Jul 2004 01:24:24 -0000 1.1.2.3
@@ -46,7 +46,27 @@
<ant:ant dir="${basedir}" antfile="build.xml" />
</goal>
</project>]]></source>
- <p>You could then run <code>maven do-ant-bit</code> to </p>
+ <p>
+ You could then run <code>maven do-ant-bit</code> to run the old ant script. Ok, so this isn't that useful yet,
+ but it can be used in conjunction with <a href="hooks.html">goal dependencies</a> to start merging an old Ant
+ and new Maven build.
+ </p>
+ <p>
+ For example, consider you are now building your site with Maven. However you have an old part of your Ant build
+ that generated a few HTML pages that you want copied with the site. Here is a possible solution.
+ </p>
+<source><![CDATA[
+<project xmlns:ant="jelly:ant">
+ <preGoal name="site">
+ <!-- Set the property html.dir that your Ant build expected to be able to put the HTML into -->
+ <ant:property name="html.dir" value="${maven.docs.dest}" />
+ <ant:ant dir="${basedir}" antfile="build.xml" target="generate-html" />
+ </preGoal>
+</project>]]></source>
+ <p>
+ Future steps of integration would be to start importing those small Ant fragments into your maven.xml, or
+ for larger tasks make them reusable and create a Maven plugin that will be available to all your projects.
+ </p>
</section>
</body>
1.1.2.2 +27 -0 maven/xdocs/ant-guide/qna/Attic/hooks.xml
Index: hooks.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/ant-guide/qna/Attic/hooks.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- hooks.xml 8 Jul 2004 11:56:06 -0000 1.1.2.1
+++ hooks.xml 10 Jul 2004 01:24:24 -0000 1.1.2.2
@@ -28,7 +28,34 @@
<body>
<section name="Customising goals">
<p>
+ Customising existing Maven goals is quite simple as long as you know where to hook in to.
+ As an example, let's consider you want to generate some resources and have them placed into the
+ produced JAR file.
</p>
+ <p>
+ <b>Note:</b> Generally resources should be specified in the <code><build>/<resources></code>
+ section of the <code>project.xml</code> file. However, if they are generated as part of the build, you
+ will want to copy them to the destination yourself.
+ </p>
+ <p>
+ So, here is a sample <code>maven.xml</code> file that demonstrates how this would be achieved:
+ </p>
+<source><![CDATA[<project xmlns:ant="jelly:ant">
+ <!-- The java:jar-resources goal copies resources into target/classes so that they are included in the JAR at / -->
+ <postGoal name="java:jar-resources">
+ <attainGoal name="generate-dynamic-resources" />
+ <!-- maven.build.dest is the location where resources are put -->
+ <ant:copy todir="${maven.build.dest}">
+ <ant:fileset dir="${maven.build.dir}/generated-resources" />
+ </ant:copy>
+ </postGoal>
+
+ <!-- Here is the goal you've defined to generate the resources in some fashion -->
+ <goal name="generate-dynamic-resources">
+ <!-- Place them into ${maven.build.dir}/generated-resources according to the fragment above -->
+ ...
+ </goal>
+</project>]]></source>
</section>
</body>
No revision
Index: hooks.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/ant-guide/qna/Attic/hooks.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- hooks.xml 8 Jul 2004 11:56:06 -0000 1.1.2.1
+++ hooks.xml 10 Jul 2004 01:24:24 -0000 1.1.2.2
@@ -28,7 +28,34 @@
<body>
<section name="Customising goals">
<p>
+ Customising existing Maven goals is quite simple as long as you know where to hook in to.
+ As an example, let's consider you want to generate some resources and have them placed into the
+ produced JAR file.
</p>
+ <p>
+ <b>Note:</b> Generally resources should be specified in the <code><build>/<resources></code>
+ section of the <code>project.xml</code> file. However, if they are generated as part of the build, you
+ will want to copy them to the destination yourself.
+ </p>
+ <p>
+ So, here is a sample <code>maven.xml</code> file that demonstrates how this would be achieved:
+ </p>
+<source><![CDATA[<project xmlns:ant="jelly:ant">
+ <!-- The java:jar-resources goal copies resources into target/classes so that they are included in the JAR at / -->
+ <postGoal name="java:jar-resources">
+ <attainGoal name="generate-dynamic-resources" />
+ <!-- maven.build.dest is the location where resources are put -->
+ <ant:copy todir="${maven.build.dest}">
+ <ant:fileset dir="${maven.build.dir}/generated-resources" />
+ </ant:copy>
+ </postGoal>
+
+ <!-- Here is the goal you've defined to generate the resources in some fashion -->
+ <goal name="generate-dynamic-resources">
+ <!-- Place them into ${maven.build.dir}/generated-resources according to the fragment above -->
+ ...
+ </goal>
+</project>]]></source>
</section>
</body>
No revision
Index: hooks.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/ant-guide/qna/Attic/hooks.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- hooks.xml 8 Jul 2004 11:56:06 -0000 1.1.2.1
+++ hooks.xml 10 Jul 2004 01:24:24 -0000 1.1.2.2
@@ -28,7 +28,34 @@
<body>
<section name="Customising goals">
<p>
+ Customising existing Maven goals is quite simple as long as you know where to hook in to.
+ As an example, let's consider you want to generate some resources and have them placed into the
+ produced JAR file.
</p>
+ <p>
+ <b>Note:</b> Generally resources should be specified in the <code><build>/<resources></code>
+ section of the <code>project.xml</code> file. However, if they are generated as part of the build, you
+ will want to copy them to the destination yourself.
+ </p>
+ <p>
+ So, here is a sample <code>maven.xml</code> file that demonstrates how this would be achieved:
+ </p>
+<source><![CDATA[<project xmlns:ant="jelly:ant">
+ <!-- The java:jar-resources goal copies resources into target/classes so that they are included in the JAR at / -->
+ <postGoal name="java:jar-resources">
+ <attainGoal name="generate-dynamic-resources" />
+ <!-- maven.build.dest is the location where resources are put -->
+ <ant:copy todir="${maven.build.dest}">
+ <ant:fileset dir="${maven.build.dir}/generated-resources" />
+ </ant:copy>
+ </postGoal>
+
+ <!-- Here is the goal you've defined to generate the resources in some fashion -->
+ <goal name="generate-dynamic-resources">
+ <!-- Place them into ${maven.build.dir}/generated-resources according to the fragment above -->
+ ...
+ </goal>
+</project>]]></source>
</section>
</body>
1.1.2.1 +109 -0 maven/xdocs/ant-guide/qna/Attic/help.xml
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org