Author: epunzalan
Date: Wed May 3 19:16:06 2006
New Revision: 399510
URL: http://svn.apache.org/viewcvs?rev=399510&view=rev
Log:
creating a separate branch for MASSEMBLY-14 so jcasey can take a look
Added:
maven/plugins/branches/MASSEMBLY-14/
- copied from r399096, maven/plugins/trunk/maven-assembly-plugin/
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/UnArchiverWithException.java
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/MASSEMBLY-14-test-case.xml
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/min-plugin-config.xml
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/dependencySetOnly.xml
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/simple.xml
Modified:
maven/plugins/branches/MASSEMBLY-14/pom.xml
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java
maven/plugins/branches/MASSEMBLY-14/src/main/mdo/descriptor.mdo
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArtifactStub.java
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ReactorMavenProjectStub.java
Modified: maven/plugins/branches/MASSEMBLY-14/pom.xml
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/pom.xml?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
--- maven/plugins/branches/MASSEMBLY-14/pom.xml (original)
+++ maven/plugins/branches/MASSEMBLY-14/pom.xml Wed May 3 19:16:06 2006
@@ -10,11 +10,11 @@
<name>Maven Assembly Plugin</name>
<version>2.1-SNAPSHOT</version>
<build>
- <testResources>
+ <!--testResources>
<testResource>
<directory>src/test/plugin-configs</directory>
</testResource>
- </testResources>
+ </testResources-->
<plugins>
<plugin>
<groupId>org.codehaus.modello</groupId>
Modified:
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
Wed May 3 19:16:06 2006
@@ -21,40 +21,31 @@
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
import org.apache.maven.artifact.InvalidRepositoryException;
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
-import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.artifact.handler.ArtifactHandler;
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
import org.apache.maven.artifact.resolver.filter.IncludesArtifactFilter;
-import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.assembly.filter.AssemblyScopeArtifactFilter;
import
org.apache.maven.plugin.assembly.interpolation.AssemblyInterpolationException;
import org.apache.maven.plugin.assembly.interpolation.AssemblyInterpolator;
import org.apache.maven.plugin.assembly.interpolation.ReflectionProperties;
-import org.apache.maven.plugin.assembly.utils.PropertyUtils;
import org.apache.maven.plugin.assembly.repository.RepositoryAssembler;
import org.apache.maven.plugin.assembly.repository.RepositoryAssemblyException;
+import org.apache.maven.plugin.assembly.utils.PropertyUtils;
import org.apache.maven.plugins.assembly.model.Assembly;
import org.apache.maven.plugins.assembly.model.Component;
import org.apache.maven.plugins.assembly.model.DependencySet;
import org.apache.maven.plugins.assembly.model.FileItem;
import org.apache.maven.plugins.assembly.model.FileSet;
import org.apache.maven.plugins.assembly.model.Repository;
+import org.apache.maven.plugins.assembly.model.ModuleSet;
import org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Reader;
import org.apache.maven.plugins.assembly.model.io.xpp3.ComponentXpp3Reader;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
-import org.apache.maven.wagon.PathUtils;
import org.apache.maven.shared.model.fileset.util.FileSetManager;
-import org.apache.maven.model.RepositoryPolicy;
-import org.apache.maven.model.RepositoryBase;
-import org.apache.maven.execution.MavenSession;
import org.codehaus.plexus.archiver.Archiver;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.jar.JarArchiver;
@@ -67,11 +58,10 @@
import org.codehaus.plexus.util.DirectoryScanner;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.InterpolationFilterReader;
+import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import
org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -90,8 +80,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.Properties;
+import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -350,7 +340,7 @@
{
processRepositories( archiver, assembly.getRepositories(),
assembly.isIncludeBaseDirectory() );
processDependencySets( archiver, assembly.getDependencySets(),
assembly.isIncludeBaseDirectory() );
- processModules( archiver, assembly.getModules(),
assembly.isIncludeBaseDirectory() );
+ processModules( archiver, assembly.getModuleSets(),
assembly.isIncludeBaseDirectory() );
processFileSets( archiver, assembly.getFileSets(),
assembly.isIncludeBaseDirectory() );
processFileList( archiver, assembly.getFiles(),
assembly.isIncludeBaseDirectory() );
@@ -484,43 +474,207 @@
{
archiver.addDirectory( repositoryDirectory );
}
-
}
}
- private void processModules( Archiver archiver, List modulesList, boolean
includeBaseDirectory )
- throws IOException, ArchiverException, XmlPullParserException
+ private void processModules( Archiver archiver, List moduleSets, boolean
includeBaseDirectory )
+ throws IOException, ArchiverException, XmlPullParserException,
MojoExecutionException
{
- if ( reactorProjects != null )
+ for ( Iterator i = moduleSets.iterator(); i.hasNext(); )
{
- List moduleFileSets = new ArrayList();
+ ModuleSet moduleSet = (ModuleSet) i.next();
+ String output = moduleSet.getOutputDirectory();
+ output = getOutputDirectory( output, includeBaseDirectory );
+
+ archiver.setDefaultDirectoryMode( Integer.parseInt(
moduleSet.getDirectoryMode(), 8 ) );
+
+ archiver.setDefaultFileMode( Integer.parseInt(
moduleSet.getFileMode(), 8 ) );
+
+ getLog().debug( "ModuleSet[" + output + "]" + " dir perms: " +
+ Integer.toString( archiver.getDefaultDirectoryMode(), 8 ) + "
file perms: " +
+ Integer.toString( archiver.getDefaultFileMode(), 8 ) );
+
+ AndArtifactFilter filter = new AndArtifactFilter();
+
+ if ( !moduleSet.getIncludes().isEmpty() )
+ {
+ filter.add( new IncludesArtifactFilter(
moduleSet.getIncludes() ) );
+ }
+ if ( !moduleSet.getExcludes().isEmpty() )
+ {
+ filter.add( new ExcludesArtifactFilter(
moduleSet.getExcludes() ) );
+ }
- for ( Iterator modules = modulesList.iterator();
modules.hasNext(); )
+ Set set = getModulesFromReactor( getExecutedProject() );
+
+ // TODO: includes and excludes
+ for ( Iterator j = set.iterator(); j.hasNext(); )
{
- String module = (String) modules.next();
+ MavenProject reactorProject = (MavenProject) j.next();
- MavenProject reactorProject = getModuleFromReactor( module );
+ Artifact artifact = reactorProject.getArtifact();
- if ( reactorProject != null )
+ if ( filter.include( artifact ) && artifact.getFile() != null )
{
- FileSet moduleFileSet = new FileSet();
+ String name = artifact.getFile().getName();
+
+ if ( moduleSet.isUnpack() )
+ {
+ // TODO: something like zipfileset in plexus-archiver
+ // archiver.addJar( )
+
+ // TODO refactor into the AbstractUnpackMojo
+ File tempLocation = new File( workDirectory,
name.substring( 0, name.lastIndexOf( '.' ) ) );
+ boolean process = false;
+ if ( !tempLocation.exists() )
+ {
+ tempLocation.mkdirs();
+ process = true;
+ }
+ else if ( artifact.getFile().lastModified() >
tempLocation.lastModified() )
+ {
+ process = true;
+ }
+
+ if ( process )
+ {
+ try
+ {
+ unpack( artifact.getFile(), tempLocation );
+
+ if ( moduleSet.isIncludeDependencies() )
+ {
+ Set artifactSet =
reactorProject.getArtifacts();
+
+ for ( Iterator artifacts =
artifactSet.iterator(); artifacts.hasNext(); )
+ {
+ Artifact dependencyArtifact =
(Artifact) artifacts.next();
+
+ unpack( dependencyArtifact.getFile(),
tempLocation );
+ }
+ }
+
+ /*
+ * If the assembly is 'jar-with-dependencies',
remove the security files in all dependencies
+ * that will prevent the uberjar to execute.
Please see MASSEMBLY-64 for details.
+ */
+ if ( archiver instanceof JarArchiver )
+ {
+ String[] securityFiles = { "*.RSA",
"*.DSA", "*.SF", "*.rsa", "*.dsa", "*.sf" };
+
org.apache.maven.shared.model.fileset.FileSet securityFileSet = new
org.apache.maven.shared.model.fileset.FileSet();
+
securityFileSet.setDirectory(tempLocation.getAbsolutePath() + "/META-INF/" );
+
+ for ( int sfsi = 0; sfsi <
securityFiles.length; sfsi++ )
+ {
+ securityFileSet.addInclude(
securityFiles[sfsi] );
+ }
+
+ FileSetManager fsm = new FileSetManager(
getLog() );
+ try
+ {
+ fsm.delete( securityFileSet );
+ }
+ catch ( IOException e )
+ {
+ throw new
MojoExecutionException("Failed to delete security files: " + e.getMessage(), e);
+ }
+ }
+ }
+ catch ( NoSuchArchiverException e )
+ {
+ throw new MojoExecutionException(
+ "Unable to obtain unarchiver for file '" +
artifact.getFile() + "'" );
+ }
+ }
+
+ addDirectory( archiver, tempLocation, output, null,
FileUtils.getDefaultExcludesAsList() );
+ }
+ else
+ {
+ String outputFileNameMapping =
moduleSet.getOutputFileNameMapping();
+
+ //insert the classifier if exist
+ if ( !StringUtils.isEmpty( artifact.getClassifier() ) )
+ {
+ int dotIdx = outputFileNameMapping.lastIndexOf(
"." );
- moduleFileSet.setDirectory(
reactorProject.getBasedir().getAbsolutePath() );
- moduleFileSet.setOutputDirectory( module );
+ String extension =
+ outputFileNameMapping.substring( dotIdx + 1,
outputFileNameMapping.length() );
+ String artifactWithoutExt =
outputFileNameMapping.substring( 0, dotIdx );
- List excludesList = new ArrayList();
- excludesList.add( PathUtils.toRelative(
reactorProject.getBasedir(), reactorProject.getBuild().getDirectory() ) + "/**"
);
- excludesList.add( PathUtils.toRelative(
reactorProject.getBasedir(), reactorProject.getBuild().getOutputDirectory() ) +
"/**" );
- excludesList.add( PathUtils.toRelative(
reactorProject.getBasedir(), reactorProject.getBuild().getTestOutputDirectory()
) + "/**" );
- excludesList.add( PathUtils.toRelative(
reactorProject.getBasedir(), reactorProject.getReporting().getOutputDirectory()
) + "/**" );
- moduleFileSet.setExcludes( excludesList );
+ outputFileNameMapping =
+ artifactWithoutExt + "-" +
artifact.getClassifier() + "." + extension;
+ }
+
+ archiver.addFile( artifact.getFile(),
+ output + evaluateFileNameMapping(
outputFileNameMapping, artifact ) );
+
+ if ( moduleSet.isIncludeDependencies() )
+ {
+ Set artifactSet = reactorProject.getArtifacts();
+
+ for ( Iterator artifacts = artifactSet.iterator();
artifacts.hasNext(); )
+ {
+ Artifact dependencyArtifact = (Artifact)
artifacts.next();
- moduleFileSets.add( moduleFileSet );
+ File artifactFile =
dependencyArtifact.getFile();
+
+ archiver.addFile( artifactFile,
artifactFile.getName() );
+ }
+ }
+ }
}
+ else
+ {
+ // would be better to have a way to find out when a
specified include or exclude
+ // is never triggered and warn() it.
+ getLog().debug( "artifact: " + artifact + " not included"
);
+ }
+ }
+ }
+ }
+
+ private Set getModulesFromReactor( MavenProject parent )
+ {
+ return getModulesFromReactor( parent, false );
+ }
+
+ private Set getModulesFromReactor( MavenProject parent, boolean recurse )
+ {
+ Set modules = new HashSet();
+
+ String parentId = parent.getId();
+
+ for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
+ {
+ MavenProject reactorProject = (MavenProject) i.next();
+
+ if ( isProjectModule( parentId, reactorProject, recurse ) )
+ {
+ modules.add( reactorProject );
}
+ }
+
+ return modules;
+ }
- processFileSets( archiver, moduleFileSets, includeBaseDirectory );
+ private boolean isProjectModule( String parentId, MavenProject
reactorProject, boolean recurse )
+ {
+ MavenProject parent = reactorProject.getParent();
+
+ if ( parent != null )
+ {
+ if ( parent.getId().equals( parentId ) )
+ {
+ return true;
+ }
+ else if ( recurse )
+ {
+ isProjectModule( parentId, parent, true );
+ }
}
+
+ return false;
}
private MavenProject getModuleFromReactor( String module )
Modified:
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java
Wed May 3 19:16:06 2006
@@ -131,11 +131,27 @@
protected Set getDependencies()
throws MojoExecutionException
{
- return new HashSet( getDependenciesMap().values() );
+ MavenProject project = getExecutedProject();
+
+ Set dependenciesSet = new HashSet();
+
+ if ( project.getArtifact() != null && project.getArtifact().getFile()
!= null )
+ {
+ dependenciesSet.add( project.getArtifact() );
+ }
+
+ Set projectArtifacts = project.getArtifacts();
+ if ( projectArtifacts != null )
+ {
+ dependenciesSet.addAll( projectArtifacts );
+ }
+
+ return dependenciesSet;
}
/**
* Retrieves an includes list generated from the existing depedencies in a
project.
+ * @todo should be moved to AbstractAssemblyMojo bec unpack doesn't use
this
*
* @return A List of includes
* @throws MojoExecutionException
@@ -160,63 +176,37 @@
return includes;
}
- /**
- * Retrieves all artifact dependencies in a Map keyed by conflict id.
- *
- * @return A Map of artifacts
- */
- protected Map getDependenciesMap()
- throws MojoExecutionException
+ private boolean isReactorProjectIncluded( String parentId, MavenProject
reactorProject )
{
- Map dependencies = new HashMap();
-
- MavenProject project = getExecutedProject();
-
- // TODO: this is not mediating dependencies versions - first wins. Is
there a way we can do that properly from here?
- if ( project != null )
+ System.out.println( "TESTING: " + reactorProject.getId() );
+ if ( reactorProject.getArtifact() != null &&
+ parentId.equals(
reactorProject.getArtifact().getDependencyConflictId() ) )
{
- Artifact artifact = project.getArtifact();
-
- if ( artifact.getFile() != null )
- {
- String key = artifact.getDependencyConflictId();
-
- dependencies.put( key, artifact );
- }
+ return true;
}
- for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
+ MavenProject parent = reactorProject.getParent();
+ if ( parent != null )
{
- MavenProject reactorProject = (MavenProject) i.next();
-
- Artifact artifact = reactorProject.getArtifact();
-
- if ( artifact.getFile() != null )
+ Artifact projectArtifact = parent.getArtifact();
+ if ( projectArtifact != null )
{
- String key = artifact.getDependencyConflictId();
-
- if ( !dependencies.containsKey( key ) )
+ if ( projectArtifact.getDependencyConflictId().equals(
parentId ) )
{
- dependencies.put( key, artifact );
+ return true;
}
}
- for ( Iterator j = reactorProject.getArtifacts().iterator();
j.hasNext(); )
+ if ( parent.getParent() != null )
{
- artifact = (Artifact) j.next();
-
- String key = artifact.getDependencyConflictId();
-
- if ( !dependencies.containsKey( key ) )
- {
- dependencies.put( key, artifact );
- }
+ return isReactorProjectIncluded( parentId, parent );
}
}
- return dependencies;
+ return false;
}
+ //todo should be moved to AbstractAssemblyMojo bec unpack doesn't use this
protected Set getModules()
throws MojoExecutionException, MojoFailureException
{
@@ -273,6 +263,7 @@
return new HashSet( dependencies.values() );
}
+ //todo should be moved along with getModules()
private void addModuleArtifact( Map dependencies, Artifact artifact )
{
String key = artifact.getDependencyConflictId();
Modified: maven/plugins/branches/MASSEMBLY-14/src/main/mdo/descriptor.mdo
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/main/mdo/descriptor.mdo?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
--- maven/plugins/branches/MASSEMBLY-14/src/main/mdo/descriptor.mdo (original)
+++ maven/plugins/branches/MASSEMBLY-14/src/main/mdo/descriptor.mdo Wed May 3
19:16:06 2006
@@ -92,10 +92,10 @@
<defaultValue>false</defaultValue>
</field>
<field>
- <name>modules</name>
+ <name>moduleSets</name>
<version>1.0.0</version>
<association>
- <type>String</type>
+ <type>ModuleSet</type>
<multiplicity>*</multiplicity>
</association>
<description>
@@ -391,6 +391,47 @@
<description>
Specifies the dependency scope for this dependencySet.
Default scope value is "runtime".
+ </description>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>ModuleSet</name>
+ <version>1.0.0</version>
+ <superClass>SetBase</superClass>
+ <fields>
+ <field>
+ <name>includeDependencies</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ <description>
+ If set to true, the plugin will include the direct and transitive
dependencies of
+ of the project modules included here. Otherwise, it will only
include the module
+ packages only. Default value is false.
+ </description>
+ </field>
+ <field>
+ <name>unpack</name>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ <description>
+ If set to true, this property will unpack all module packages
+ into the specified output directory. When set to false
+ module packages will be included as archives (jars).
+ Default value is true.
+ </description>
+ </field>
+ <field>
+ <name>outputFileNameMapping</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <defaultValue>${artifactId}-${version}.${extension}</defaultValue>
+ <description>
+ Specify the mapping pattern for all dependencies included
+ in this assembly.
+ Default is ${artifactId}-${version}.${extension}.
</description>
</field>
</fields>
Added:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java?rev=399510&view=auto
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java
(added)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java
Wed May 3 19:16:06 2006
@@ -0,0 +1,55 @@
+package org.apache.maven.plugin.assembly;
+
+/*
+ * Copyright 2001-2006 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.testing.AbstractMojoTestCase;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.PlexusTestCase;
+
+/**
+ * @author Edwin Punzalan
+ */
+public class AssemblyMojoTest
+ extends AbstractMojoTestCase
+{
+ public void testMinConfiguration()
+ throws Exception
+ {
+ AssemblyMojo mojo = getMojo( "min-plugin-config.xml" );
+
+ mojo.execute();
+ }
+
+ private AssemblyMojo getMojo( String pluginXml )
+ throws Exception
+ {
+ return (AssemblyMojo) lookupMojo( "assembly",
PlexusTestCase.getBasedir() +
+ "/src/test/plugin-configs/assembly/" +
pluginXml );
+ }
+
+ private AssemblyMojo executeMojo( String pluginXml )
+ throws Exception
+ {
+ AssemblyMojo mojo = getMojo( pluginXml );
+
+ mojo.execute();
+
+ MavenProject project = (MavenProject) getVariableValueFromObject(
mojo, "executedProject" );
+
+ return mojo;
+ }
+}
Modified:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java
Wed May 3 19:16:06 2006
@@ -16,15 +16,15 @@
* limitations under the License.
*/
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.assembly.stubs.ArchiverManagerStub;
+import org.apache.maven.plugin.assembly.stubs.UnArchiverWithException;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.project.MavenProject;
-import org.apache.maven.artifact.Artifact;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
import java.io.File;
-import java.util.List;
-import java.util.Iterator;
/**
* @author Edwin Punzalan
@@ -38,6 +38,12 @@
executeMojo( "min-plugin-config.xml" );
}
+ public void testMinConfigurationAgainWithoutClean()
+ throws Exception
+ {
+ executeMojo( "min-plugin-config.xml" );
+ }
+
public void testMinConfigurationWithReactorProjects()
throws Exception
{
@@ -49,10 +55,7 @@
{
try
{
- String pluginXml = "archiver-manager-exception-plugin-config.xml";
-
- UnpackMojo mojo = (UnpackMojo) lookupMojo( "unpack",
PlexusTestCase.getBasedir() +
-
"/src/test/plugin-configs/unpack/" + pluginXml );
+ UnpackMojo mojo = getMojo(
"archiver-manager-exception-plugin-config.xml" );
mojo.execute();
@@ -71,11 +74,37 @@
}
}
- public void executeMojo( String pluginXml )
+ public void testUnpackException()
+ throws Exception
+ {
+ try
+ {
+ UnpackMojo mojo = getMojo( "unpack-exception-plugin-config.xml" );
+
+ ArchiverManagerStub archiverManager = (ArchiverManagerStub)
getVariableValueFromObject( mojo, "archiverManager" );
+ archiverManager.setUnArchiver( new UnArchiverWithException() );
+
+ mojo.execute();
+
+ fail( "Expected exception not thrown" );
+ }
+ catch ( MojoExecutionException e )
+ {
+ //expected
+ }
+ }
+
+ public UnpackMojo getMojo( String pluginXml )
throws Exception
{
- UnpackMojo mojo = (UnpackMojo) lookupMojo( "unpack",
PlexusTestCase.getBasedir() +
+ return (UnpackMojo) lookupMojo( "unpack", PlexusTestCase.getBasedir() +
"/src/test/plugin-configs/unpack/" + pluginXml );
+ }
+
+ public void executeMojo( String pluginXml )
+ throws Exception
+ {
+ UnpackMojo mojo = getMojo( pluginXml );
mojo.execute();
@@ -87,30 +116,5 @@
File unpacked = new File( unpackDir, filename + ".extracted" );
assertTrue( "Test extracted project artifact", unpacked.exists() );
-
- List reactorProjectList = (List) getVariableValueFromObject( mojo,
"reactorProjects" );
- for ( Iterator reactorProjects = reactorProjectList.iterator();
reactorProjects.hasNext(); )
- {
- MavenProject reactorProject = (MavenProject)
reactorProjects.next();
-
- filename = reactorProject.getArtifact().getFile().getName();
- dir = filename.substring( 0, filename.lastIndexOf( '.' ) );
- unpackDir = new File( workDir, dir );
- unpacked = new File( unpackDir, filename + ".extracted" );
-
- assertTrue( "Test reactor project was extracted",
unpacked.exists() );
-
- for ( Iterator artifacts =
reactorProject.getArtifacts().iterator(); artifacts.hasNext(); )
- {
- Artifact artifact = (Artifact) artifacts.next();
-
- filename = artifact.getFile().getName();
- dir = filename.substring( 0, filename.lastIndexOf( '.' ) );
- unpackDir = new File( workDir, dir );
- unpacked = new File( unpackDir, filename + ".extracted" );
-
- assertTrue( "Test reactor project artifact was extracted",
unpacked.exists() );
- }
- }
}
}
Modified:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
Wed May 3 19:16:06 2006
@@ -31,6 +31,13 @@
public static UnArchiverStub unArchiverStub;
+ public ArchiverManagerStub()
+ {
+ archiverStub = null;
+
+ unArchiverStub = null;
+ }
+
public Archiver getArchiver( String string )
throws NoSuchArchiverException
{
@@ -42,6 +49,11 @@
return archiverStub;
}
+ public void setArchiver( ArchiverStub archiver )
+ {
+ archiverStub = archiver;
+ }
+
public UnArchiver getUnArchiver( String string )
throws NoSuchArchiverException
{
@@ -51,5 +63,10 @@
}
return unArchiverStub;
+ }
+
+ public void setUnArchiver( UnArchiverStub unArchiver )
+ {
+ unArchiverStub = unArchiver;
}
}
Modified:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
Wed May 3 19:16:06 2006
@@ -21,6 +21,7 @@
import java.io.File;
import java.io.IOException;
+import java.util.HashMap;
import java.util.Map;
/**
@@ -29,79 +30,106 @@
public class ArchiverStub
implements Archiver
{
+ private Map files = new HashMap();
+
+ private File destFile;
+
+ private int fileMode = 0;
+
+ private int dirMode = 0;
+
+ private boolean includeEmptyDirs = false;
+
public void createArchive()
throws ArchiverException, IOException
{
+ destFile.getParentFile().mkdirs();
+
+ if ( !destFile.createNewFile() )
+ {
+ throw new ArchiverException( "Unable to create archive file" );
+ }
}
public void addDirectory( File file )
throws ArchiverException
{
+ System.out.println( "Adding " + file.getPath() );
+ files.put( file.getPath(), file );
}
public void addDirectory( File file, String string )
throws ArchiverException
{
+ addDirectory( file );
}
public void addDirectory( File file, String[] strings, String[] strings1 )
throws ArchiverException
{
+ addDirectory( file );
}
public void addDirectory( File file, String string, String[] strings,
String[] strings1 )
throws ArchiverException
{
+ addDirectory( file );
}
public void addFile( File file, String string )
throws ArchiverException
{
+ addDirectory( file );
}
public void addFile( File file, String string, int i )
throws ArchiverException
{
+ addDirectory( file );
}
public File getDestFile()
{
- return null;
+ return destFile;
}
public void setDestFile( File file )
{
+ destFile = file;
}
public void setDefaultFileMode( int i )
{
+ fileMode = i;
}
public int getDefaultFileMode()
{
- return 0;
+ return fileMode;
}
public void setDefaultDirectoryMode( int i )
{
+ dirMode = i;
}
public int getDefaultDirectoryMode()
{
- return 0;
+ return dirMode;
}
public boolean getIncludeEmptyDirs()
{
- return false;
+ return includeEmptyDirs;
}
public void setIncludeEmptyDirs( boolean b )
{
+ includeEmptyDirs = b;
}
public Map getFiles()
{
- return null;
+ return files;
}
}
Modified:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArtifactStub.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArtifactStub.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArtifactStub.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ArtifactStub.java
Wed May 3 19:16:06 2006
@@ -36,6 +36,12 @@
public File getFile()
{
- return new File( getArtifactId() + "-" + getVersion() + "." +
getType() );
+ return new File( getArtifactId() + "-" + getVersion() + "." +
getType() )
+ {
+ public long lastModified()
+ {
+ return System.currentTimeMillis();
+ }
+ };
}
}
Modified:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java
Wed May 3 19:16:06 2006
@@ -19,6 +19,9 @@
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
import org.apache.maven.artifact.Artifact;
+import java.util.Set;
+import java.util.Collections;
+
/**
* @author Edwin Punzalan
*/
@@ -29,6 +32,8 @@
private Artifact artifact;
+ private Set artifacts;
+
public AssemblyMavenProjectStub()
{
groupId = "assembly";
@@ -44,5 +49,20 @@
}
return artifact;
+ }
+
+ public Set getArtifacts()
+ {
+ if ( artifacts == null )
+ {
+ artifacts = Collections.EMPTY_SET;
+ }
+
+ return artifacts;
+ }
+
+ public void setArtifacts( Set artifacts )
+ {
+ this.artifacts = artifacts;
}
}
Modified:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ReactorMavenProjectStub.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ReactorMavenProjectStub.java?rev=399510&r1=399096&r2=399510&view=diff
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ReactorMavenProjectStub.java
(original)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/ReactorMavenProjectStub.java
Wed May 3 19:16:06 2006
@@ -17,12 +17,13 @@
*/
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
import org.apache.maven.artifact.Artifact;
-import java.util.List;
import java.util.ArrayList;
-import java.util.Set;
import java.util.Collections;
+import java.util.List;
+import java.util.Set;
/**
* @author Edwin Punzalan
@@ -32,6 +33,8 @@
{
public static List reactorProjects = new ArrayList();
+ private MavenProject parent;
+
public Set getArtifacts()
{
return Collections.EMPTY_SET;
@@ -39,6 +42,11 @@
public ReactorMavenProjectStub()
{
+ this( "jar" );
+ }
+
+ public ReactorMavenProjectStub( String packaging )
+ {
super();
reactorProjects.add( this );
@@ -46,9 +54,19 @@
setGroupId( "assembly" );
setArtifactId( "reactor-project-" + reactorProjects.size() );
setVersion( "1.0" );
- setPackaging( "jar" );
+ setPackaging( packaging );
setArtifact( new ArtifactStub( getGroupId(), getArtifactId(),
getVersion(), getPackaging(),
Artifact.SCOPE_COMPILE ) );
+ }
+
+ public void setParent( MavenProject parent )
+ {
+ this.parent = parent;
+ }
+
+ public MavenProject getParent()
+ {
+ return parent;
}
}
Added:
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/UnArchiverWithException.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/UnArchiverWithException.java?rev=399510&view=auto
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/UnArchiverWithException.java
(added)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/java/org/apache/maven/plugin/assembly/stubs/UnArchiverWithException.java
Wed May 3 19:16:06 2006
@@ -0,0 +1,34 @@
+package org.apache.maven.plugin.assembly.stubs;
+
+import org.codehaus.plexus.archiver.ArchiverException;
+
+import java.io.IOException;
+
+/*
+ * Copyright 2001-2006 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 Edwin Punzalan
+ */
+public class UnArchiverWithException
+ extends UnArchiverStub
+{
+ public void extract()
+ throws ArchiverException, IOException
+ {
+ throw new ArchiverException( "exception explicitly thrown for testing"
);
+ }
+}
Added:
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/MASSEMBLY-14-test-case.xml
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/MASSEMBLY-14-test-case.xml?rev=399510&view=auto
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/MASSEMBLY-14-test-case.xml
(added)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/MASSEMBLY-14-test-case.xml
Wed May 3 19:16:06 2006
@@ -0,0 +1,45 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+
<outputDirectory>${basedir}/target/test-harness/assembly/MASSEMBLY-14/target</outputDirectory>
+ <finalName>assembly-MASSEMBLY-14</finalName>
+ <projectModulesOnly>false</projectModulesOnly>
+
<workDirectory>${basedir}/target/test-harness/assembly/MASSEMBLY-14/work</workDirectory>
+ <archiverManager
implementation="org.apache.maven.plugin.assembly.stubs.ArchiverManagerStub" />
+ <localRepository>${localRepository}</localRepository>
+ <reactorProjects></reactorProjects>
+ <classifier></classifier>
+ <project
implementation="org.apache.maven.plugin.assembly.stubs.AssemblyMavenProjectStub"
/>
+ <descriptorRefs>
+ <descriptorRef>simple</descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>warn</tarLongFileMode>
+ <basedir>${basedir}</basedir>
+
<tempRoot>${basedir}/target/test-harness/assembly/MASSEMBLY-14/archive-tmp</tempRoot>
+
<tempFile>${basedir}/target/test-harness/assembly/MASSEMBLY-14/tempFile</tempFile>
+
<siteDirectory>${basedir}/target/test-harness/assembly/MASSEMBLY-14/site</siteDirectory>
+ <includeSite>false</includeSite>
+ <appendAssemblyId>true</appendAssemblyId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/min-plugin-config.xml
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/min-plugin-config.xml?rev=399510&view=auto
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/min-plugin-config.xml
(added)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/assembly/min-plugin-config.xml
Wed May 3 19:16:06 2006
@@ -0,0 +1,46 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+
<outputDirectory>${basedir}/target/test-harness/assembly/min/target</outputDirectory>
+ <finalName>assembly-min</finalName>
+ <projectModulesOnly>false</projectModulesOnly>
+
<workDirectory>${basedir}/target/test-harness/assembly/min/work</workDirectory>
+ <archiverManager
implementation="org.apache.maven.plugin.assembly.stubs.ArchiverManagerStub" />
+ <localRepository>${localRepository}</localRepository>
+ <reactorProjects></reactorProjects>
+ <classifier></classifier>
+ <project
implementation="org.apache.maven.plugin.assembly.stubs.AssemblyMavenProjectStub"
/>
+ <executedProject
implementation="org.apache.maven.plugin.assembly.stubs.AssemblyMavenProjectStub"
/>
+ <descriptorRefs>
+ <descriptorRef>simple</descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>warn</tarLongFileMode>
+ <basedir>${basedir}</basedir>
+
<tempRoot>${basedir}/target/test-harness/assembly/min/archive-tmp</tempRoot>
+
<tempFile>${basedir}/target/test-harness/assembly/min/tempFile</tempFile>
+
<siteDirectory>${basedir}/target/test-harness/assembly/min/site</siteDirectory>
+ <includeSite>false</includeSite>
+ <appendAssemblyId>true</appendAssemblyId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml?rev=399510&view=auto
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml
(added)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml
Wed May 3 19:16:06 2006
@@ -0,0 +1,35 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+
<outputDirectory>${basedir}/target/test-harness/unpack/unpack-exception/target</outputDirectory>
+ <finalName>unpack-min</finalName>
+ <projectModulesOnly>false</projectModulesOnly>
+
<workDirectory>${basedir}/target/test-harness/unpack/unpack-exception/work</workDirectory>
+ <archiverManager
implementation="org.apache.maven.plugin.assembly.stubs.ArchiverManagerStub" />
+ <localRepository>${localRepository}</localRepository>
+ <reactorProjects></reactorProjects>
+ <classifier></classifier>
+ <project
implementation="org.apache.maven.plugin.assembly.stubs.AssemblyMavenProjectStub"
/>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added:
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/dependencySetOnly.xml
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/dependencySetOnly.xml?rev=399510&view=auto
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/dependencySetOnly.xml
(added)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/dependencySetOnly.xml
Wed May 3 19:16:06 2006
@@ -0,0 +1,29 @@
+<!--
+ ~ Copyright 2001-2006 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.
+ -->
+
+<assembly>
+ <id>all-deps</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+</assembly>
Added:
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/simple.xml
URL:
http://svn.apache.org/viewcvs/maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/simple.xml?rev=399510&view=auto
==============================================================================
---
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/simple.xml
(added)
+++
maven/plugins/branches/MASSEMBLY-14/src/test/resources/assemblies/simple.xml
Wed May 3 19:16:06 2006
@@ -0,0 +1,30 @@
+<!--
+ ~ Copyright 2001-2006 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.
+ -->
+
+<assembly>
+ <id>simple</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>target/test-harness/assembly/min/target</directory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>