git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114791 13f79535-47bb-0310-9956-ffa450edef68
112 lines
3.2 KiB
XML
112 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
/*
|
|
* 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.
|
|
*/
|
|
-->
|
|
|
|
<document>
|
|
|
|
<properties>
|
|
<title>Maven Examples</title>
|
|
<author email="dion@multitask.com.au">dIon Gillard</author>
|
|
</properties>
|
|
|
|
<body>
|
|
<section name="Maven Examples">
|
|
<p>
|
|
This plug-in provides examples of using maven for various types of
|
|
projects
|
|
</p>
|
|
<p>
|
|
The following samples are provided:
|
|
<ul>
|
|
<li>
|
|
<a href="#Simple Java Example">A Simple Java Example</a>
|
|
</li>
|
|
<li>
|
|
<a href="#Simple WebApp Example">A Simple Web Application Example</a>
|
|
</li>
|
|
<li>
|
|
<a href="#Example Ear">A Simple Enterprise Application Example</a>
|
|
</li>
|
|
<li>
|
|
<a href="#Example EJB">A Simple EJB Jar Example</a>
|
|
</li>
|
|
<li>
|
|
<a href="#Plugin Script">A Maven plugin which uses a scripting language like BeanShell</a>
|
|
</li>
|
|
</ul>
|
|
</p>
|
|
</section>
|
|
|
|
<section name="Simple Java Example">
|
|
<p>
|
|
This example project shows how easy it is to 'Mavenize' a set of
|
|
Java classes that are built into a jar file.
|
|
</p>
|
|
<p>
|
|
You can find this example in your
|
|
<code>${maven.home}/plugins/maven-examples-plugin-1.0/simple-java</code>
|
|
directory.
|
|
</p>
|
|
<p>
|
|
It consists of
|
|
<ul>
|
|
<li>A single java source file:
|
|
<code>src/java/org/apache/maven/examples/simplejava/SimpleJava.java</code>
|
|
</li>
|
|
<li>and a Maven project definition, <code>project.xml</code></li>
|
|
</ul>
|
|
</p>
|
|
<p>
|
|
With just the addition of the Maven project.xml file, the wide array
|
|
of built-in maven functionality is now available for use in this
|
|
project.
|
|
</p>
|
|
<p>
|
|
Maven packages its functionality as <code>plugins</code>
|
|
and each plugin adds one or more <code>goals</code> that may be
|
|
executed. For example, the <code>java</code> plugin provides a
|
|
<code>jar</code> goal for compiling code and bundling it into a
|
|
jar file.
|
|
</p>
|
|
<p>
|
|
To build the java code into a jar, type the following from the
|
|
command prompt:
|
|
</p>
|
|
<source>
|
|
maven jar
|
|
</source>
|
|
</section>
|
|
|
|
<section name="Simple WebApp Example">
|
|
<p>Under construction</p>
|
|
</section>
|
|
|
|
<section name="Example Ear">
|
|
<p>Under construction</p>
|
|
</section>
|
|
|
|
<section name="Example EJB">
|
|
<p>Under construction</p>
|
|
</section>
|
|
|
|
<section name="Plugin Script">
|
|
<p>Under construction</p>
|
|
</section>
|
|
</body>
|
|
</document>
|