mirror of https://github.com/apache/maven.git
moved to ../archetype/trunk
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@330434 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fc3646e539
commit
c566d0e396
|
@ -1,85 +0,0 @@
|
||||||
<archetype>
|
|
||||||
<id>quickstart</id>
|
|
||||||
<fileSets>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
o filtering
|
|
||||||
o arbitrary directories even if it to make the job easier internally. we
|
|
||||||
really don't want people making any sort of directory structure they
|
|
||||||
want.
|
|
||||||
o a tool to create archetypes easily
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<id>maven-archetype-plugin</id>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>bundle</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<configuration>
|
|
||||||
|
|
||||||
How do we want to configure this?
|
|
||||||
|
|
||||||
o directory tree of archetypes?
|
|
||||||
o one archetype per project?
|
|
||||||
|
|
||||||
<descriptor>src/main/archetype/archetype.xml</descriptor>
|
|
||||||
</configuration>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
|
|
||||||
o need to specify parameters and metadata about parameters
|
|
||||||
- pluggable validation type/group
|
|
||||||
- localized descriptions
|
|
||||||
|
|
||||||
o any ideas to take from the IDEA template mechanism that uses velocity
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Project application sources -->
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/main/java</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</fileSet>
|
|
||||||
|
|
||||||
<!-- Project application resources -->
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</fileSet>
|
|
||||||
|
|
||||||
<!-- Project test sources -->
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/test/java</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</fileSet>
|
|
||||||
|
|
||||||
<!-- Project test resources -->
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/test/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</fileSet>
|
|
||||||
|
|
||||||
<!-- Project site -->
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/site</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</fileSet>
|
|
||||||
|
|
||||||
</fileSets>
|
|
||||||
|
|
||||||
<!-- So we'll collect these parameters and feed them into the velocity context -->
|
|
||||||
<parameters>
|
|
||||||
<parameter>
|
|
||||||
<name></name>
|
|
||||||
<type></type>
|
|
||||||
<required></required>
|
|
||||||
<!-- This will get farmed out to a resource bundle -->
|
|
||||||
<descriptionKey></descriptionKey>
|
|
||||||
</parameter>
|
|
||||||
</parameters>
|
|
||||||
|
|
||||||
</archetype>
|
|
|
@ -1,48 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetype</artifactId>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-archetype-core</artifactId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-velocity</artifactId>
|
|
||||||
<version>1.1.2-SNAPSHOT</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-file</artifactId>
|
|
||||||
<version>1.0-alpha-4</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-utils</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-model</artifactId>
|
|
||||||
<version>2.0-beta-1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-artifact-manager</artifactId>
|
|
||||||
<version>2.0-beta-1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-artifact</artifactId>
|
|
||||||
<version>2.0-beta-1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-container-default</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
|
@ -1,41 +0,0 @@
|
||||||
package org.apache.maven.archetype;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public interface Archetype
|
|
||||||
{
|
|
||||||
String ROLE = Archetype.class.getName();
|
|
||||||
|
|
||||||
String ARCHETYPE_DESCRIPTOR = "META-INF/archetype.xml";
|
|
||||||
|
|
||||||
String ARCHETYPE_RESOURCES = "archetype-resources";
|
|
||||||
|
|
||||||
String ARCHETYPE_POM = "pom.xml";
|
|
||||||
|
|
||||||
void createArchetype( String archetypeGroupId, String archetypeArtifactId, String archetypeVersion,
|
|
||||||
ArtifactRepository localRepository, List remoteRepositories, Map parameters )
|
|
||||||
throws ArchetypeNotFoundException, ArchetypeDescriptorException, ArchetypeTemplateProcessingException;
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
package org.apache.maven.archetype;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class ArchetypeDescriptorException
|
|
||||||
extends Exception
|
|
||||||
{
|
|
||||||
public ArchetypeDescriptorException( String message )
|
|
||||||
{
|
|
||||||
super( message );
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArchetypeDescriptorException( Throwable cause )
|
|
||||||
{
|
|
||||||
super( cause );
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArchetypeDescriptorException( String message, Throwable cause )
|
|
||||||
{
|
|
||||||
super( message, cause );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
package org.apache.maven.archetype;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class ArchetypeNotFoundException
|
|
||||||
extends Exception
|
|
||||||
{
|
|
||||||
public ArchetypeNotFoundException( String message )
|
|
||||||
{
|
|
||||||
super( message );
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArchetypeNotFoundException( Throwable cause )
|
|
||||||
{
|
|
||||||
super( cause );
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArchetypeNotFoundException( String message, Throwable cause )
|
|
||||||
{
|
|
||||||
super( message, cause );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
package org.apache.maven.archetype;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class ArchetypeTemplateProcessingException
|
|
||||||
extends Exception
|
|
||||||
{
|
|
||||||
public ArchetypeTemplateProcessingException( String message )
|
|
||||||
{
|
|
||||||
super( message );
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArchetypeTemplateProcessingException( Throwable cause )
|
|
||||||
{
|
|
||||||
super( cause );
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArchetypeTemplateProcessingException( String message, Throwable cause )
|
|
||||||
{
|
|
||||||
super( message, cause );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,567 +0,0 @@
|
||||||
package org.apache.maven.archetype;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.apache.maven.archetype.descriptor.ArchetypeDescriptor;
|
|
||||||
import org.apache.maven.archetype.descriptor.ArchetypeDescriptorBuilder;
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
|
||||||
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolver;
|
|
||||||
import org.apache.maven.model.Build;
|
|
||||||
import org.apache.maven.model.Model;
|
|
||||||
import org.apache.maven.model.Resource;
|
|
||||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
|
||||||
import org.apache.velocity.VelocityContext;
|
|
||||||
import org.apache.velocity.context.Context;
|
|
||||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
|
||||||
import org.codehaus.plexus.util.FileUtils;
|
|
||||||
import org.codehaus.plexus.util.IOUtil;
|
|
||||||
import org.codehaus.plexus.util.StringUtils;
|
|
||||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
|
||||||
import org.codehaus.plexus.velocity.VelocityComponent;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.Writer;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLClassLoader;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class DefaultArchetype
|
|
||||||
extends AbstractLogEnabled
|
|
||||||
implements Archetype
|
|
||||||
{
|
|
||||||
private static final String DEFAULT_TEST_RESOURCE_DIR = "/src/test/resources";
|
|
||||||
|
|
||||||
private static final String DEFAULT_TEST_SOURCE_DIR = "/src/test/java";
|
|
||||||
|
|
||||||
private static final String DEFAULT_RESOURCE_DIR = "/src/main/resources";
|
|
||||||
|
|
||||||
private static final String DEFAULT_SOURCE_DIR = "/src/main/java";
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Components
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
private VelocityComponent velocity;
|
|
||||||
|
|
||||||
private ArtifactResolver artifactResolver;
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Implementation
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
private ArtifactFactory artifactFactory;
|
|
||||||
|
|
||||||
// groupId = maven
|
|
||||||
// artifactId = maven-foo-archetype
|
|
||||||
// version = latest
|
|
||||||
|
|
||||||
public void createArchetype( String archetypeGroupId, String archetypeArtifactId, String archetypeVersion,
|
|
||||||
ArtifactRepository localRepository, List remoteRepositories, Map parameters )
|
|
||||||
throws ArchetypeNotFoundException, ArchetypeDescriptorException, ArchetypeTemplateProcessingException
|
|
||||||
{
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Download the archetype
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Artifact archetypeArtifact = artifactFactory.createArtifact( archetypeGroupId, archetypeArtifactId,
|
|
||||||
archetypeVersion, Artifact.SCOPE_RUNTIME, "jar" );
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
artifactResolver.resolve( archetypeArtifact, remoteRepositories, localRepository );
|
|
||||||
}
|
|
||||||
catch ( ArtifactResolutionException e )
|
|
||||||
{
|
|
||||||
throw new ArchetypeDescriptorException( "Error attempting to download archetype: " + e.getMessage(), e );
|
|
||||||
}
|
|
||||||
catch ( ArtifactNotFoundException e )
|
|
||||||
{
|
|
||||||
throw new ArchetypeNotFoundException( "Archetype does not exist: " + e.getMessage(), e );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
|
||||||
// Get Logger and display all parameters used
|
|
||||||
// ---------------------------------------------------------------------
|
|
||||||
if ( getLogger().isInfoEnabled() )
|
|
||||||
{
|
|
||||||
if ( !parameters.isEmpty() )
|
|
||||||
{
|
|
||||||
getLogger().info( "----------------------------------------------------------------------------" );
|
|
||||||
|
|
||||||
getLogger().info( "Using following parameters for creating Archetype: " + archetypeArtifactId + ":" +
|
|
||||||
archetypeVersion );
|
|
||||||
|
|
||||||
getLogger().info( "----------------------------------------------------------------------------" );
|
|
||||||
|
|
||||||
Set keys = parameters.keySet();
|
|
||||||
|
|
||||||
Iterator it = keys.iterator();
|
|
||||||
|
|
||||||
while ( it.hasNext() )
|
|
||||||
{
|
|
||||||
String parameterName = (String) it.next();
|
|
||||||
|
|
||||||
String parameterValue = (String) parameters.get( parameterName );
|
|
||||||
|
|
||||||
getLogger().info( "Parameter: " + parameterName + ", Value: " + parameterValue );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
getLogger().info( "No Parameters found for creating Archetype" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Load the descriptor
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
ArchetypeDescriptorBuilder builder = new ArchetypeDescriptorBuilder();
|
|
||||||
|
|
||||||
ArchetypeDescriptor descriptor;
|
|
||||||
|
|
||||||
URLClassLoader archetypeJarLoader;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
URL[] urls = new URL[1];
|
|
||||||
|
|
||||||
urls[0] = archetypeArtifact.getFile().toURL();
|
|
||||||
|
|
||||||
archetypeJarLoader = new URLClassLoader( urls );
|
|
||||||
|
|
||||||
InputStream is = getStream( ARCHETYPE_DESCRIPTOR, archetypeJarLoader );
|
|
||||||
|
|
||||||
if ( is == null )
|
|
||||||
{
|
|
||||||
throw new ArchetypeDescriptorException(
|
|
||||||
"The " + ARCHETYPE_DESCRIPTOR + " descriptor cannot be found." );
|
|
||||||
}
|
|
||||||
|
|
||||||
descriptor = builder.build( new InputStreamReader( is ) );
|
|
||||||
}
|
|
||||||
catch ( IOException e )
|
|
||||||
{
|
|
||||||
throw new ArchetypeDescriptorException( "Error reading the " + ARCHETYPE_DESCRIPTOR + " descriptor.", e );
|
|
||||||
}
|
|
||||||
catch ( XmlPullParserException e )
|
|
||||||
{
|
|
||||||
throw new ArchetypeDescriptorException( "Error reading the " + ARCHETYPE_DESCRIPTOR + " descriptor.", e );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
String basedir = (String) parameters.get( "basedir" );
|
|
||||||
|
|
||||||
String artifactId = (String) parameters.get( "artifactId" );
|
|
||||||
|
|
||||||
File pomFile = new File( basedir, ARCHETYPE_POM );
|
|
||||||
|
|
||||||
File outputDirectoryFile;
|
|
||||||
|
|
||||||
if ( pomFile.exists() && descriptor.isAllowPartial() )
|
|
||||||
{
|
|
||||||
outputDirectoryFile = new File( basedir );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
outputDirectoryFile = new File( basedir, artifactId );
|
|
||||||
|
|
||||||
if ( outputDirectoryFile.exists() )
|
|
||||||
{
|
|
||||||
throw new ArchetypeTemplateProcessingException(
|
|
||||||
outputDirectoryFile.getName() + " already exists - please run from a clean directory" );
|
|
||||||
}
|
|
||||||
|
|
||||||
pomFile = new File( outputDirectoryFile, ARCHETYPE_POM );
|
|
||||||
}
|
|
||||||
|
|
||||||
String outputDirectory = outputDirectoryFile.getAbsolutePath();
|
|
||||||
|
|
||||||
String packageName = (String) parameters.get( "package" );
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Set up the Velocity context
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Context context = new VelocityContext();
|
|
||||||
|
|
||||||
context.put( "package", packageName );
|
|
||||||
|
|
||||||
for ( Iterator iterator = parameters.keySet().iterator(); iterator.hasNext(); )
|
|
||||||
{
|
|
||||||
String key = (String) iterator.next();
|
|
||||||
|
|
||||||
Object value = parameters.get( key );
|
|
||||||
|
|
||||||
context.put( key, value );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Process the templates
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
ClassLoader old = Thread.currentThread().getContextClassLoader();
|
|
||||||
|
|
||||||
Thread.currentThread().setContextClassLoader( archetypeJarLoader );
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
processTemplates( pomFile, outputDirectory, context, descriptor, packageName );
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
Thread.currentThread().setContextClassLoader( old );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Log message on Archetype creation
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
if ( getLogger().isInfoEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().info( "Archetype created in dir: " + outputDirectory );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void processTemplates( File pomFile, String outputDirectory, Context context,
|
|
||||||
ArchetypeDescriptor descriptor, String packageName )
|
|
||||||
throws ArchetypeTemplateProcessingException
|
|
||||||
{
|
|
||||||
if ( !pomFile.exists() )
|
|
||||||
{
|
|
||||||
processTemplate( outputDirectory, context, ARCHETYPE_POM, false, null );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
|
||||||
// Model generated for the new archetype, so process it now
|
|
||||||
// ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Model generatedModel;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
FileReader pomReader = new FileReader( pomFile );
|
|
||||||
|
|
||||||
MavenXpp3Reader reader = new MavenXpp3Reader();
|
|
||||||
|
|
||||||
generatedModel = reader.read( pomReader );
|
|
||||||
}
|
|
||||||
catch ( IOException e )
|
|
||||||
{
|
|
||||||
throw new ArchetypeTemplateProcessingException( "Error reading POM", e );
|
|
||||||
}
|
|
||||||
catch ( XmlPullParserException e )
|
|
||||||
{
|
|
||||||
throw new ArchetypeTemplateProcessingException( "Error reading POM", e );
|
|
||||||
}
|
|
||||||
|
|
||||||
// XXX: Following POM processing block may be a candidate for
|
|
||||||
// refactoring out into service methods or moving to
|
|
||||||
// createProjectDirectoryStructure(outputDirectory)
|
|
||||||
Build build = generatedModel.getBuild();
|
|
||||||
|
|
||||||
boolean overrideSrcDir = false;
|
|
||||||
|
|
||||||
boolean overrideResourceDir = false;
|
|
||||||
|
|
||||||
boolean overrideTestSrcDir = false;
|
|
||||||
|
|
||||||
boolean overrideTestResourceDir = false;
|
|
||||||
|
|
||||||
boolean foundBuildElement = build != null;
|
|
||||||
|
|
||||||
if ( getLogger().isDebugEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().debug(
|
|
||||||
"********************* Debug info for resources created from generated Model ***********************" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( getLogger().isDebugEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().debug( "Was build element found in generated POM?: " + foundBuildElement );
|
|
||||||
}
|
|
||||||
|
|
||||||
// create source directory if specified in POM
|
|
||||||
if ( foundBuildElement && null != build.getSourceDirectory() )
|
|
||||||
{
|
|
||||||
if ( getLogger().isDebugEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().debug( "Overriding default source directory " );
|
|
||||||
}
|
|
||||||
|
|
||||||
overrideSrcDir = true;
|
|
||||||
|
|
||||||
String srcDirectory = build.getSourceDirectory();
|
|
||||||
|
|
||||||
srcDirectory = StringUtils.replace( srcDirectory, "\\", "/" );
|
|
||||||
|
|
||||||
FileUtils.mkdir( getOutputDirectory( outputDirectory, srcDirectory ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// create script source directory if specified in POM
|
|
||||||
if ( foundBuildElement && null != build.getScriptSourceDirectory() )
|
|
||||||
{
|
|
||||||
if ( getLogger().isDebugEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().debug( "Overriding default script source directory " );
|
|
||||||
}
|
|
||||||
|
|
||||||
String scriptSourceDirectory = build.getScriptSourceDirectory();
|
|
||||||
|
|
||||||
scriptSourceDirectory = StringUtils.replace( scriptSourceDirectory, "\\", "/" );
|
|
||||||
|
|
||||||
FileUtils.mkdir( getOutputDirectory( outputDirectory, scriptSourceDirectory ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// create resource director(y/ies) if specified in POM
|
|
||||||
if ( foundBuildElement && build.getResources().size() > 0 )
|
|
||||||
{
|
|
||||||
if ( getLogger().isDebugEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().info( "Overriding default resource directory " );
|
|
||||||
}
|
|
||||||
|
|
||||||
overrideResourceDir = true;
|
|
||||||
|
|
||||||
Iterator resourceItr = build.getResources().iterator();
|
|
||||||
|
|
||||||
while ( resourceItr.hasNext() )
|
|
||||||
{
|
|
||||||
Resource resource = (Resource) resourceItr.next();
|
|
||||||
|
|
||||||
String resourceDirectory = resource.getDirectory();
|
|
||||||
|
|
||||||
resourceDirectory = StringUtils.replace( resourceDirectory, "\\", "/" );
|
|
||||||
|
|
||||||
FileUtils.mkdir( getOutputDirectory( outputDirectory, resourceDirectory ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// create test source directory if specified in POM
|
|
||||||
if ( foundBuildElement && null != build.getTestSourceDirectory() )
|
|
||||||
{
|
|
||||||
if ( getLogger().isDebugEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().debug( "Overriding default test directory " );
|
|
||||||
}
|
|
||||||
|
|
||||||
overrideTestSrcDir = true;
|
|
||||||
|
|
||||||
String testDirectory = build.getTestSourceDirectory();
|
|
||||||
|
|
||||||
testDirectory = StringUtils.replace( testDirectory, "\\", "/" );
|
|
||||||
|
|
||||||
FileUtils.mkdir( getOutputDirectory( outputDirectory, testDirectory ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// create test resource directory if specified in POM
|
|
||||||
if ( foundBuildElement && build.getTestResources().size() > 0 )
|
|
||||||
{
|
|
||||||
if ( getLogger().isDebugEnabled() )
|
|
||||||
{
|
|
||||||
getLogger().debug( "Overriding default test resource directory " );
|
|
||||||
}
|
|
||||||
|
|
||||||
overrideTestResourceDir = true;
|
|
||||||
|
|
||||||
Iterator testResourceItr = build.getTestResources().iterator();
|
|
||||||
|
|
||||||
while ( testResourceItr.hasNext() )
|
|
||||||
{
|
|
||||||
Resource resource = (Resource) testResourceItr.next();
|
|
||||||
|
|
||||||
String testResourceDirectory = resource.getDirectory();
|
|
||||||
|
|
||||||
testResourceDirectory = StringUtils.replace( testResourceDirectory, "\\", "/" );
|
|
||||||
|
|
||||||
FileUtils.mkdir( getOutputDirectory( outputDirectory, testResourceDirectory ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getLogger().info(
|
|
||||||
"********************* End of debug info from resources from generated POM ***********************" );
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Main
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
if ( descriptor.getSources().size() > 0 )
|
|
||||||
{
|
|
||||||
if ( !overrideSrcDir )
|
|
||||||
{
|
|
||||||
FileUtils.mkdir( outputDirectory + DEFAULT_SOURCE_DIR );
|
|
||||||
}
|
|
||||||
processSources( outputDirectory, context, descriptor.getSources(), packageName );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( descriptor.getResources().size() > 0 )
|
|
||||||
{
|
|
||||||
if ( !overrideResourceDir )
|
|
||||||
{
|
|
||||||
FileUtils.mkdir( outputDirectory + DEFAULT_RESOURCE_DIR );
|
|
||||||
}
|
|
||||||
processResources( outputDirectory, context, descriptor.getResources(), packageName );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Test
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
if ( descriptor.getTestSources().size() > 0 )
|
|
||||||
{
|
|
||||||
if ( !overrideTestSrcDir )
|
|
||||||
{
|
|
||||||
FileUtils.mkdir( outputDirectory + DEFAULT_TEST_SOURCE_DIR );
|
|
||||||
}
|
|
||||||
|
|
||||||
processSources( outputDirectory, context, descriptor.getTestSources(), packageName );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( descriptor.getTestResources().size() > 0 )
|
|
||||||
{
|
|
||||||
if ( !overrideTestResourceDir )
|
|
||||||
{
|
|
||||||
FileUtils.mkdir( outputDirectory + DEFAULT_TEST_RESOURCE_DIR );
|
|
||||||
}
|
|
||||||
processResources( outputDirectory, context, descriptor.getTestResources(), packageName );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Site
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
if ( descriptor.getSiteResources().size() > 0 )
|
|
||||||
{
|
|
||||||
processResources( outputDirectory, context, descriptor.getSiteResources(), packageName );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getOutputDirectory( String outputDirectory, String testResourceDirectory )
|
|
||||||
{
|
|
||||||
return outputDirectory +
|
|
||||||
( testResourceDirectory.startsWith( "/" ) ? testResourceDirectory : "/" + testResourceDirectory );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
protected void processSources( String outputDirectory, Context context, List sources, String packageName )
|
|
||||||
throws ArchetypeTemplateProcessingException
|
|
||||||
{
|
|
||||||
for ( Iterator i = sources.iterator(); i.hasNext(); )
|
|
||||||
{
|
|
||||||
String template = (String) i.next();
|
|
||||||
|
|
||||||
processTemplate( outputDirectory, context, template, true, packageName );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void processResources( String outputDirectory, Context context, List resources, String packageName )
|
|
||||||
throws ArchetypeTemplateProcessingException
|
|
||||||
{
|
|
||||||
for ( Iterator i = resources.iterator(); i.hasNext(); )
|
|
||||||
{
|
|
||||||
String template = (String) i.next();
|
|
||||||
|
|
||||||
processTemplate( outputDirectory, context, template, false, packageName );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void processTemplate( String outputDirectory, Context context, String template, boolean packageInFileName,
|
|
||||||
String packageName )
|
|
||||||
throws ArchetypeTemplateProcessingException
|
|
||||||
{
|
|
||||||
File f;
|
|
||||||
|
|
||||||
template = StringUtils.replace( template, "\\", "/" );
|
|
||||||
|
|
||||||
if ( packageInFileName && packageName != null )
|
|
||||||
{
|
|
||||||
String templateFileName = StringUtils.replace( template, "/", File.separator );
|
|
||||||
|
|
||||||
String path = packageName.replace( '.', '/' );
|
|
||||||
|
|
||||||
String filename = FileUtils.filename( templateFileName );
|
|
||||||
|
|
||||||
String dirname = FileUtils.dirname( templateFileName );
|
|
||||||
|
|
||||||
f = new File( new File( new File( outputDirectory, dirname ), path ), filename );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
f = new File( outputDirectory, template );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !f.getParentFile().exists() )
|
|
||||||
{
|
|
||||||
f.getParentFile().mkdirs();
|
|
||||||
}
|
|
||||||
|
|
||||||
Writer writer = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
writer = new FileWriter( f );
|
|
||||||
|
|
||||||
template = ARCHETYPE_RESOURCES + "/" + template;
|
|
||||||
|
|
||||||
velocity.getEngine().mergeTemplate( template, context, writer );
|
|
||||||
|
|
||||||
writer.flush();
|
|
||||||
}
|
|
||||||
catch ( Exception e )
|
|
||||||
{
|
|
||||||
throw new ArchetypeTemplateProcessingException( "Error merging velocity templates", e );
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
IOUtil.close( writer );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void createProjectDirectoryStructure( String outputDirectory )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private InputStream getStream( String name, ClassLoader loader )
|
|
||||||
{
|
|
||||||
if ( loader == null )
|
|
||||||
{
|
|
||||||
return Thread.currentThread().getContextClassLoader().getResourceAsStream( name );
|
|
||||||
}
|
|
||||||
|
|
||||||
return loader.getResourceAsStream( name );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,131 +0,0 @@
|
||||||
package org.apache.maven.archetype.descriptor;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ArchetypeDescriptor
|
|
||||||
{
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
private List sources;
|
|
||||||
|
|
||||||
private List testSources;
|
|
||||||
|
|
||||||
private List resources;
|
|
||||||
|
|
||||||
private List testResources;
|
|
||||||
|
|
||||||
private List siteResources;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This indicates the archetype can be a whole project or can be part
|
|
||||||
* of another project. An example is a site archetype where the POM and
|
|
||||||
* directory structure may already exist and you simply want to generate
|
|
||||||
* the site directory structure.
|
|
||||||
*/
|
|
||||||
private boolean allowPartial;
|
|
||||||
|
|
||||||
public ArchetypeDescriptor()
|
|
||||||
{
|
|
||||||
sources = new ArrayList();
|
|
||||||
|
|
||||||
resources = new ArrayList();
|
|
||||||
|
|
||||||
testSources = new ArrayList();
|
|
||||||
|
|
||||||
testResources = new ArrayList();
|
|
||||||
|
|
||||||
siteResources = new ArrayList();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
public String getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId( String id )
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addSource( String source )
|
|
||||||
{
|
|
||||||
sources.add( source );
|
|
||||||
}
|
|
||||||
|
|
||||||
public List getSources()
|
|
||||||
{
|
|
||||||
return sources;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addTestSource( String testSource )
|
|
||||||
{
|
|
||||||
testSources.add( testSource );
|
|
||||||
}
|
|
||||||
|
|
||||||
public List getTestSources()
|
|
||||||
{
|
|
||||||
return testSources;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addResource( String resource )
|
|
||||||
{
|
|
||||||
resources.add( resource );
|
|
||||||
}
|
|
||||||
|
|
||||||
public List getResources()
|
|
||||||
{
|
|
||||||
return resources;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addTestResource( String testResource )
|
|
||||||
{
|
|
||||||
testResources.add( testResource );
|
|
||||||
}
|
|
||||||
|
|
||||||
public List getTestResources()
|
|
||||||
{
|
|
||||||
return testResources;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addSiteResource( String siteResource )
|
|
||||||
{
|
|
||||||
siteResources.add( siteResource );
|
|
||||||
}
|
|
||||||
|
|
||||||
public List getSiteResources()
|
|
||||||
{
|
|
||||||
return siteResources;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAllowPartial()
|
|
||||||
{
|
|
||||||
return allowPartial;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAllowPartial( boolean allowPartial )
|
|
||||||
{
|
|
||||||
this.allowPartial = allowPartial;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
package org.apache.maven.archetype.descriptor;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
|
||||||
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
|
|
||||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.Reader;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class ArchetypeDescriptorBuilder
|
|
||||||
{
|
|
||||||
public ArchetypeDescriptor build( Reader reader )
|
|
||||||
throws IOException, XmlPullParserException
|
|
||||||
{
|
|
||||||
ArchetypeDescriptor descriptor = new ArchetypeDescriptor();
|
|
||||||
|
|
||||||
Xpp3Dom dom = Xpp3DomBuilder.build( reader );
|
|
||||||
|
|
||||||
descriptor.setId( dom.getChild( "id" ).getValue() );
|
|
||||||
|
|
||||||
Xpp3Dom allowPartialDom = dom.getChild( "allowPartial" );
|
|
||||||
|
|
||||||
if ( allowPartialDom != null )
|
|
||||||
{
|
|
||||||
String allowPartial = allowPartialDom.getValue();
|
|
||||||
|
|
||||||
if ( "true".equals( allowPartial ) || "1".equals( allowPartial ) || "on".equals( allowPartial ) )
|
|
||||||
{
|
|
||||||
descriptor.setAllowPartial( true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Main
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Xpp3Dom sources = dom.getChild( "sources" );
|
|
||||||
|
|
||||||
if ( sources != null )
|
|
||||||
{
|
|
||||||
Xpp3Dom[] sourceList = sources.getChildren( "source" );
|
|
||||||
|
|
||||||
for ( int i = 0; i < sourceList.length; i++ )
|
|
||||||
{
|
|
||||||
descriptor.addSource( sourceList[i].getValue() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Xpp3Dom resources = dom.getChild( "resources" );
|
|
||||||
|
|
||||||
if ( resources != null )
|
|
||||||
{
|
|
||||||
Xpp3Dom[] resourceList = resources.getChildren( "resource" );
|
|
||||||
|
|
||||||
for ( int i = 0; i < resourceList.length; i++ )
|
|
||||||
{
|
|
||||||
descriptor.addResource( resourceList[i].getValue() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Test
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Xpp3Dom testSources = dom.getChild( "testSources" );
|
|
||||||
|
|
||||||
if ( testSources != null )
|
|
||||||
{
|
|
||||||
Xpp3Dom[] testSourceList = testSources.getChildren( "source" );
|
|
||||||
|
|
||||||
for ( int i = 0; i < testSourceList.length; i++ )
|
|
||||||
{
|
|
||||||
descriptor.addTestSource( testSourceList[i].getValue() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Xpp3Dom testResources = dom.getChild( "testResources" );
|
|
||||||
|
|
||||||
if ( testResources != null )
|
|
||||||
{
|
|
||||||
Xpp3Dom[] testResourceList = testResources.getChildren( "resource" );
|
|
||||||
|
|
||||||
for ( int i = 0; i < testResourceList.length; i++ )
|
|
||||||
{
|
|
||||||
descriptor.addTestResource( testResourceList[i].getValue() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Site
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Xpp3Dom siteResources = dom.getChild( "siteResources" );
|
|
||||||
|
|
||||||
if ( siteResources != null )
|
|
||||||
{
|
|
||||||
Xpp3Dom[] siteResourceList = siteResources.getChildren( "resource" );
|
|
||||||
|
|
||||||
for ( int i = 0; i < siteResourceList.length; i++ )
|
|
||||||
{
|
|
||||||
descriptor.addSiteResource( siteResourceList[i].getValue() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return descriptor;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package org.apache.maven.archetype.descriptor;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pass over the directory containing the sources of the archetype and create
|
|
||||||
* the appropriate descriptor.
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class ArchetypeDescriptorGenerator
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<!-- START SNIPPET: modello-model -->
|
|
||||||
|
|
||||||
<model>
|
|
||||||
<id>archetype</id>
|
|
||||||
<name>Archetype</name>
|
|
||||||
<description><![CDATA[Maven's model for the archetype descriptor.]]></description>
|
|
||||||
<defaults>
|
|
||||||
<default>
|
|
||||||
<key>package</key>
|
|
||||||
<value>org.apache.maven.archeytpe.model</value>
|
|
||||||
</default>
|
|
||||||
</defaults>
|
|
||||||
<classes>
|
|
||||||
<class rootElement="true" xml.tagName="archetype">
|
|
||||||
<name>Archetype</name>
|
|
||||||
<description>Describes the assembly layout and packaging.</description>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<name>id</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<required>true</required>
|
|
||||||
<type>String</type>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>allowPartial</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<required>true</required>
|
|
||||||
<type>boolean</type>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>sources</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<association>
|
|
||||||
<type>String</type>
|
|
||||||
<multiplicity>*</multiplicity>
|
|
||||||
</association>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>resources</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<association>
|
|
||||||
<type>String</type>
|
|
||||||
<multiplicity>*</multiplicity>
|
|
||||||
</association>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>testSources</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<association>
|
|
||||||
<type>String</type>
|
|
||||||
<multiplicity>*</multiplicity>
|
|
||||||
</association>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>testResources</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<association>
|
|
||||||
<type>String</type>
|
|
||||||
<multiplicity>*</multiplicity>
|
|
||||||
</association>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>siteResources</name>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<association>
|
|
||||||
<type>String</type>
|
|
||||||
<multiplicity>*</multiplicity>
|
|
||||||
</association>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
</class>
|
|
||||||
</classes>
|
|
||||||
</model>
|
|
||||||
|
|
||||||
<!-- END SNIPPET: modello-model -->
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<component-set>
|
|
||||||
<components>
|
|
||||||
<component>
|
|
||||||
<role>org.apache.maven.archetype.Archetype</role>
|
|
||||||
<implementation>org.apache.maven.archetype.DefaultArchetype</implementation>
|
|
||||||
<requirements>
|
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.velocity.VelocityComponent</role>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
|
|
||||||
</requirement>
|
|
||||||
</requirements>
|
|
||||||
</component>
|
|
||||||
</components>
|
|
||||||
</component-set>
|
|
|
@ -1,83 +0,0 @@
|
||||||
package org.apache.maven.archetype;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
|
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
|
||||||
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
|
|
||||||
import org.codehaus.plexus.PlexusTestCase;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class ArchetypeTest
|
|
||||||
extends PlexusTestCase
|
|
||||||
{
|
|
||||||
public void testArchetype()
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
Archetype archetype = (Archetype) lookup( Archetype.ROLE );
|
|
||||||
|
|
||||||
Map parameters = new HashMap();
|
|
||||||
|
|
||||||
parameters.put( "name", "jason" );
|
|
||||||
|
|
||||||
parameters.put( "groupId", "maven" );
|
|
||||||
|
|
||||||
parameters.put( "artifactId", "quickstart" );
|
|
||||||
|
|
||||||
parameters.put( "version", "1.0-alpha-1-SNAPSHOT" );
|
|
||||||
|
|
||||||
parameters.put( "package", "org.apache.maven.quickstart" );
|
|
||||||
|
|
||||||
parameters.put( "basedir", getTestFile( "target" ).getAbsolutePath() );
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// This needs to be encapsulated in a maven test case.
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
ArtifactRepositoryLayout layout = (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, "legacy" );
|
|
||||||
|
|
||||||
String mavenRepoLocal = getTestFile( "target/local-repository" ).toURL().toString();
|
|
||||||
|
|
||||||
ArtifactRepository localRepository = new DefaultArtifactRepository( "local", mavenRepoLocal, layout );
|
|
||||||
|
|
||||||
List remoteRepositories = new ArrayList();
|
|
||||||
|
|
||||||
String mavenRepoRemote = getTestFile( "src/test/repository" ).toURL().toString();
|
|
||||||
|
|
||||||
ArtifactRepository remoteRepository = new DefaultArtifactRepository( "remote", mavenRepoRemote, layout );
|
|
||||||
|
|
||||||
remoteRepositories.add( remoteRepository );
|
|
||||||
|
|
||||||
archetype.createArchetype( "org.apache.maven.archetypes",
|
|
||||||
"maven-archetype-quickstart",
|
|
||||||
"1.0-alpha-1-SNAPSHOT",
|
|
||||||
localRepository,
|
|
||||||
remoteRepositories,
|
|
||||||
parameters );
|
|
||||||
|
|
||||||
// TODO: validate output
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,70 +0,0 @@
|
||||||
package org.apache.maven.archetype.descriptor;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import java.io.StringReader;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class ArchetypeDescriptorBuilderTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
public void testBuilder()
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
String xml = "<archetype>" + " <id>standard</id>" + " <sources>" + " <source>source0</source>" +
|
|
||||||
" <source>source1</source>" + " </sources>" + " <resources>" + " <resource>resource0</resource>" +
|
|
||||||
" <resource>resource1</resource>" + " </resources>" + " <testSources>" +
|
|
||||||
" <source>testSource0</source>" + " <source>testSource1</source>" + " </testSources>" +
|
|
||||||
" <testResources>" + " <resource>testResource0</resource>" + " <resource>testResource1</resource>" +
|
|
||||||
" </testResources>" + "</archetype>";
|
|
||||||
|
|
||||||
ArchetypeDescriptorBuilder builder = new ArchetypeDescriptorBuilder();
|
|
||||||
|
|
||||||
ArchetypeDescriptor descriptor = builder.build( new StringReader( xml ) );
|
|
||||||
|
|
||||||
assertEquals( "standard", descriptor.getId() );
|
|
||||||
|
|
||||||
assertEquals( 2, descriptor.getSources().size() );
|
|
||||||
|
|
||||||
assertEquals( "source0", descriptor.getSources().get( 0 ) );
|
|
||||||
|
|
||||||
assertEquals( "source1", descriptor.getSources().get( 1 ) );
|
|
||||||
|
|
||||||
assertEquals( 2, descriptor.getResources().size() );
|
|
||||||
|
|
||||||
assertEquals( "resource0", descriptor.getResources().get( 0 ) );
|
|
||||||
|
|
||||||
assertEquals( "resource1", descriptor.getResources().get( 1 ) );
|
|
||||||
|
|
||||||
assertEquals( 2, descriptor.getTestSources().size() );
|
|
||||||
|
|
||||||
assertEquals( "testSource0", descriptor.getTestSources().get( 0 ) );
|
|
||||||
|
|
||||||
assertEquals( "testSource1", descriptor.getTestSources().get( 1 ) );
|
|
||||||
|
|
||||||
assertEquals( 2, descriptor.getTestResources().size() );
|
|
||||||
|
|
||||||
assertEquals( "testResource0", descriptor.getTestResources().get( 0 ) );
|
|
||||||
|
|
||||||
assertEquals( "testResource1", descriptor.getTestResources().get( 1 ) );
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1,10 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype-quickstart</artifactId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
</project>
|
|
|
@ -1 +0,0 @@
|
||||||
1.0-alpha-1-SNAPSHOT
|
|
|
@ -1,17 +0,0 @@
|
||||||
<model>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetype</artifactId>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
<modules>
|
|
||||||
<module>maven-archetype-mojo</module>
|
|
||||||
<module>maven-archetype-quickstart</module>
|
|
||||||
<module>maven-archetype-webapp</module>
|
|
||||||
</modules>
|
|
||||||
</model>
|
|
|
@ -1 +0,0 @@
|
||||||
1.0-alpha-1-SNAPSHOT
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<document>
|
|
||||||
<properties>
|
|
||||||
<title>Maven</title>
|
|
||||||
<author email="jason@zenplex.com">Jason van Zyl</author>
|
|
||||||
</properties>
|
|
||||||
<body>
|
|
||||||
<section name="Maven">
|
|
||||||
<p>
|
|
||||||
Maven is a Java project management and project comprehension tool. Maven
|
|
||||||
is based on the concept of a project object model (POM) in that all the
|
|
||||||
artifacts produced by Maven are a result of consulting a well defined
|
|
||||||
model for your project. Builds, documentation, source metrics, and source
|
|
||||||
cross-references are all controlled by your POM. Look here to see the
|
|
||||||
full list of Maven's <a href="features.html"><b>features</b></a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<source>
|
|
||||||
public class Foo
|
|
||||||
{
|
|
||||||
}
|
|
||||||
</source>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
</body>
|
|
||||||
</document>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project name="Maven">
|
|
||||||
|
|
||||||
<title>Maven</title>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<links>
|
|
||||||
<item name="Plexus" href="http://plexus.codehaus.org"/>
|
|
||||||
</links>
|
|
||||||
|
|
||||||
<menu name="Quick Links">
|
|
||||||
<item name="Model" href="/maven.html"/>
|
|
||||||
</menu>
|
|
||||||
</body>
|
|
||||||
</project>
|
|
|
@ -1,25 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-plugin-parent</artifactId>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<version>2.0-beta-1</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-archetype-plugin</artifactId>
|
|
||||||
<packaging>maven-plugin</packaging>
|
|
||||||
<name>Maven Archetype Plugin</name>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/components/trunk/maven-archetype/maven-archetype-plugin/</connection>
|
|
||||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/components/trunk/maven-archetype/maven-archetype-plugin/</developerConnection>
|
|
||||||
<url>http://svn.apache.org/viewcvs.cgi/maven/components/maven-archetype/maven-archetype-plugin/</url>
|
|
||||||
</scm>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-archetype-core</artifactId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
|
@ -1,160 +0,0 @@
|
||||||
package org.apache.maven.plugin.archetype;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.apache.maven.archetype.Archetype;
|
|
||||||
import org.apache.maven.archetype.ArchetypeDescriptorException;
|
|
||||||
import org.apache.maven.archetype.ArchetypeNotFoundException;
|
|
||||||
import org.apache.maven.archetype.ArchetypeTemplateProcessingException;
|
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Builds archetype containers.
|
|
||||||
*
|
|
||||||
* @goal create
|
|
||||||
* @description The archetype creation goal looks for an archetype with a given groupId, artifactId, and
|
|
||||||
* version and retrieves it from the remote repository. Once the archetype is retrieve it is process against
|
|
||||||
* a set of user parameters to create a working Maven project.
|
|
||||||
* @requiresProject false
|
|
||||||
*/
|
|
||||||
public class MavenArchetypeMojo
|
|
||||||
extends AbstractMojo
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @parameter expression="${component.org.apache.maven.archetype.Archetype}"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private Archetype archetype;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${localRepository}"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private ArtifactRepository localRepository;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${archetypeGroupId}" default-value="org.apache.maven.archetypes"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private String archetypeGroupId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${archetypeArtifactId}" default-value="maven-archetype-quickstart"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private String archetypeArtifactId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${archetypeVersion}" default-value="RELEASE"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private String archetypeVersion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${groupId}"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private String groupId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${artifactId}"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private String artifactId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${version}" default-value="1.0-SNAPSHOT"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private String version;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${packageName}" alias="package"
|
|
||||||
*/
|
|
||||||
private String packageName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @parameter expression="${project.remoteArtifactRepositories}"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private List remoteRepositories;
|
|
||||||
|
|
||||||
public void execute()
|
|
||||||
throws MojoExecutionException
|
|
||||||
{
|
|
||||||
// TODO: prompt for missing values
|
|
||||||
// TODO: configurable license
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// archetypeGroupId
|
|
||||||
// archetypeArtifactId
|
|
||||||
// archetypeVersion
|
|
||||||
//
|
|
||||||
// localRepository
|
|
||||||
// remoteRepository
|
|
||||||
// parameters
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
String basedir = System.getProperty( "user.dir" );
|
|
||||||
|
|
||||||
if ( packageName == null )
|
|
||||||
{
|
|
||||||
getLog().info( "Defaulting package to group ID: " + groupId );
|
|
||||||
|
|
||||||
packageName = groupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: context mojo more appropriate?
|
|
||||||
Map map = new HashMap();
|
|
||||||
|
|
||||||
map.put( "basedir", basedir );
|
|
||||||
|
|
||||||
map.put( "package", packageName );
|
|
||||||
|
|
||||||
map.put( "packageName", packageName );
|
|
||||||
|
|
||||||
map.put( "groupId", groupId );
|
|
||||||
|
|
||||||
map.put( "artifactId", artifactId );
|
|
||||||
|
|
||||||
map.put( "version", version );
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
archetype.createArchetype( archetypeGroupId, archetypeArtifactId, archetypeVersion, localRepository, remoteRepositories, map );
|
|
||||||
}
|
|
||||||
catch ( ArchetypeNotFoundException e )
|
|
||||||
{
|
|
||||||
throw new MojoExecutionException( "Error creating from archetype", e );
|
|
||||||
}
|
|
||||||
catch ( ArchetypeDescriptorException e )
|
|
||||||
{
|
|
||||||
throw new MojoExecutionException( "Error creating from archetype", e );
|
|
||||||
}
|
|
||||||
catch ( ArchetypeTemplateProcessingException e )
|
|
||||||
{
|
|
||||||
throw new MojoExecutionException( "Error creating from archetype", e );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
<plexus>
|
|
||||||
<components>
|
|
||||||
<component>
|
|
||||||
<role>org.codehaus.plexus.builder.PlexusBuilder</role>
|
|
||||||
<implementation>org.codehaus.plexus.builder.DefaultPlexusBuilder</implementation>
|
|
||||||
<requirements>
|
|
||||||
<requirement>
|
|
||||||
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.apache.maven.artifact.collector.ArtifactCollector</role>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.apache.maven.project.MavenProjectBuilder</role>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.velocity.VelocityComponent</role>
|
|
||||||
</requirement>
|
|
||||||
</requirements>
|
|
||||||
</component>
|
|
||||||
|
|
||||||
<component>
|
|
||||||
<role>org.codehaus.plexus.velocity.VelocityComponent</role>
|
|
||||||
<implementation>org.codehaus.plexus.velocity.DefaultVelocityComponent</implementation>
|
|
||||||
<configuration>
|
|
||||||
<properties>
|
|
||||||
<property>
|
|
||||||
<name>resource.loader</name>
|
|
||||||
<value>classpath</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>classpath.resource.loader.class</name>
|
|
||||||
<value>org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader</value>
|
|
||||||
</property>
|
|
||||||
</properties>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
</components>
|
|
||||||
</plexus>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype-j2ee</artifactId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</project>
|
|
|
@ -1,19 +0,0 @@
|
||||||
<archetype>
|
|
||||||
<id>j2ee</id>
|
|
||||||
<resources>
|
|
||||||
<resource>pom.xml</resource>
|
|
||||||
<resource>ear/pom.xml</resource>
|
|
||||||
<resource>ejbs/src/main/resources/META-INF/ejb-jar.xml</resource>
|
|
||||||
<resource>ejbs/pom.xml</resource>
|
|
||||||
<resource>primary-source/pom.xml</resource>
|
|
||||||
<resource>projects/logging/pom.xml</resource>
|
|
||||||
<resource>projects/pom.xml</resource>
|
|
||||||
<resource>servlets/pom.xml</resource>
|
|
||||||
<resource>servlets/servlet/pom.xml</resource>
|
|
||||||
<resource>servlets/servlet/src/main/webapp/index.jsp</resource>
|
|
||||||
<resource>servlets/servlet/src/main/webapp/WEB-INF/web.xml</resource>
|
|
||||||
<resource>site/pom.xml</resource>
|
|
||||||
<resource>site/src/site/site.xml</resource>
|
|
||||||
<resource>site/src/site/apt/site.apt</resource>
|
|
||||||
</resources>
|
|
||||||
</archetype>
|
|
|
@ -1,59 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>ear</artifactId>
|
|
||||||
<packaging>ear</packaging>
|
|
||||||
<version>1.0</version>
|
|
||||||
<name>ear assembly</name>
|
|
||||||
<parent>
|
|
||||||
<groupId>root</groupId>
|
|
||||||
<artifactId>project</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>ejbs</artifactId>
|
|
||||||
<type>ejb</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project.servlets</groupId>
|
|
||||||
<artifactId>servlet</artifactId>
|
|
||||||
<type>war</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>primary-source</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project.projects</groupId>
|
|
||||||
<artifactId>logging</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>fop</groupId>
|
|
||||||
<artifactId>fop</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>axis</groupId>
|
|
||||||
<artifactId>axis</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>axis</groupId>
|
|
||||||
<artifactId>axis-wsdl4j</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-ear-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -1,42 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>ejbs</artifactId>
|
|
||||||
<packaging>ejb</packaging>
|
|
||||||
<version>1.0</version>
|
|
||||||
<name>enterprise java beans</name>
|
|
||||||
<parent>
|
|
||||||
<groupId>root</groupId>
|
|
||||||
<artifactId>project</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>primary-source</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project.projects</groupId>
|
|
||||||
<artifactId>logging</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>fop</groupId>
|
|
||||||
<artifactId>fop</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-ejb-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -1,77 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root</groupId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<artifactId>project</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>project</name>
|
|
||||||
<modules>
|
|
||||||
<module>projects</module>
|
|
||||||
<module>primary-source</module>
|
|
||||||
<module>servlets</module>
|
|
||||||
<module>ejbs</module>
|
|
||||||
<module>ear</module>
|
|
||||||
<module>site</module>
|
|
||||||
</modules>
|
|
||||||
<build>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<unzipCommand>/usr/bin/unzip -o > err.txt</unzipCommand>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project.projects</groupId>
|
|
||||||
<artifactId>logging</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>primary-source</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project.servlets</groupId>
|
|
||||||
<artifactId>servlet</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<type>war</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>ejbs</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<type>ejb</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>fop</groupId>
|
|
||||||
<artifactId>fop</artifactId>
|
|
||||||
<version>0.20.5</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>axis</groupId>
|
|
||||||
<artifactId>axis</artifactId>
|
|
||||||
<version>1.2.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>axis</groupId>
|
|
||||||
<artifactId>axis-wsdl4j</artifactId>
|
|
||||||
<version>1.5.1</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
<distributionManagement>
|
|
||||||
<site>
|
|
||||||
<id>site</id>
|
|
||||||
<name>project website</name>
|
|
||||||
<url>scp://local.company.com/websites/project.company.com/</url>
|
|
||||||
</site>
|
|
||||||
</distributionManagement>
|
|
||||||
</project>
|
|
|
@ -1,51 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>primary-source</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>core project classes</name>
|
|
||||||
<parent>
|
|
||||||
<groupId>root</groupId>
|
|
||||||
<artifactId>project</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project.projects</groupId>
|
|
||||||
<artifactId>logging</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>fop</groupId>
|
|
||||||
<artifactId>fop</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>axis</groupId>
|
|
||||||
<artifactId>axis</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>axis</groupId>
|
|
||||||
<artifactId>axis-wsdl4j</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<encoding>iso-8859-1</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<minmemory>128m</minmemory>
|
|
||||||
<maxmemory>512m</maxmemory>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root.project.projects</groupId>
|
|
||||||
<artifactId>logging</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>logging</name>
|
|
||||||
<parent>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>projects</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
</project>
|
|
|
@ -1,16 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<artifactId>projects</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>sub projects</name>
|
|
||||||
<parent>
|
|
||||||
<groupId>root</groupId>
|
|
||||||
<artifactId>project</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<modules>
|
|
||||||
<module>logging</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
|
@ -1,23 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>servlets</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>servlets</name>
|
|
||||||
<version>1.0</version>
|
|
||||||
<parent>
|
|
||||||
<groupId>root</groupId>
|
|
||||||
<artifactId>project</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>fop</groupId>
|
|
||||||
<artifactId>fop</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<modules>
|
|
||||||
<module>servlet</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>root.project.servlets</groupId>
|
|
||||||
<artifactId>servlet</artifactId>
|
|
||||||
<packaging>war</packaging>
|
|
||||||
<name>servlet</name>
|
|
||||||
<parent>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>servlets</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>root.project</groupId>
|
|
||||||
<artifactId>primary-source</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<h2>Hello World!</h2>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<version>1.0-alpha-3</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype-mojo</artifactId>
|
|
||||||
<version>1.0-alpha-5-SNAPSHOT</version>
|
|
||||||
</project>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<archetype>
|
|
||||||
<id>plugin</id>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/java/MyMojo.java</source>
|
|
||||||
</sources>
|
|
||||||
</archetype>
|
|
|
@ -1,23 +0,0 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<packaging>maven-plugin</packaging>
|
|
||||||
<version>${version}</version>
|
|
||||||
<name>Maven Mojo Archetype</name>
|
|
||||||
<url>http://maven.apache.org</url>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-plugin-api</artifactId>
|
|
||||||
<version>2.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
|
@ -1,81 +0,0 @@
|
||||||
package $package;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Goal which touches a timestamp file.
|
|
||||||
*
|
|
||||||
* @goal touch
|
|
||||||
*
|
|
||||||
* @phase process-sources
|
|
||||||
*/
|
|
||||||
public class MyMojo
|
|
||||||
extends AbstractMojo
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Location of the file.
|
|
||||||
* @parameter expression="${project.build.directory}"
|
|
||||||
* @required
|
|
||||||
*/
|
|
||||||
private File outputDirectory;
|
|
||||||
|
|
||||||
public void execute()
|
|
||||||
throws MojoExecutionException
|
|
||||||
{
|
|
||||||
File f = outputDirectory;
|
|
||||||
|
|
||||||
if ( !f.exists() )
|
|
||||||
{
|
|
||||||
f.mkdirs();
|
|
||||||
}
|
|
||||||
|
|
||||||
File touch = new File( f, "touch.txt" );
|
|
||||||
|
|
||||||
FileWriter w = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
w = new FileWriter( touch );
|
|
||||||
|
|
||||||
w.write( "touch.txt" );
|
|
||||||
}
|
|
||||||
catch ( IOException e )
|
|
||||||
{
|
|
||||||
throw new MojoExecutionException( "Error creating file " + touch, e );
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if ( w != null )
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
w.close();
|
|
||||||
}
|
|
||||||
catch ( IOException e )
|
|
||||||
{
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype-profiles</artifactId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</project>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<archetype>
|
|
||||||
<id>profiles</id>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/java/App.java</source>
|
|
||||||
</sources>
|
|
||||||
<testSources>
|
|
||||||
<source>src/test/java/AppTest.java</source>
|
|
||||||
</testSources>
|
|
||||||
</archetype>
|
|
|
@ -1,18 +0,0 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<version>${version}</version>
|
|
||||||
<name>Maven Quick Start Archetype</name>
|
|
||||||
<url>http://maven.apache.org</url>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
|
@ -1 +0,0 @@
|
||||||
environment=development
|
|
|
@ -1 +0,0 @@
|
||||||
environment=production
|
|
|
@ -1 +0,0 @@
|
||||||
environment=qa
|
|
|
@ -1,13 +0,0 @@
|
||||||
package $package;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hello world!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class App
|
|
||||||
{
|
|
||||||
public static void main( String[] args )
|
|
||||||
{
|
|
||||||
System.out.println( "Hello World!" );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
package $package;
|
|
||||||
|
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for simple App.
|
|
||||||
*/
|
|
||||||
public class AppTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create the test case
|
|
||||||
*
|
|
||||||
* @param testName name of the test case
|
|
||||||
*/
|
|
||||||
public AppTest( String testName )
|
|
||||||
{
|
|
||||||
super( testName );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the suite of tests being tested
|
|
||||||
*/
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
return new TestSuite( AppTest.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rigourous Test :-)
|
|
||||||
*/
|
|
||||||
public void testApp()
|
|
||||||
{
|
|
||||||
assertTrue( true );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype-quickstart</artifactId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</project>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<archetype>
|
|
||||||
<id>quickstart</id>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/java/App.java</source>
|
|
||||||
</sources>
|
|
||||||
<testSources>
|
|
||||||
<source>src/test/java/AppTest.java</source>
|
|
||||||
</testSources>
|
|
||||||
</archetype>
|
|
|
@ -1,18 +0,0 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<version>${version}</version>
|
|
||||||
<name>Maven Quick Start Archetype</name>
|
|
||||||
<url>http://maven.apache.org</url>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
|
@ -1,13 +0,0 @@
|
||||||
package $package;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hello world!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class App
|
|
||||||
{
|
|
||||||
public static void main( String[] args )
|
|
||||||
{
|
|
||||||
System.out.println( "Hello World!" );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
package $package;
|
|
||||||
|
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for simple App.
|
|
||||||
*/
|
|
||||||
public class AppTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create the test case
|
|
||||||
*
|
|
||||||
* @param testName name of the test case
|
|
||||||
*/
|
|
||||||
public AppTest( String testName )
|
|
||||||
{
|
|
||||||
super( testName );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the suite of tests being tested
|
|
||||||
*/
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
return new TestSuite( AppTest.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rigourous Test :-)
|
|
||||||
*/
|
|
||||||
public void testApp()
|
|
||||||
{
|
|
||||||
assertTrue( true );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<version>1.0-alpha-3</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype-site</artifactId>
|
|
||||||
<version>1.0-alpha-5-SNAPSHOT</version>
|
|
||||||
</project>
|
|
|
@ -1,16 +0,0 @@
|
||||||
<archetype>
|
|
||||||
<id>plugin</id>
|
|
||||||
<allowPartial>true</allowPartial>
|
|
||||||
<siteResources>
|
|
||||||
<resource>src/site/site.xml</resource>
|
|
||||||
<resource>src/site/site_fr.xml</resource>
|
|
||||||
<resource>src/site/apt/index.apt</resource>
|
|
||||||
<resource>src/site/apt/format.apt</resource>
|
|
||||||
<resource>src/site/fml/faq.fml</resource>
|
|
||||||
<resource>src/site/xdoc/xdoc.xml</resource>
|
|
||||||
<resource>src/site/fr/apt/index.apt</resource>
|
|
||||||
<resource>src/site/fr/apt/format.apt</resource>
|
|
||||||
<resource>src/site/fr/fml/faq.fml</resource>
|
|
||||||
<resource>src/site/fr/xdoc/xdoc.xml</resource>
|
|
||||||
</siteResources>
|
|
||||||
</archetype>
|
|
|
@ -1,26 +0,0 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<version>${version}</version>
|
|
||||||
<name>Maven</name>
|
|
||||||
<url>http://maven.apache.org/maven2</url>
|
|
||||||
<inceptionYear>2001</inceptionYear>
|
|
||||||
<distributionManagement>
|
|
||||||
<site>
|
|
||||||
<id>website</id>
|
|
||||||
<url>scp://webhost.company.com/www/website</url>
|
|
||||||
</site>
|
|
||||||
</distributionManagement>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<locales>en,fr</locales>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -1,596 +0,0 @@
|
||||||
|
|
||||||
The APT format
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
In the following section, boxes containing text in typewriter-like font are
|
|
||||||
examples of APT source.
|
|
||||||
|
|
||||||
* Document structure
|
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
A short APT document is contained in a single text file. A longer document
|
|
||||||
may be contained in a ordered list of text files. For instance, first text
|
|
||||||
file contains section 1, second text file contains section 2, and so on.
|
|
||||||
|
|
||||||
[Note:] Splitting the APT document in several text files on a section
|
|
||||||
boundary is not mandatory. The split may occur anywhere.
|
|
||||||
However doing so is recommended because a text file containing a
|
|
||||||
section is by itself a valid APT document.
|
|
||||||
|
|
||||||
A file contains a sequence of paragraphs and ``displays'' (non paragraphs
|
|
||||||
such as tables) separated by open lines.
|
|
||||||
|
|
||||||
A paragraph is simply a sequence of consecutive text lines.
|
|
||||||
|
|
||||||
+------------------------------------------------------------------------+
|
|
||||||
First line of first paragraph.
|
|
||||||
Second line of first paragraph.
|
|
||||||
Third line of first paragraph.
|
|
||||||
|
|
||||||
Line 1 of paragraph 2 (separated from first paragraph by an open line).
|
|
||||||
Line 2 of paragraph 2.
|
|
||||||
+------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
The indentation of the first line of a paragraph is the main method used by
|
|
||||||
an APT processor to recognize the type of the paragraph. For example, a
|
|
||||||
section title must not be indented at all.
|
|
||||||
|
|
||||||
A ``plain'' paragraph must be indented by a certain amount of space. For
|
|
||||||
example, a plain paragraph which is not contained in a list may be indented
|
|
||||||
by two spaces.
|
|
||||||
|
|
||||||
+-------------------------------------------------+
|
|
||||||
My section title (not indented).
|
|
||||||
|
|
||||||
My paragraph first line (indented by 2 spaces).
|
|
||||||
+-------------------------------------------------+
|
|
||||||
|
|
||||||
Indentation is not rigid. Any amount of space will do. You don't even need
|
|
||||||
to use a consistent indentation all over your document. What really matters
|
|
||||||
for an APT processor is whether the paragraph is not indented at all or,
|
|
||||||
when inside a list, whether a paragraph is more or less indented than the
|
|
||||||
first item of the list (more about this later).
|
|
||||||
|
|
||||||
+-------------------------------------------------------+
|
|
||||||
First paragraph has its first line indented by four
|
|
||||||
spaces. Then the author did even bother to indent the
|
|
||||||
other lines of the paragraph.
|
|
||||||
|
|
||||||
Second paragraph contains several lines which are all
|
|
||||||
indented by two spaces. This style is much nicer than
|
|
||||||
the one used for the previous paragraph.
|
|
||||||
+-------------------------------------------------------+
|
|
||||||
|
|
||||||
Note that tabs are expanded with a tab width set to 8.
|
|
||||||
|
|
||||||
* Document elements
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
** Block level elements
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
*** Title
|
|
||||||
~~~~~~~~~~
|
|
||||||
|
|
||||||
A title is optional. If used, it must appear as the first block of the
|
|
||||||
document.
|
|
||||||
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
------
|
|
||||||
Title
|
|
||||||
------
|
|
||||||
Author
|
|
||||||
------
|
|
||||||
Date
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
A title block is indented (centering it is nicer). It begins with a line
|
|
||||||
containing at least 3 dashes (<<<--->>>).
|
|
||||||
|
|
||||||
After the first <<<--->>> line, one or several consecutive lines of text
|
|
||||||
(implicit line break after each line) specify the title of the document.
|
|
||||||
|
|
||||||
This text may immediately be followed by another <<<--->>> line and one or
|
|
||||||
several consecutive lines of text which specifies the author of the
|
|
||||||
document.
|
|
||||||
|
|
||||||
The author sub-block may optionaly be followed by a date sub-block using the
|
|
||||||
same syntax.
|
|
||||||
|
|
||||||
The following example is used for a document with an title and a date but
|
|
||||||
with no declared author.
|
|
||||||
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
------
|
|
||||||
Title
|
|
||||||
------
|
|
||||||
------
|
|
||||||
Date
|
|
||||||
------
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
The last line is ignored. It is just there to make the block nicer.
|
|
||||||
|
|
||||||
*** Paragraph
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Paragraphs other than the title block may appear before the first section.
|
|
||||||
|
|
||||||
+----------------------+
|
|
||||||
Paragraph 1, line 1.
|
|
||||||
Paragraph 1, line 2.
|
|
||||||
|
|
||||||
Paragraph 2, line 1.
|
|
||||||
Paragraph 2, line 2.
|
|
||||||
+----------------------+
|
|
||||||
|
|
||||||
Paragraphs are indented. They have already been described in the {{document
|
|
||||||
structure}} section.
|
|
||||||
|
|
||||||
*** Section
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Sections are created by inserting section titles into the document. Simple
|
|
||||||
documents need not contain sections.
|
|
||||||
|
|
||||||
+-----------------------------------+
|
|
||||||
Section title
|
|
||||||
|
|
||||||
* Sub-section title
|
|
||||||
|
|
||||||
** Sub-sub-section title
|
|
||||||
|
|
||||||
*** Sub-sub-sub-section title
|
|
||||||
|
|
||||||
**** Sub-sub-sub-sub-section title
|
|
||||||
+-----------------------------------+
|
|
||||||
|
|
||||||
Section titles are not indented. A sub-section title begins with one
|
|
||||||
asterisk (<<<*>>>), a sub-sub-section title begins with two asterisks
|
|
||||||
(<<<**>>>), and so forth up to four sub-section levels.
|
|
||||||
|
|
||||||
*** List
|
|
||||||
~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------------------------+
|
|
||||||
* List item 1.
|
|
||||||
|
|
||||||
* List item 2.
|
|
||||||
|
|
||||||
Paragraph contained in list item 2.
|
|
||||||
|
|
||||||
* Sub-list item 1.
|
|
||||||
|
|
||||||
* Sub-list item 2.
|
|
||||||
|
|
||||||
* List item 3.
|
|
||||||
+---------------------------------------+
|
|
||||||
|
|
||||||
List items are indented and begin with a asterisk (<<<*>>>).
|
|
||||||
|
|
||||||
Plain paragraphs more indented than the first list item are nested in that
|
|
||||||
list. Displays such as tables (not indented) are always nested in the
|
|
||||||
current list.
|
|
||||||
|
|
||||||
To nest a list inside a list, indent its first item more than its parent
|
|
||||||
list. To end a list, add a paragraph or list item less indented than the
|
|
||||||
current list.
|
|
||||||
|
|
||||||
Section titles always end a list. Displays cannot end a list but the
|
|
||||||
<<<[]>>> pseudo-element may be used to force the end of a list.
|
|
||||||
|
|
||||||
+------------------------------------+
|
|
||||||
* List item 3.
|
|
||||||
Force end of list:
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
--------------------------------------------
|
|
||||||
Verbatim text not contained in list item 3
|
|
||||||
--------------------------------------------
|
|
||||||
+------------------------------------+
|
|
||||||
|
|
||||||
In the previous example, without the <<<[]>>>, the verbatim text (not
|
|
||||||
indented as all displays) would have been contained in list item 3.
|
|
||||||
|
|
||||||
A single <<<[]>>> may be used to end several nested lists at the same
|
|
||||||
time. The indentation of <<<[]>>> may be used to specify exactly which
|
|
||||||
lists should be ended. Example:
|
|
||||||
|
|
||||||
+------------------------------------+
|
|
||||||
* List item 1.
|
|
||||||
|
|
||||||
* List item 2.
|
|
||||||
|
|
||||||
* Sub-list item 1.
|
|
||||||
|
|
||||||
* Sub-list item 2.
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Verbatim text contained in list item 2, but not in sub-list item 2
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
+------------------------------------+
|
|
||||||
|
|
||||||
There are three kind of lists, the bulleted lists we have already described,
|
|
||||||
the numbered lists and the definition lists.
|
|
||||||
|
|
||||||
+-----------------------------------------+
|
|
||||||
[[1]] Numbered item 1.
|
|
||||||
|
|
||||||
[[A]] Numbered item A.
|
|
||||||
|
|
||||||
[[B]] Numbered item B.
|
|
||||||
|
|
||||||
[[2]] Numbered item 2.
|
|
||||||
+-----------------------------------------+
|
|
||||||
|
|
||||||
A numbered list item begins with a label beetween two square brackets. The
|
|
||||||
label of the first item establishes the numbering scheme for the whole list:
|
|
||||||
|
|
||||||
[<<<[[1\]\]>>>] Decimal numbering: 1, 2, 3, 4, etc.
|
|
||||||
|
|
||||||
[<<<[[a\]\]>>>] Lower-alpha numbering: a, b, c, d, etc.
|
|
||||||
|
|
||||||
[<<<[[A\]\]>>>] Upper-alpha numbering: A, B, C, D, etc.
|
|
||||||
|
|
||||||
[<<<[[i\]\]>>>] Lower-roman numbering: i, ii, iii, iv, etc.
|
|
||||||
|
|
||||||
[<<<[[I\]\]>>>] Upper-roman numbering: I, II, III, IV, etc.
|
|
||||||
|
|
||||||
The labels of the items other than the first one are ignored. It is
|
|
||||||
recommended to take the time to type the correct label for each item in
|
|
||||||
order to keep the APT source document readable.
|
|
||||||
|
|
||||||
+-------------------------------------------+
|
|
||||||
[Defined term 1] of definition list 2.
|
|
||||||
|
|
||||||
[Defined term 2] of definition list 2.
|
|
||||||
+-------------------------------------------+
|
|
||||||
|
|
||||||
A definition list item begins with a defined term: text between square
|
|
||||||
brackets.
|
|
||||||
|
|
||||||
*** Verbatim text
|
|
||||||
~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+----------------------------------------+
|
|
||||||
----------------------------------------
|
|
||||||
Verbatim
|
|
||||||
text,
|
|
||||||
preformatted,
|
|
||||||
escaped.
|
|
||||||
----------------------------------------
|
|
||||||
+----------------------------------------+
|
|
||||||
|
|
||||||
A verbatim block is not indented. It begins with a non indented line
|
|
||||||
containing at least 3 dashes (<<<--->>>). It ends with a similar line.
|
|
||||||
|
|
||||||
<<<+-->>> instead of <<<--->>> draws a box around verbatim text.
|
|
||||||
|
|
||||||
Like in HTML, verbatim text is preformatted. Unlike HTML, verbatim text is
|
|
||||||
escaped: inside a verbatim display, markup is not interpreted by the APT
|
|
||||||
processor.
|
|
||||||
|
|
||||||
*** Figure
|
|
||||||
~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------------+
|
|
||||||
[Figure name] Figure caption
|
|
||||||
+---------------------------+
|
|
||||||
|
|
||||||
A figure block is not indented. It begins with the figure name between
|
|
||||||
square brackets. The figure name is optionally followed by some text: the
|
|
||||||
figure caption.
|
|
||||||
|
|
||||||
The figure name is the pathname of the file containing the figure but
|
|
||||||
without an extension. Example: if your figure is contained in
|
|
||||||
<<</home/joe/docs/mylogo.jpeg>>>, the figure name is
|
|
||||||
<<</home/joe/docs/mylogo>>>.
|
|
||||||
|
|
||||||
If the figure name comes from a relative pathname (recommended practice)
|
|
||||||
rather than from an absolute pathname, this relative pathname is taken to be
|
|
||||||
relative to the directory of the current APT document (a la HTML)
|
|
||||||
rather than relative to the current working directory.
|
|
||||||
|
|
||||||
Why not leave the file extension in the figure name? This is better
|
|
||||||
explained by an example. You need to convert an APT document to PostScript
|
|
||||||
and your figure name is <<</home/joe/docs/mylogo>>>. A APT processor will
|
|
||||||
first try to load <<</home/joe/docs/mylogo.eps>>>. When the desired format
|
|
||||||
is not found, a APT processor tries to convert one of the existing
|
|
||||||
formats. In our example, the APT processor tries to convert
|
|
||||||
<<</home/joe/docs/mylogo.jpeg>>> to encapsulated PostScript.
|
|
||||||
|
|
||||||
*** Table
|
|
||||||
~~~~~~~~~
|
|
||||||
|
|
||||||
A table block is not indented. It begins with a non indented line containing
|
|
||||||
an asterisk and at least 2 dashes (<<<*-->>>). It ends with a
|
|
||||||
similar line.
|
|
||||||
|
|
||||||
The first line is not only used to recognize a table but also to specify
|
|
||||||
column justification. In the following example,
|
|
||||||
|
|
||||||
* the second asterisk (<<<*>>>) is used to specify that column 1 is
|
|
||||||
centered,
|
|
||||||
|
|
||||||
* the plus sign (<<<+>>>) specifies that column 2 is left aligned,
|
|
||||||
|
|
||||||
* the colon (<<<:>>>) specifies that column 3 is right aligned.
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
+---------------------------------------------+
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| Centered | Left-aligned | Right-aligned |
|
|
||||||
| cell 1,1 | cell 1,2 | cell 1,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| cell 2,1 | cell 2,2 | cell 2,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
Table caption
|
|
||||||
+---------------------------------------------+
|
|
||||||
|
|
||||||
Rows are separated by a non indented line beginning with <<<*-->>>.
|
|
||||||
|
|
||||||
An optional table caption (non indented text) may immediately follow the
|
|
||||||
table.
|
|
||||||
|
|
||||||
Rows may contain single line or multiple line cells. Each line of cell text
|
|
||||||
is separated from the adjacent cell by the pipe character (<<<|>>>).
|
|
||||||
(<<<|>>> may be used in the cell text if quoted: <<<\\|>>>.)
|
|
||||||
|
|
||||||
The last <<<|>>> is only used to make the table nicer. The first <<<|>>> is
|
|
||||||
not only used to make the table nicer, but also to specify that a grid is to
|
|
||||||
be drawn around table cells.
|
|
||||||
|
|
||||||
The following example shows a simple table with no grid and no caption.
|
|
||||||
|
|
||||||
+---------------+
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
+---------------+
|
|
||||||
|
|
||||||
*** Horizontal rule
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------+
|
|
||||||
=====================
|
|
||||||
+---------------------+
|
|
||||||
|
|
||||||
A non indented line containing at least 3 equal signs (<<<===>>>).
|
|
||||||
|
|
||||||
*** Page break
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---+
|
|
||||||
^L
|
|
||||||
+---+
|
|
||||||
|
|
||||||
A non indented line containing a single form feed character (Control-L).
|
|
||||||
|
|
||||||
** Text level elements
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
*** Font
|
|
||||||
~~~~~~~~
|
|
||||||
|
|
||||||
+-----------------------------------------------------+
|
|
||||||
<Italic> font. <<Bold>> font. <<<Monospaced>>> font.
|
|
||||||
+-----------------------------------------------------+
|
|
||||||
|
|
||||||
Text between \< and > must be rendered in italic. Text between \<\< and >>
|
|
||||||
must be rendered in bold. Text between \<\<\< and >>> must be rendered using
|
|
||||||
a monospaced, typewriter-like font.
|
|
||||||
|
|
||||||
Font elements may appear anywhere except inside other font elements.
|
|
||||||
|
|
||||||
It is not recommended to use font elements inside titles, section titles,
|
|
||||||
links and defined terms because a APT processor automatically applies
|
|
||||||
appropriate font styles to these elements.
|
|
||||||
|
|
||||||
*** Anchor and link
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+-----------------------------------------------------------------+
|
|
||||||
{Anchor}. Link to {{anchor}}. Link to {{http://www.pixware.fr}}.
|
|
||||||
Link to {{{anchor}showing alternate text}}.
|
|
||||||
Link to {{{http://www.pixware.fr}Pixware home page}}.
|
|
||||||
+-----------------------------------------------------------------+
|
|
||||||
|
|
||||||
Text between curly braces (<<<\{}>>>) specifies an anchor. Text between
|
|
||||||
double curly braces (<<<\{\{}}>>>) specifies a link.
|
|
||||||
|
|
||||||
It is an error to create a link element that does not refer to an anchor of
|
|
||||||
the same name. The name of an anchor/link is its text with all non
|
|
||||||
alphanumeric characters stripped.
|
|
||||||
|
|
||||||
This rule does not apply to links to <external> anchors. Text beginning
|
|
||||||
with <<<http:/>>>, <<<https:/>>>, <<<ftp:/>>>, <<<file:/>>>, <<<mailto:>>>,
|
|
||||||
<<<../>>>, <<<./>>> (<<<..\\>>> and <<<.\\>>> on Windows) is recognized as
|
|
||||||
an external anchor name.
|
|
||||||
|
|
||||||
When the construct <<\{\{\{>><name><<}>><text><<}}>> is used, the link text
|
|
||||||
<text> may differ from the link name <name>.
|
|
||||||
|
|
||||||
Anchor/link elements may appear anywhere except inside other anchor/link
|
|
||||||
elements.
|
|
||||||
|
|
||||||
Section titles are implicitly defined anchors.
|
|
||||||
|
|
||||||
*** Line break
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+-------------+
|
|
||||||
Force line\
|
|
||||||
break.
|
|
||||||
+-------------+
|
|
||||||
|
|
||||||
A backslash character (<<<\\>>>) followed by a newline character.
|
|
||||||
|
|
||||||
Line breaks must not be used inside titles and tables (which are line
|
|
||||||
oriented blocks with implicit line breaks).
|
|
||||||
|
|
||||||
*** Non breaking space
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+----------------------+
|
|
||||||
Non\ breaking\ space.
|
|
||||||
+----------------------+
|
|
||||||
|
|
||||||
A backslash character (<<<\\>>>) followed by a space character.
|
|
||||||
|
|
||||||
*** Special character
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------------------------------------------------------------+
|
|
||||||
Escaped special characters: \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\.
|
|
||||||
+---------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
In certain contexts, these characters have a special meaning and therefore
|
|
||||||
must be escaped if needed as is. They are escaped by adding a backslash in
|
|
||||||
front of them. The backslash may itself be escaped by adding another
|
|
||||||
backslash in front of it.
|
|
||||||
|
|
||||||
Note that an asterisk, for example, needs to be escaped only if its begins a
|
|
||||||
paragraph. (<<<*>>> has no special meaning in the middle of a paragraph.)
|
|
||||||
|
|
||||||
+--------------------------------------+
|
|
||||||
Copyright symbol: \251, \xA9, \u00a9.
|
|
||||||
+--------------------------------------+
|
|
||||||
|
|
||||||
Latin-1 characters (whatever is the encoding of the APT document) may be
|
|
||||||
specified by their codes using a backslash followed by one to three octal
|
|
||||||
digits or by using the <<<\x>>><NN> notation, where <NN> are two hexadecimal
|
|
||||||
digits.
|
|
||||||
|
|
||||||
Unicode characters may be specified by their codes using the <<<\u>>><NNNN>
|
|
||||||
notation, where <NNNN> are four hexadecimal digits.
|
|
||||||
|
|
||||||
*** Comment
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------+
|
|
||||||
~~Commented out.
|
|
||||||
+---------------+
|
|
||||||
|
|
||||||
Text found after two tildes (<<<\~~>>>) is ignored up to the end of line.
|
|
||||||
|
|
||||||
A line of <<<~>>> is often used to ``underline'' section titles in order to
|
|
||||||
make them stand out of other paragraphs.
|
|
||||||
|
|
||||||
|
|
||||||
* The APT format at a glance
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
------
|
|
||||||
Title
|
|
||||||
------
|
|
||||||
Author
|
|
||||||
------
|
|
||||||
Date
|
|
||||||
|
|
||||||
Paragraph 1, line 1.
|
|
||||||
Paragraph 1, line 2.
|
|
||||||
|
|
||||||
Paragraph 2, line 1.
|
|
||||||
Paragraph 2, line 2.
|
|
||||||
|
|
||||||
Section title
|
|
||||||
|
|
||||||
* Sub-section title
|
|
||||||
|
|
||||||
** Sub-sub-section title
|
|
||||||
|
|
||||||
*** Sub-sub-sub-section title
|
|
||||||
|
|
||||||
**** Sub-sub-sub-sub-section title
|
|
||||||
|
|
||||||
* List item 1.
|
|
||||||
|
|
||||||
* List item 2.
|
|
||||||
|
|
||||||
Paragraph contained in list item 2.
|
|
||||||
|
|
||||||
* Sub-list item 1.
|
|
||||||
|
|
||||||
* Sub-list item 2.
|
|
||||||
|
|
||||||
* List item 3.
|
|
||||||
Force end of list:
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
+------------------------------------------+
|
|
||||||
Verbatim text not contained in list item 3
|
|
||||||
+------------------------------------------+
|
|
||||||
|
|
||||||
[[1]] Numbered item 1.
|
|
||||||
|
|
||||||
[[A]] Numbered item A.
|
|
||||||
|
|
||||||
[[B]] Numbered item B.
|
|
||||||
|
|
||||||
[[2]] Numbered item 2.
|
|
||||||
|
|
||||||
List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]].
|
|
||||||
|
|
||||||
[Defined term 1] of definition list.
|
|
||||||
|
|
||||||
[Defined term 2] of definition list.
|
|
||||||
|
|
||||||
+-------------------------------+
|
|
||||||
Verbatim text
|
|
||||||
in a box
|
|
||||||
+-------------------------------+
|
|
||||||
|
|
||||||
--- instead of +-- suppresses the box around verbatim text.
|
|
||||||
|
|
||||||
[Figure name] Figure caption
|
|
||||||
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| Centered | Left-aligned | Right-aligned |
|
|
||||||
| cell 1,1 | cell 1,2 | cell 1,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| cell 2,1 | cell 2,2 | cell 2,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
Table caption
|
|
||||||
|
|
||||||
No grid, no caption:
|
|
||||||
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
|
|
||||||
Horizontal line:
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
|
|
||||||
^L
|
|
||||||
New page.
|
|
||||||
|
|
||||||
<Italic> font. <<Bold>> font. <<<Monospaced>>> font.
|
|
||||||
|
|
||||||
{Anchor}. Link to {{anchor}}. Link to {{http://www.pixware.fr}}.
|
|
||||||
Link to {{{anchor}showing alternate text}}.
|
|
||||||
Link to {{{http://www.pixware.fr}Pixware home page}}.
|
|
||||||
|
|
||||||
Force line\
|
|
||||||
break.
|
|
||||||
|
|
||||||
Non\ breaking\ space.
|
|
||||||
|
|
||||||
Escaped special characters: \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\.
|
|
||||||
|
|
||||||
Copyright symbol: \251, \xA9, \u00a9.
|
|
||||||
|
|
||||||
~~Commented out.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
-----
|
|
||||||
The Site
|
|
||||||
-----
|
|
||||||
The Maven Team
|
|
||||||
-----
|
|
||||||
|
|
||||||
Maven Site for your project
|
|
||||||
|
|
||||||
Congratulations! If you are looking at this page then you have successfully generated a
|
|
||||||
template site employing the site archetype and you have run:
|
|
||||||
|
|
||||||
+-----+
|
|
||||||
|
|
||||||
m2 site:site
|
|
||||||
|
|
||||||
+-----+
|
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<faqs id="General FAQ">
|
|
||||||
<part id="General">
|
|
||||||
<faq id="where">
|
|
||||||
<question>Where did Maven come from?</question>
|
|
||||||
<answer>
|
|
||||||
<p>
|
|
||||||
Maven was created by a group of software developers who were tired
|
|
||||||
of wasting their time fiddling around with builds and wanted to get
|
|
||||||
down to brass tacks and actually develop software!
|
|
||||||
</p>
|
|
||||||
</answer>
|
|
||||||
</faq>
|
|
||||||
<faq id="why">
|
|
||||||
<question>Why is maven so wildly popular?</question>
|
|
||||||
<answer>
|
|
||||||
<p>
|
|
||||||
Maven saves you so much time in your software development efforts that
|
|
||||||
you will have time to learn a second language, relax ten hours a
|
|
||||||
day, and train for that marathon you've always wanted to run!
|
|
||||||
</p>
|
|
||||||
</answer>
|
|
||||||
</faq>
|
|
||||||
</part>
|
|
||||||
</faqs>
|
|
|
@ -1,596 +0,0 @@
|
||||||
|
|
||||||
Le format APT
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Dans la section suivante, les boîtes contenant du texte dans la police
|
|
||||||
de type machine à écrire sont des exemples de source APT.
|
|
||||||
|
|
||||||
* Structure du document
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
A short APT document is contained in a single text file. A longer document
|
|
||||||
may be contained in a ordered list of text files. For instance, first text
|
|
||||||
file contains section 1, second text file contains section 2, and so on.
|
|
||||||
|
|
||||||
[Note:] Splitting the APT document in several text files on a section
|
|
||||||
boundary is not mandatory. The split may occur anywhere.
|
|
||||||
However doing so is recommended because a text file containing a
|
|
||||||
section is by itself a valid APT document.
|
|
||||||
|
|
||||||
A file contains a sequence of paragraphs and ``displays'' (non paragraphs
|
|
||||||
such as tables) separated by open lines.
|
|
||||||
|
|
||||||
A paragraph is simply a sequence of consecutive text lines.
|
|
||||||
|
|
||||||
+------------------------------------------------------------------------+
|
|
||||||
First line of first paragraph.
|
|
||||||
Second line of first paragraph.
|
|
||||||
Third line of first paragraph.
|
|
||||||
|
|
||||||
Line 1 of paragraph 2 (separated from first paragraph by an open line).
|
|
||||||
Line 2 of paragraph 2.
|
|
||||||
+------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
The indentation of the first line of a paragraph is the main method used by
|
|
||||||
an APT processor to recognize the type of the paragraph. For example, a
|
|
||||||
section title must not be indented at all.
|
|
||||||
|
|
||||||
A ``plain'' paragraph must be indented by a certain amount of space. For
|
|
||||||
example, a plain paragraph which is not contained in a list may be indented
|
|
||||||
by two spaces.
|
|
||||||
|
|
||||||
+-------------------------------------------------+
|
|
||||||
My section title (not indented).
|
|
||||||
|
|
||||||
My paragraph first line (indented by 2 spaces).
|
|
||||||
+-------------------------------------------------+
|
|
||||||
|
|
||||||
Indentation is not rigid. Any amount of space will do. You don't even need
|
|
||||||
to use a consistent indentation all over your document. What really matters
|
|
||||||
for an APT processor is whether the paragraph is not indented at all or,
|
|
||||||
when inside a list, whether a paragraph is more or less indented than the
|
|
||||||
first item of the list (more about this later).
|
|
||||||
|
|
||||||
+-------------------------------------------------------+
|
|
||||||
First paragraph has its first line indented by four
|
|
||||||
spaces. Then the author did even bother to indent the
|
|
||||||
other lines of the paragraph.
|
|
||||||
|
|
||||||
Second paragraph contains several lines which are all
|
|
||||||
indented by two spaces. This style is much nicer than
|
|
||||||
the one used for the previous paragraph.
|
|
||||||
+-------------------------------------------------------+
|
|
||||||
|
|
||||||
Note that tabs are expanded with a tab width set to 8.
|
|
||||||
|
|
||||||
* Document elements
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
** Block level elements
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
*** Title
|
|
||||||
~~~~~~~~~~
|
|
||||||
|
|
||||||
A title is optional. If used, it must appear as the first block of the
|
|
||||||
document.
|
|
||||||
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
------
|
|
||||||
Title
|
|
||||||
------
|
|
||||||
Author
|
|
||||||
------
|
|
||||||
Date
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
A title block is indented (centering it is nicer). It begins with a line
|
|
||||||
containing at least 3 dashes (<<<--->>>).
|
|
||||||
|
|
||||||
After the first <<<--->>> line, one or several consecutive lines of text
|
|
||||||
(implicit line break after each line) specify the title of the document.
|
|
||||||
|
|
||||||
This text may immediately be followed by another <<<--->>> line and one or
|
|
||||||
several consecutive lines of text which specifies the author of the
|
|
||||||
document.
|
|
||||||
|
|
||||||
The author sub-block may optionaly be followed by a date sub-block using the
|
|
||||||
same syntax.
|
|
||||||
|
|
||||||
The following example is used for a document with an title and a date but
|
|
||||||
with no declared author.
|
|
||||||
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
------
|
|
||||||
Title
|
|
||||||
------
|
|
||||||
------
|
|
||||||
Date
|
|
||||||
------
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
The last line is ignored. It is just there to make the block nicer.
|
|
||||||
|
|
||||||
*** Paragraph
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Paragraphs other than the title block may appear before the first section.
|
|
||||||
|
|
||||||
+----------------------+
|
|
||||||
Paragraph 1, line 1.
|
|
||||||
Paragraph 1, line 2.
|
|
||||||
|
|
||||||
Paragraph 2, line 1.
|
|
||||||
Paragraph 2, line 2.
|
|
||||||
+----------------------+
|
|
||||||
|
|
||||||
Paragraphs are indented. They have already been described in the {{document
|
|
||||||
structure}} section.
|
|
||||||
|
|
||||||
*** Section
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Sections are created by inserting section titles into the document. Simple
|
|
||||||
documents need not contain sections.
|
|
||||||
|
|
||||||
+-----------------------------------+
|
|
||||||
Section title
|
|
||||||
|
|
||||||
* Sub-section title
|
|
||||||
|
|
||||||
** Sub-sub-section title
|
|
||||||
|
|
||||||
*** Sub-sub-sub-section title
|
|
||||||
|
|
||||||
**** Sub-sub-sub-sub-section title
|
|
||||||
+-----------------------------------+
|
|
||||||
|
|
||||||
Section titles are not indented. A sub-section title begins with one
|
|
||||||
asterisk (<<<*>>>), a sub-sub-section title begins with two asterisks
|
|
||||||
(<<<**>>>), and so forth up to four sub-section levels.
|
|
||||||
|
|
||||||
*** List
|
|
||||||
~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------------------------+
|
|
||||||
* List item 1.
|
|
||||||
|
|
||||||
* List item 2.
|
|
||||||
|
|
||||||
Paragraph contained in list item 2.
|
|
||||||
|
|
||||||
* Sub-list item 1.
|
|
||||||
|
|
||||||
* Sub-list item 2.
|
|
||||||
|
|
||||||
* List item 3.
|
|
||||||
+---------------------------------------+
|
|
||||||
|
|
||||||
List items are indented and begin with a asterisk (<<<*>>>).
|
|
||||||
|
|
||||||
Plain paragraphs more indented than the first list item are nested in that
|
|
||||||
list. Displays such as tables (not indented) are always nested in the
|
|
||||||
current list.
|
|
||||||
|
|
||||||
To nest a list inside a list, indent its first item more than its parent
|
|
||||||
list. To end a list, add a paragraph or list item less indented than the
|
|
||||||
current list.
|
|
||||||
|
|
||||||
Section titles always end a list. Displays cannot end a list but the
|
|
||||||
<<<[]>>> pseudo-element may be used to force the end of a list.
|
|
||||||
|
|
||||||
+------------------------------------+
|
|
||||||
* List item 3.
|
|
||||||
Force end of list:
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
--------------------------------------------
|
|
||||||
Verbatim text not contained in list item 3
|
|
||||||
--------------------------------------------
|
|
||||||
+------------------------------------+
|
|
||||||
|
|
||||||
In the previous example, without the <<<[]>>>, the verbatim text (not
|
|
||||||
indented as all displays) would have been contained in list item 3.
|
|
||||||
|
|
||||||
A single <<<[]>>> may be used to end several nested lists at the same
|
|
||||||
time. The indentation of <<<[]>>> may be used to specify exactly which
|
|
||||||
lists should be ended. Example:
|
|
||||||
|
|
||||||
+------------------------------------+
|
|
||||||
* List item 1.
|
|
||||||
|
|
||||||
* List item 2.
|
|
||||||
|
|
||||||
* Sub-list item 1.
|
|
||||||
|
|
||||||
* Sub-list item 2.
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Verbatim text contained in list item 2, but not in sub-list item 2
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
+------------------------------------+
|
|
||||||
|
|
||||||
There are three kind of lists, the bulleted lists we have already described,
|
|
||||||
the numbered lists and the definition lists.
|
|
||||||
|
|
||||||
+-----------------------------------------+
|
|
||||||
[[1]] Numbered item 1.
|
|
||||||
|
|
||||||
[[A]] Numbered item A.
|
|
||||||
|
|
||||||
[[B]] Numbered item B.
|
|
||||||
|
|
||||||
[[2]] Numbered item 2.
|
|
||||||
+-----------------------------------------+
|
|
||||||
|
|
||||||
A numbered list item begins with a label beetween two square brackets. The
|
|
||||||
label of the first item establishes the numbering scheme for the whole list:
|
|
||||||
|
|
||||||
[<<<[[1\]\]>>>] Decimal numbering: 1, 2, 3, 4, etc.
|
|
||||||
|
|
||||||
[<<<[[a\]\]>>>] Lower-alpha numbering: a, b, c, d, etc.
|
|
||||||
|
|
||||||
[<<<[[A\]\]>>>] Upper-alpha numbering: A, B, C, D, etc.
|
|
||||||
|
|
||||||
[<<<[[i\]\]>>>] Lower-roman numbering: i, ii, iii, iv, etc.
|
|
||||||
|
|
||||||
[<<<[[I\]\]>>>] Upper-roman numbering: I, II, III, IV, etc.
|
|
||||||
|
|
||||||
The labels of the items other than the first one are ignored. It is
|
|
||||||
recommended to take the time to type the correct label for each item in
|
|
||||||
order to keep the APT source document readable.
|
|
||||||
|
|
||||||
+-------------------------------------------+
|
|
||||||
[Defined term 1] of definition list 2.
|
|
||||||
|
|
||||||
[Defined term 2] of definition list 2.
|
|
||||||
+-------------------------------------------+
|
|
||||||
|
|
||||||
A definition list item begins with a defined term: text between square
|
|
||||||
brackets.
|
|
||||||
|
|
||||||
*** Verbatim text
|
|
||||||
~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+----------------------------------------+
|
|
||||||
----------------------------------------
|
|
||||||
Verbatim
|
|
||||||
text,
|
|
||||||
preformatted,
|
|
||||||
escaped.
|
|
||||||
----------------------------------------
|
|
||||||
+----------------------------------------+
|
|
||||||
|
|
||||||
A verbatim block is not indented. It begins with a non indented line
|
|
||||||
containing at least 3 dashes (<<<--->>>). It ends with a similar line.
|
|
||||||
|
|
||||||
<<<+-->>> instead of <<<--->>> draws a box around verbatim text.
|
|
||||||
|
|
||||||
Like in HTML, verbatim text is preformatted. Unlike HTML, verbatim text is
|
|
||||||
escaped: inside a verbatim display, markup is not interpreted by the APT
|
|
||||||
processor.
|
|
||||||
|
|
||||||
*** Figure
|
|
||||||
~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------------+
|
|
||||||
[Figure name] Figure caption
|
|
||||||
+---------------------------+
|
|
||||||
|
|
||||||
A figure block is not indented. It begins with the figure name between
|
|
||||||
square brackets. The figure name is optionally followed by some text: the
|
|
||||||
figure caption.
|
|
||||||
|
|
||||||
The figure name is the pathname of the file containing the figure but
|
|
||||||
without an extension. Example: if your figure is contained in
|
|
||||||
<<</home/joe/docs/mylogo.jpeg>>>, the figure name is
|
|
||||||
<<</home/joe/docs/mylogo>>>.
|
|
||||||
|
|
||||||
If the figure name comes from a relative pathname (recommended practice)
|
|
||||||
rather than from an absolute pathname, this relative pathname is taken to be
|
|
||||||
relative to the directory of the current APT document (a la HTML)
|
|
||||||
rather than relative to the current working directory.
|
|
||||||
|
|
||||||
Why not leave the file extension in the figure name? This is better
|
|
||||||
explained by an example. You need to convert an APT document to PostScript
|
|
||||||
and your figure name is <<</home/joe/docs/mylogo>>>. A APT processor will
|
|
||||||
first try to load <<</home/joe/docs/mylogo.eps>>>. When the desired format
|
|
||||||
is not found, a APT processor tries to convert one of the existing
|
|
||||||
formats. In our example, the APT processor tries to convert
|
|
||||||
<<</home/joe/docs/mylogo.jpeg>>> to encapsulated PostScript.
|
|
||||||
|
|
||||||
*** Table
|
|
||||||
~~~~~~~~~
|
|
||||||
|
|
||||||
A table block is not indented. It begins with a non indented line containing
|
|
||||||
an asterisk and at least 2 dashes (<<<*-->>>). It ends with a
|
|
||||||
similar line.
|
|
||||||
|
|
||||||
The first line is not only used to recognize a table but also to specify
|
|
||||||
column justification. In the following example,
|
|
||||||
|
|
||||||
* the second asterisk (<<<*>>>) is used to specify that column 1 is
|
|
||||||
centered,
|
|
||||||
|
|
||||||
* the plus sign (<<<+>>>) specifies that column 2 is left aligned,
|
|
||||||
|
|
||||||
* the colon (<<<:>>>) specifies that column 3 is right aligned.
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
+---------------------------------------------+
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| Centered | Left-aligned | Right-aligned |
|
|
||||||
| cell 1,1 | cell 1,2 | cell 1,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| cell 2,1 | cell 2,2 | cell 2,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
Table caption
|
|
||||||
+---------------------------------------------+
|
|
||||||
|
|
||||||
Rows are separated by a non indented line beginning with <<<*-->>>.
|
|
||||||
|
|
||||||
An optional table caption (non indented text) may immediately follow the
|
|
||||||
table.
|
|
||||||
|
|
||||||
Rows may contain single line or multiple line cells. Each line of cell text
|
|
||||||
is separated from the adjacent cell by the pipe character (<<<|>>>).
|
|
||||||
(<<<|>>> may be used in the cell text if quoted: <<<\\|>>>.)
|
|
||||||
|
|
||||||
The last <<<|>>> is only used to make the table nicer. The first <<<|>>> is
|
|
||||||
not only used to make the table nicer, but also to specify that a grid is to
|
|
||||||
be drawn around table cells.
|
|
||||||
|
|
||||||
The following example shows a simple table with no grid and no caption.
|
|
||||||
|
|
||||||
+---------------+
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
+---------------+
|
|
||||||
|
|
||||||
*** Horizontal rule
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------+
|
|
||||||
=====================
|
|
||||||
+---------------------+
|
|
||||||
|
|
||||||
A non indented line containing at least 3 equal signs (<<<===>>>).
|
|
||||||
|
|
||||||
*** Page break
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---+
|
|
||||||
^L
|
|
||||||
+---+
|
|
||||||
|
|
||||||
A non indented line containing a single form feed character (Control-L).
|
|
||||||
|
|
||||||
** Text level elements
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
*** Font
|
|
||||||
~~~~~~~~
|
|
||||||
|
|
||||||
+-----------------------------------------------------+
|
|
||||||
<Italic> font. <<Bold>> font. <<<Monospaced>>> font.
|
|
||||||
+-----------------------------------------------------+
|
|
||||||
|
|
||||||
Text between \< and > must be rendered in italic. Text between \<\< and >>
|
|
||||||
must be rendered in bold. Text between \<\<\< and >>> must be rendered using
|
|
||||||
a monospaced, typewriter-like font.
|
|
||||||
|
|
||||||
Font elements may appear anywhere except inside other font elements.
|
|
||||||
|
|
||||||
It is not recommended to use font elements inside titles, section titles,
|
|
||||||
links and defined terms because a APT processor automatically applies
|
|
||||||
appropriate font styles to these elements.
|
|
||||||
|
|
||||||
*** Anchor and link
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+-----------------------------------------------------------------+
|
|
||||||
{Anchor}. Link to {{anchor}}. Link to {{http://www.pixware.fr}}.
|
|
||||||
Link to {{{anchor}showing alternate text}}.
|
|
||||||
Link to {{{http://www.pixware.fr}Pixware home page}}.
|
|
||||||
+-----------------------------------------------------------------+
|
|
||||||
|
|
||||||
Text between curly braces (<<<\{}>>>) specifies an anchor. Text between
|
|
||||||
double curly braces (<<<\{\{}}>>>) specifies a link.
|
|
||||||
|
|
||||||
It is an error to create a link element that does not refer to an anchor of
|
|
||||||
the same name. The name of an anchor/link is its text with all non
|
|
||||||
alphanumeric characters stripped.
|
|
||||||
|
|
||||||
This rule does not apply to links to <external> anchors. Text beginning
|
|
||||||
with <<<http:/>>>, <<<https:/>>>, <<<ftp:/>>>, <<<file:/>>>, <<<mailto:>>>,
|
|
||||||
<<<../>>>, <<<./>>> (<<<..\\>>> and <<<.\\>>> on Windows) is recognized as
|
|
||||||
an external anchor name.
|
|
||||||
|
|
||||||
When the construct <<\{\{\{>><name><<}>><text><<}}>> is used, the link text
|
|
||||||
<text> may differ from the link name <name>.
|
|
||||||
|
|
||||||
Anchor/link elements may appear anywhere except inside other anchor/link
|
|
||||||
elements.
|
|
||||||
|
|
||||||
Section titles are implicitly defined anchors.
|
|
||||||
|
|
||||||
*** Line break
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+-------------+
|
|
||||||
Force line\
|
|
||||||
break.
|
|
||||||
+-------------+
|
|
||||||
|
|
||||||
A backslash character (<<<\\>>>) followed by a newline character.
|
|
||||||
|
|
||||||
Line breaks must not be used inside titles and tables (which are line
|
|
||||||
oriented blocks with implicit line breaks).
|
|
||||||
|
|
||||||
*** Non breaking space
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+----------------------+
|
|
||||||
Non\ breaking\ space.
|
|
||||||
+----------------------+
|
|
||||||
|
|
||||||
A backslash character (<<<\\>>>) followed by a space character.
|
|
||||||
|
|
||||||
*** Special character
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------------------------------------------------------------------+
|
|
||||||
Escaped special characters: \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\.
|
|
||||||
+---------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
In certain contexts, these characters have a special meaning and therefore
|
|
||||||
must be escaped if needed as is. They are escaped by adding a backslash in
|
|
||||||
front of them. The backslash may itself be escaped by adding another
|
|
||||||
backslash in front of it.
|
|
||||||
|
|
||||||
Note that an asterisk, for example, needs to be escaped only if its begins a
|
|
||||||
paragraph. (<<<*>>> has no special meaning in the middle of a paragraph.)
|
|
||||||
|
|
||||||
+--------------------------------------+
|
|
||||||
Copyright symbol: \251, \xA9, \u00a9.
|
|
||||||
+--------------------------------------+
|
|
||||||
|
|
||||||
Latin-1 characters (whatever is the encoding of the APT document) may be
|
|
||||||
specified by their codes using a backslash followed by one to three octal
|
|
||||||
digits or by using the <<<\x>>><NN> notation, where <NN> are two hexadecimal
|
|
||||||
digits.
|
|
||||||
|
|
||||||
Unicode characters may be specified by their codes using the <<<\u>>><NNNN>
|
|
||||||
notation, where <NNNN> are four hexadecimal digits.
|
|
||||||
|
|
||||||
*** Comment
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
+---------------+
|
|
||||||
~~Commented out.
|
|
||||||
+---------------+
|
|
||||||
|
|
||||||
Text found after two tildes (<<<\~~>>>) is ignored up to the end of line.
|
|
||||||
|
|
||||||
A line of <<<~>>> is often used to ``underline'' section titles in order to
|
|
||||||
make them stand out of other paragraphs.
|
|
||||||
|
|
||||||
|
|
||||||
* The APT format at a glance
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
------
|
|
||||||
Title
|
|
||||||
------
|
|
||||||
Author
|
|
||||||
------
|
|
||||||
Date
|
|
||||||
|
|
||||||
Paragraph 1, line 1.
|
|
||||||
Paragraph 1, line 2.
|
|
||||||
|
|
||||||
Paragraph 2, line 1.
|
|
||||||
Paragraph 2, line 2.
|
|
||||||
|
|
||||||
Section title
|
|
||||||
|
|
||||||
* Sub-section title
|
|
||||||
|
|
||||||
** Sub-sub-section title
|
|
||||||
|
|
||||||
*** Sub-sub-sub-section title
|
|
||||||
|
|
||||||
**** Sub-sub-sub-sub-section title
|
|
||||||
|
|
||||||
* List item 1.
|
|
||||||
|
|
||||||
* List item 2.
|
|
||||||
|
|
||||||
Paragraph contained in list item 2.
|
|
||||||
|
|
||||||
* Sub-list item 1.
|
|
||||||
|
|
||||||
* Sub-list item 2.
|
|
||||||
|
|
||||||
* List item 3.
|
|
||||||
Force end of list:
|
|
||||||
|
|
||||||
[]
|
|
||||||
|
|
||||||
+------------------------------------------+
|
|
||||||
Verbatim text not contained in list item 3
|
|
||||||
+------------------------------------------+
|
|
||||||
|
|
||||||
[[1]] Numbered item 1.
|
|
||||||
|
|
||||||
[[A]] Numbered item A.
|
|
||||||
|
|
||||||
[[B]] Numbered item B.
|
|
||||||
|
|
||||||
[[2]] Numbered item 2.
|
|
||||||
|
|
||||||
List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]].
|
|
||||||
|
|
||||||
[Defined term 1] of definition list.
|
|
||||||
|
|
||||||
[Defined term 2] of definition list.
|
|
||||||
|
|
||||||
+-------------------------------+
|
|
||||||
Verbatim text
|
|
||||||
in a box
|
|
||||||
+-------------------------------+
|
|
||||||
|
|
||||||
--- instead of +-- suppresses the box around verbatim text.
|
|
||||||
|
|
||||||
[Figure name] Figure caption
|
|
||||||
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| Centered | Left-aligned | Right-aligned |
|
|
||||||
| cell 1,1 | cell 1,2 | cell 1,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
| cell 2,1 | cell 2,2 | cell 2,3 |
|
|
||||||
*----------*--------------+----------------:
|
|
||||||
Table caption
|
|
||||||
|
|
||||||
No grid, no caption:
|
|
||||||
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
cell | cell
|
|
||||||
*-----*------*
|
|
||||||
|
|
||||||
Horizontal line:
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
|
|
||||||
^L
|
|
||||||
New page.
|
|
||||||
|
|
||||||
<Italic> font. <<Bold>> font. <<<Monospaced>>> font.
|
|
||||||
|
|
||||||
{Anchor}. Link to {{anchor}}. Link to {{http://www.pixware.fr}}.
|
|
||||||
Link to {{{anchor}showing alternate text}}.
|
|
||||||
Link to {{{http://www.pixware.fr}Pixware home page}}.
|
|
||||||
|
|
||||||
Force line\
|
|
||||||
break.
|
|
||||||
|
|
||||||
Non\ breaking\ space.
|
|
||||||
|
|
||||||
Escaped special characters: \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\.
|
|
||||||
|
|
||||||
Copyright symbol: \251, \xA9, \u00a9.
|
|
||||||
|
|
||||||
~~Commented out.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
-----
|
|
||||||
Le Site
|
|
||||||
-----
|
|
||||||
L'équipe Maven
|
|
||||||
-----
|
|
||||||
|
|
||||||
Site Maven pour votre projet
|
|
||||||
|
|
||||||
Félicitations! Si vous regardez cette page alors vous avez
|
|
||||||
généré avec succès un modèle de site en utilisant l'archétype
|
|
||||||
de site et vous avez lancé :
|
|
||||||
|
|
||||||
+-----+
|
|
||||||
|
|
||||||
m2 site:site
|
|
||||||
|
|
||||||
+-----+
|
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<faqs id="FAQ Général">
|
|
||||||
<part id="General">
|
|
||||||
<faq id="where">
|
|
||||||
<question>D'où vient Maven</question>
|
|
||||||
<answer>
|
|
||||||
<p>
|
|
||||||
Maven was created by a group of software developers who were tired
|
|
||||||
of wasting their time fiddling around with builds and wanted to get
|
|
||||||
down to brass tacks and actually develop software!
|
|
||||||
</p>
|
|
||||||
</answer>
|
|
||||||
</faq>
|
|
||||||
<faq id="why">
|
|
||||||
<question>Pourquoi Maven est-il si populaire?</question>
|
|
||||||
<answer>
|
|
||||||
<p>
|
|
||||||
Maven saves you so much time in your software development efforts that
|
|
||||||
you will have time to learn a second language, relax ten hours a
|
|
||||||
day, and train for that marathon you've always wanted to run!
|
|
||||||
</p>
|
|
||||||
</answer>
|
|
||||||
</faq>
|
|
||||||
</part>
|
|
||||||
</faqs>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<document>
|
|
||||||
<properties>
|
|
||||||
<title>Bienvenue</title>
|
|
||||||
<author email="dev@maven.apache.org">The Maven Team</author>
|
|
||||||
</properties>
|
|
||||||
<body>
|
|
||||||
<section name="Bienvenue dans un fichier XDOC!">
|
|
||||||
<p>
|
|
||||||
Ceci est du texte pour le fichier xdoc.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
||||||
</document>
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project name="Maven">
|
|
||||||
<bannerLeft>
|
|
||||||
<name>Maven</name>
|
|
||||||
<src>http://maven.apache.org/images/apache-maven-project.png</src>
|
|
||||||
<href>http://maven.apache.org/</href>
|
|
||||||
</bannerLeft>
|
|
||||||
<bannerRight>
|
|
||||||
<src>http://maven.apache.org/images/maven-small.gif</src>
|
|
||||||
</bannerRight>
|
|
||||||
<body>
|
|
||||||
<links>
|
|
||||||
<item name="Apache" href="http://www.apache.org/" />
|
|
||||||
<item name="Maven 1.0" href="http://maven.apache.org/"/>
|
|
||||||
<item name="Maven 2" href="http://maven.apache.org/maven2/"/>
|
|
||||||
</links>
|
|
||||||
|
|
||||||
<menu name="Maven 2.0">
|
|
||||||
<item name="APT Format" href="format.html"/>
|
|
||||||
<item name="FAQ" href="faq.html"/>
|
|
||||||
<item name="Xdoc Example" href="xdoc.html"/>
|
|
||||||
</menu>
|
|
||||||
</body>
|
|
||||||
</project>
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project name="Maven">
|
|
||||||
<bannerLeft>
|
|
||||||
<name>Maven</name>
|
|
||||||
<src>http://maven.apache.org/images/apache-maven-project.png</src>
|
|
||||||
<href>http://maven.apache.org/</href>
|
|
||||||
</bannerLeft>
|
|
||||||
<bannerRight>
|
|
||||||
<src>http://maven.apache.org/images/maven-small.gif</src>
|
|
||||||
</bannerRight>
|
|
||||||
<body>
|
|
||||||
<links>
|
|
||||||
<item name="Apache" href="http://www.apache.org/" />
|
|
||||||
<item name="Maven 1.0" href="http://maven.apache.org/"/>
|
|
||||||
<item name="Maven 2" href="http://maven.apache.org/maven2/"/>
|
|
||||||
</links>
|
|
||||||
|
|
||||||
<menu name="Maven 2.0">
|
|
||||||
<item name="Format APT" href="format.html"/>
|
|
||||||
<item name="FAQ" href="faq.html"/>
|
|
||||||
<item name="Exemple Xdoc" href="xdoc.html"/>
|
|
||||||
</menu>
|
|
||||||
</body>
|
|
||||||
</project>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<document>
|
|
||||||
<properties>
|
|
||||||
<title>Welcome</title>
|
|
||||||
<author email="dev@maven.apache.org">The Maven Team</author>
|
|
||||||
</properties>
|
|
||||||
<body>
|
|
||||||
<section name="Welcome to an XDOC file!">
|
|
||||||
<p>
|
|
||||||
This is some text for the xdoc file.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
||||||
</document>
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype-webapp</artifactId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<archetype>
|
|
||||||
<id>webapp</id>
|
|
||||||
<resources>
|
|
||||||
<resource>src/main/webapp/index.jsp</resource>
|
|
||||||
<resource>src/main/webapp/WEB-INF/web.xml</resource>
|
|
||||||
</resources>
|
|
||||||
</archetype>
|
|
|
@ -1,21 +0,0 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<packaging>war</packaging>
|
|
||||||
<version>${version}</version>
|
|
||||||
<name>Maven Webapp Archetype</name>
|
|
||||||
<url>http://maven.apache.org</url>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<finalName>${artifactId}</finalName>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<!DOCTYPE web-app PUBLIC
|
|
||||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
|
||||||
"http://java.sun.com/dtd/web-app_2_3.dtd" >
|
|
||||||
|
|
||||||
<web-app>
|
|
||||||
<display-name>Archetype Created Web Application</display-name>
|
|
||||||
</web-app>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<h2>Hello World!</h2>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven-archetype</artifactId>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.apache.maven.archetypes</groupId>
|
|
||||||
<artifactId>maven-archetypes</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
<modules>
|
|
||||||
<module>maven-archetype-mojo</module>
|
|
||||||
<module>maven-archetype-quickstart</module>
|
|
||||||
<module>maven-archetype-webapp</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
|
@ -1,16 +0,0 @@
|
||||||
<project>
|
|
||||||
<parent>
|
|
||||||
<artifactId>maven</artifactId>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<version>2.0-beta-3</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>maven-archetype</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
|
||||||
<modules>
|
|
||||||
<module>maven-archetype-core</module>
|
|
||||||
<module>maven-archetype-plugin</module>
|
|
||||||
<module>maven-archetypes</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
Loading…
Reference in New Issue