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 2005/03/02 13:44:25 UTC

svn commit: r155912 - in maven/maven-1/core/trunk/xdocs: reference/scripting.xml using/bestpractices.xml using/customising.xml using/resources.xml

Author: brett
Date: Wed Mar  2 04:44:22 2005
New Revision: 155912

URL: http://svn.apache.org/viewcvs?view=rev&rev=155912
Log:
scripting and customisation

Modified:
    maven/maven-1/core/trunk/xdocs/reference/scripting.xml
    maven/maven-1/core/trunk/xdocs/using/bestpractices.xml
    maven/maven-1/core/trunk/xdocs/using/customising.xml
    maven/maven-1/core/trunk/xdocs/using/resources.xml

Modified: maven/maven-1/core/trunk/xdocs/reference/scripting.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/reference/scripting.xml?view=diff&r1=155911&r2=155912
==============================================================================
--- maven/maven-1/core/trunk/xdocs/reference/scripting.xml (original)
+++ maven/maven-1/core/trunk/xdocs/reference/scripting.xml Wed Mar  2 04:44:22 2005
@@ -52,6 +52,7 @@
         <item name="Ant"                          href="http://ant.apache.org/"/>
         <item name="Jelly"                        href="http://jakarta.apache.org/commons/jelly/"/>
         <item name="Jelly Tag Libraries"          href="http://jakarta.apache.org/commons/jelly/tags.html"/>
+        <item name="Jexl"                        href="http://jakarta.apache.org/commons/jexl/"/>
 
     <section name="maven.xml">
       <p>
@@ -70,7 +71,7 @@
       </p>
       <p>
         The <code>goal</code> functionality Maven uses is provided by the
-        <code>werkz</code> tag library that is built into werkz. For more information, see this 
+        <code>werkz</code> tag library that is built into werkz. For more information, see this
         <a href="http://wiki.codehaus.org/maven/WerkzTagDocumentation">wiki page</a>.
       </p>
       <subsection name="Sample maven.xml">

Modified: maven/maven-1/core/trunk/xdocs/using/bestpractices.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/using/bestpractices.xml?view=diff&r1=155911&r2=155912
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/bestpractices.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/bestpractices.xml Wed Mar  2 04:44:22 2005
@@ -32,6 +32,16 @@
         detailed here.
       </p>
       <!-- TODO: more to come -->
+      <subsection name="Reproduciblity">
+        <p>
+          <!-- TODO! -->
+        </p>
+      </subsection>
+      <subsection name="Properties">
+        <p>
+          <!-- TODO! -->
+        </p>
+      </subsection>
       <subsection name="Scripting">
         <p>
           Try to minimise the amount of scripting done. Those familiar with Ant will often put a lot of Ant tasks into

Modified: maven/maven-1/core/trunk/xdocs/using/customising.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/using/customising.xml?view=diff&r1=155911&r2=155912
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/customising.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/customising.xml Wed Mar  2 04:44:22 2005
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,10 +27,82 @@
   <body>
     <section name="Customising Maven">
       <p>
-        
+        Earlier in the User's Guide, you've seen how to configure a <code>project.xml</code> to build various different
+        types of projects.
       </p>
-  <!-- TODO: write about properties, maven.xml -->
-      <p>...</p>
+      <p>
+        In addition to customising the build through the project model, additional properties can be set, and scripting
+        can be used to define custom goals, or enhance the workflow during the build.
+      </p>
+      <subsection name="Extending the Build with Properties">
+        <p>
+          There are two sets of properties: a small set of <a href="../reference/properties.html">standard properties</a>
+          that are fundamental to the operation of Maven, and can be changed to customise for your particular
+          environment or change the basic structure Maven uses for a project.
+        </p>
+        <p>
+          This properties reference above also explains the order in which properties files are loaded, and the reasons
+          to use each.
+        </p>
+        <p>
+          The majority of properties in Maven are the plugin properties. These can be used to customise any aspect of
+          the build process.
+        </p>
+        <p>
+          For example, if you are looking to change the way java sources are compiled, you can see the reference for the
+          <a href="../reference/plugins/java/properties.html">Java plugin properties</a>. This allows you to set
+          properties such as the <code>-target</code> setting, and whether to see deprecations. These can be added to
+          <code>project.properties</code> for all builders of your project:
+        </p>
+        <source>maven.compile.target=1.1
+maven.compile.deprecation=on</source>
+        <p>
+          While several of the most helpful properties are explained in the guides on this site, there is
+          a full list of plugins available on the <a href="../reference/plugins/">Plugins Reference</a> mini-site.
+          From there, you can navigate to the plugin you are interested in (which matches the first part of the goal
+          name you are calling and wanting to configure), and on to its list of available properties.
+        </p>
+        <p>
+          Note that while properties are essential to configuring Maven and it's plugins, they can also be a source of
+          bad practices. See the <a href="bestpractices.html#Properties">Best Practices</a> guide for more information.
+        </p>
+      </subsection>
+      <subsection name="Scripting Maven">
+        <p>
+          If the provided plugins do not give all the flexibility needed to do the required tasks, you can add scripting
+          to your project to go the last steps.
+        </p>
+        <p>
+          There are two ways to add additional goals and hooks to your project - through <code>maven.xml</code>, and by
+          writing your own plugin. It is generally recommended to write your own plugin for any significant scripting
+          effort as it will make it reusable across projects, separated, and allows you to use Java code as well as basic
+          Jelly script.
+        </p>
+        <p>
+          The <code>maven.xml</code> file is tied to the <code>project.xml</code> file in the same directory, in the
+          same way as <code>project.properties</code> is. This means that it is loaded and its goals processed whenever
+          your project is, and also means that it is inherited from any projects you extend.
+        </p>
+        <p>
+          The format of <code>maven.xml</code> is typically like this:
+        </p>
+        <source><![CDATA[<project default="jar:jar" xmlns:j="jelly:core">
+ ...
+</project>]]></source>
+        <p>
+          The <code>project</code> element is the root element, and can specify a default goal name for the project.
+          The namespace definitions are used by Jelly to import tag libraries.
+        </p>
+        <p>
+          For more information on scripting in general, please see the
+          <a href="../reference/scripting.html">Scripting</a> reference. For particular information on building plugins,
+          see <a href="developing-plugins.html">Developing Plugins</a> in this User's Guide.
+        </p>
+        <p>
+          As with properties, there are also some <a href="bestpractices.html#Scripting">best practices</a> to adhere
+          to with regards to scripting Maven to ensure the build is maintainable.
+        </p>
+      </subsection>
     </section>
   </body>
 </document>

Modified: maven/maven-1/core/trunk/xdocs/using/resources.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/using/resources.xml?view=diff&r1=155911&r2=155912
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/resources.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/resources.xml Wed Mar  2 04:44:22 2005
@@ -91,7 +91,7 @@
 </preGoal>]]></source>
       <p>
         Note however that filters may cause issues with keeping a single build reproducible. Please see the
-        <a href="bestpractices.html#reproducible">Best Practices</a> document for more information.
+        <a href="bestpractices.html#Reproduciblity">Best Practices</a> document for more information.
       </p>
     </section>
   </body>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org