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/04 07:21:04 UTC
svn commit: r156136 - in maven/maven-1/core/trunk/xdocs/using:
bestpractices.xml site.xml tests.xml
Author: brett
Date: Thu Mar 3 22:21:00 2005
New Revision: 156136
URL: http://svn.apache.org/viewcvs?view=rev&rev=156136
Log:
some smaller changes
Modified:
maven/maven-1/core/trunk/xdocs/using/bestpractices.xml
maven/maven-1/core/trunk/xdocs/using/site.xml
maven/maven-1/core/trunk/xdocs/using/tests.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=156135&r2=156136
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/bestpractices.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/bestpractices.xml Thu Mar 3 22:21:00 2005
@@ -203,6 +203,28 @@
reduce the need for this.
</p>
</subsection>
+ <subsection name="Refactor Your Build">
+ <p>
+ You will find that it is much easier to work with Maven when projects are simple and independent. This kind
+ of loosely coupled structuring is often recommended for source code, so it makes sense to apply the same
+ thought process to the structure of your build.
+ </p>
+ <p>
+ Don't be afraid to split an artifact in two if it is becoming complicated to maintain the build.
+ </p>
+ <p>
+ Some specific examples:
+ </p>
+ <ul>
+ <li>If you have some sets of integration or functional tests that rely on the artifact being fully packaged
+ and have a large amount of configuration and/or code of their own, consider putting them in a separate
+ project that depends on the main artifact.</li>
+ <li>If you need to share test code among different projects, put that test code in its own artifact (this time
+ included in the main source tree) and depend on that artifact for your tests in other projects.</li>
+ <li>If you are generating a large amount of code, you may find it helpful to keep the generated code in an
+ artifact of its own, and depend on that from your other projects.</li>
+ </ul>
+ </subsection>
</section>
</body>
</document>
Modified: maven/maven-1/core/trunk/xdocs/using/site.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/using/site.xml?view=diff&r1=156135&r2=156136
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/site.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/site.xml Thu Mar 3 22:21:00 2005
@@ -44,7 +44,7 @@
<section name="Adding Documents to the Site">
<subsection name="Creating a Site Descriptor">
<p>
- To add documents tto the site, first you will need to add them to the navigation so that they can be found.
+ To add documents to the site, first you will need to add them to the navigation so that they can be found.
</p>
<p>
To do this, create a <code>navigation.xml</code> file in the <code>xdocs</code> directory that contains the
Modified: maven/maven-1/core/trunk/xdocs/using/tests.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/using/tests.xml?view=diff&r1=156135&r2=156136
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/tests.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/tests.xml Thu Mar 3 22:21:00 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.
@@ -22,80 +22,22 @@
<properties>
<title>Site Navigation</title>
<author email="bwalding@apache.org">Ben Walding</author>
+ <author email="brett@apache.org">Brett Porter</author>
</properties>
<body>
+ <section name="Unit Testing">
+ <p>
+ The Maven team believes that unit testing can be a very useful tool in improving the quality of software, in
+ particular to enforce a loosely coupled design and to give the ability to regression test the code over time.
+ For this reason, unit test support (provided by JUnit in Java) is included out of the box, and an integral
+ part of the build process.
+ </p>
+ </section>
<!-- TODO: belongs more in test plugin? (NOT LINKED IN)
+ - link to best practices
<section name="Testing">
-
- <!- - TODO: Change this section into a demonstratino of the resources element in general - ->
-
- <subsection name="Test Resources">
- <p>
- It is a fairly common occurrence that you want to include some resources in your
- test classpath for testing purposes. Maven allows you include any arbitrary set of
- resources for testing by utilizing the project/build/unitTest/resources element in your POMs.
- </p>
-
- <p>
- The following example demonstrates how to recursively include all files with an 'xml'
- or 'properties' extension within the ${basedir}/src/test directory:
- </p>
-
-<source><![CDATA[
-<project>
- ...
- <build>
- ...
- <unitTest>
- ...
- <resources>
- <resource>
- <directory>${basedir}/src/test</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- </includes>
- </resource>
- </resources>
- </unitTest>
- </build>
-</project>
-]]></source>
-
- <p>
- The following example demonstrates how to recursively include all files with an 'xml'
- or 'properties' extension within the ${basedir}/src/test directory and exclude the
- naughty.properties file. Note the addition of the project/build/unitTest/resources/excludes
- element:
- </p>
-
-<source><![CDATA[
- <project>
- ...
- <build>
- ...
- <unitTest>
- ...
- <resources>
- <resource>
- <directory>${basedir}/src/test</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- </includes>
- <excludes>
- <exclude>naughty.properties</exclude>
- </excludes>
- </resource>
- </resources>
- </unitTest>
- </build>
- </project>
-]]></source>
-
- </subsection>
<subsection name="Running a Single Test">
<p>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org