|
Last month I introduced Maven 1.0.2 as a legacy build tool that build engineers should know about because we are often called upon on to support legacy build systems. The maven 1.0.2 genapp option creates a project.xml (shown below) that includes a build section that shows us what should and should not be built.
directive. In this directive there is an include section that shows the source Directory src/java where the java source (to be compiled) is located. The jelly code can be a bit tough to read, but it is also clear that the project.xml also includes a section for unit tests and java sources that should be excluded. <sourceDirectory>src/java</sourceDirectory> <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <unitTest> <includes> <include>**/*Test.java</include> </includes> <excludes>
<exclude>**/NaughtyTest.java</exclude> <?xml version="1.0" encoding="UTF-8"?> <!-- /* * Copyright 2001-2004 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. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -->
<project> <!-- the version of maven's project object model -->
<pomVersion>3</pomVersion> <!-- a unique name for this project -->
<id>cm-application</id> <!-- a short but descriptive name for the project -->
<name>CM Application</name> <!-- The version of the project under development, e.g. 1.1, 1.2, 2.0-SNAPSHOT -->
<currentVersion>1.0</currentVersion> <!-- details about the organization that 'owns' the project -->
<organization> <name>Apache Software Foundation</name> <url>http://www.apache.org/</url> <logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo> </organization> <!-- the year the project started -->
<inceptionYear>2002</inceptionYear> <package>cmc.testapp</package> <logo>http://maven.apache.org/images/maven.jpg</logo> <description>A collection of example projects showing how to use maven in different situations</description> <!-- a short description of what the project does -->
<shortDescription>How to use maven in different situations</shortDescription> <!-- the project home page -->
<url>http://maven.apache.org/reference/plugins/examples/</url> <issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl> <siteAddress>jakarta.apache.org</siteAddress> <siteDirectory>/www/maven.apache.org/reference/plugins/examples/</siteDirectory> <distributionDirectory>/www/maven.apache.org/builds/</distributionDirectory> <!-- the version control repository and http url for online access the connection element has the form: scm:<system>:<system specific connection string> -->
<repository> <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven- plugins/examples</connection> <url>http://cvs.apache.org/viewcvs/maven-plugins/examples/</url> </repository> <!-- any mailing lists for the project -->
<mailingLists/> <!-- who the developers are for the project -->
<developers/> <!-- jar files the project is dependent on -->
<dependencies/> <!-- build information for the project -->
<build> <nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress> <sourceDirectory>src/java</sourceDirectory> <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <unitTest> <includes> <include>**/*Test.java</include> </includes> <excludes> <exclude>**/NaughtyTest.java</exclude> </excludes> </unitTest> <resources> <resource> <directory>src/conf</directory> <includes> <include>*.properties</include> </includes> </resource> </resources> </build> </project>
You will also find a project.properties file. As noted on the Maven Apache website (http://maven.apache.org/maven-1.x/reference/properties.html) which is used to set defaults values for properties. There are other properties files that can be used as well.
maven.xdoc.date=left ## maven.xdoc.version=${pom.currentVersion}
Bob Aiello is the Editor-in-Chief for CM Crossroads and an independent consultant specializing in Software Process Improvement including Software Configuration and Release Management. Mr. Aiello has over 25 years experience as a technical manager in several top NYC Financial Services firms where he had had company-wide responsibility for CM, often providing hands-on technical support for enterprise Source Code Management tools, SOX/Cobit compliance, build engineering, continuous integration and automated application deployment. Bob is a long standing member of the Steering Committee of the NYC Software Process Improvement Network (CitySPIN), where he serves as the chair of the CM SIG. Mr. Aiello holds a Masters in Industrial Psychology from NYU and a B.S. in Computer Science and Math from
Set as favorite
Bookmark
Email this
Hits: 3837 Trackback(0)Comments (0)
|
| Last Updated on Friday, 06 June 2008 04:22 |




