You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ep...@apache.org on 2006/05/04 11:45:39 UTC
svn commit: r399640 - in /maven/plugins/trunk/maven-assembly-plugin: ./
src/main/java/org/apache/maven/plugin/assembly/ src/main/mdo/
src/test/java/org/apache/maven/plugin/assembly/
src/test/java/org/apache/maven/plugin/assembly/stubs/ src/test/plugin-...
Author: epunzalan
Date: Thu May 4 02:45:34 2006
New Revision: 399640
URL: http://svn.apache.org/viewcvs?rev=399640&view=rev
Log:
PR: MASSEMBLY-88, MASSEMBLY-14
Fixed MASSEMBLY-14 by introducing a new assembly element <moduleSet> which works like a <dependencySet>. I deleted unused methods/parameter and need not deprecate them bec they have not been released yet.
Added some test harness classes for testing the processing of <dependencySet>.
Added:
maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-default-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-filename-mapping-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-scoped-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-unpack-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/min-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/
maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-default.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-filename-mapping.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-scoped.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-unpack.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/simple.xml
Modified:
maven/plugins/trunk/maven-assembly-plugin/pom.xml
maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java
maven/plugins/trunk/maven-assembly-plugin/src/main/mdo/descriptor.mdo
maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java
maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java
maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/MavenProjectWithArtifactsStub.java
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping-pluginConfig.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMappingWithTwoDependencySets-pluginConfig.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/archiver-manager-exception-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/min-plugin-config.xml
maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/with-reactor-projects-plugin-config.xml
Modified: maven/plugins/trunk/maven-assembly-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/pom.xml?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-assembly-plugin/pom.xml Thu May 4 02:45:34 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/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java Thu May 4 02:45:34 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.ModuleSet;
import org.apache.maven.plugins.assembly.model.Repository;
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() );
@@ -416,7 +406,7 @@
}
private void processRepositories( Archiver archiver, List modulesList, boolean includeBaseDirectory )
- throws MojoExecutionException, InvalidRepositoryException, RepositoryAssemblyException, ArchiverException
+ throws MojoExecutionException, RepositoryAssemblyException, ArchiverException
{
for ( Iterator i = modulesList.iterator(); i.hasNext(); )
{
@@ -484,71 +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 ) );
- for ( Iterator modules = modulesList.iterator(); modules.hasNext(); )
+ 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() )
{
- String module = (String) modules.next();
+ filter.add( new ExcludesArtifactFilter( moduleSet.getExcludes() ) );
+ }
- MavenProject reactorProject = getModuleFromReactor( module );
+ Set set = getModulesFromReactor( getExecutedProject() );
- if ( reactorProject != null )
+ // TODO: includes and excludes
+ for ( Iterator j = set.iterator(); j.hasNext(); )
+ {
+ MavenProject reactorProject = (MavenProject) j.next();
+
+ Artifact artifact = reactorProject.getArtifact();
+
+ 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 );
- moduleFileSet.setDirectory( reactorProject.getBasedir().getAbsolutePath() );
- moduleFileSet.setOutputDirectory( module );
+ if ( moduleSet.isIncludeDependencies() )
+ {
+ Set artifactSet = reactorProject.getArtifacts();
- 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 );
+ for ( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); )
+ {
+ Artifact dependencyArtifact = (Artifact) artifacts.next();
- moduleFileSets.add( moduleFileSet );
+ 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( "." );
+
+ String extension =
+ outputFileNameMapping.substring( dotIdx + 1, outputFileNameMapping.length() );
+ String artifactWithoutExt = outputFileNameMapping.substring( 0, dotIdx );
+
+ 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();
+
+ 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" );
}
}
-
- processFileSets( archiver, moduleFileSets, includeBaseDirectory );
}
}
- private MavenProject getModuleFromReactor( String module )
+ private Set getModulesFromReactor( MavenProject parent )
{
- MavenProject reactorProject = null;
+ return getModulesFromReactor( parent, false );
+ }
+
+ private Set getModulesFromReactor( MavenProject parent, boolean recurse )
+ {
+ Set modules = new HashSet();
- if ( reactorProjects != null )
+ String parentId = parent.getId();
+
+ for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
{
- File executedProjectDir = getExecutedProject().getFile().getParentFile();
- File moduleDir = new File( executedProjectDir, module );
- String modulePath = moduleDir.getAbsolutePath();
+ MavenProject reactorProject = (MavenProject) i.next();
- for ( Iterator projects = reactorProjects.iterator(); projects.hasNext(); )
+ if ( isProjectModule( parentId, reactorProject, recurse ) )
{
- MavenProject project = (MavenProject) projects.next();
+ modules.add( reactorProject );
+ }
+ }
- String projectPath = project.getFile().getParentFile().getAbsolutePath();
+ return modules;
+ }
- if ( modulePath.equals( projectPath ) )
- {
- reactorProject = project;
+ private boolean isProjectModule( String parentId, MavenProject reactorProject, boolean recurse )
+ {
+ MavenProject parent = reactorProject.getParent();
- break;
- }
+ if ( parent != null )
+ {
+ if ( parent.getId().equals( parentId ) )
+ {
+ return true;
+ }
+ else if ( recurse )
+ {
+ isProjectModule( parentId, parent, true );
}
}
- return reactorProject;
+ return false;
}
protected List readAssemblies()
@@ -833,19 +959,7 @@
filter.add( new ExcludesArtifactFilter( dependencySet.getExcludes() ) );
}
- Set set;
-
- if ( projectModulesOnly )
- {
- set = getModules();
- }
- else
- {
- set = getDependencies();
- }
-
- // TODO: includes and excludes
- for ( Iterator j = set.iterator(); j.hasNext(); )
+ for ( Iterator j = getDependencies().iterator(); j.hasNext(); )
{
Artifact artifact = (Artifact) j.next();
@@ -939,6 +1053,42 @@
getLog().debug( "artifact: " + artifact + " not included" );
}
}
+ }
+ }
+
+ /**
+ * Retrieves an includes list generated from the existing depedencies in a project.
+ *
+ * @return A List of includes
+ * @throws MojoExecutionException
+ */
+ private List getDependenciesIncludeList()
+ throws MojoExecutionException
+ {
+ List includes = new ArrayList();
+
+ for ( Iterator i = getDependencies().iterator(); i.hasNext(); )
+ {
+ Artifact a = (Artifact) i.next();
+
+ if ( project.getGroupId().equals( a.getGroupId() ) && project.getArtifactId().equals( a.getArtifactId() ))
+ {
+ continue;
+ }
+
+ includes.add( a.getGroupId() + ":" + a.getArtifactId() );
+ }
+
+ return includes;
+ }
+
+ private void addModuleArtifact( Map dependencies, Artifact artifact )
+ {
+ String key = artifact.getDependencyConflictId();
+
+ if ( !dependencies.containsKey( key ) )
+ {
+ dependencies.put( key, artifact );
}
}
Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractUnpackingMojo.java Thu May 4 02:45:34 2006
@@ -16,14 +16,10 @@
* limitations under the License.
*/
-import org.apache.maven.artifact.Artifact;
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.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.UnArchiver;
@@ -33,12 +29,8 @@
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import java.util.Set;
/**
@@ -68,11 +60,6 @@
protected String finalName;
/**
- * @parameter expression="${projectModulesOnly}" default-value="false"
- */
- protected boolean projectModulesOnly = false;
-
- /**
* Directory to unpack JARs into if needed
*
* @parameter expression="${project.build.directory}/assembly/work"
@@ -131,156 +118,22 @@
protected Set getDependencies()
throws MojoExecutionException
{
- return new HashSet( getDependenciesMap().values() );
- }
-
- /**
- * Retrieves an includes list generated from the existing depedencies in a project.
- *
- * @return A List of includes
- * @throws MojoExecutionException
- */
- protected List getDependenciesIncludeList()
- throws MojoExecutionException
- {
- List includes = new ArrayList();
-
- for ( Iterator i = getDependencies().iterator(); i.hasNext(); )
- {
- Artifact a = (Artifact) i.next();
-
- if ( project.getGroupId().equals( a.getGroupId() ) && project.getArtifactId().equals( a.getArtifactId() ))
- {
- continue;
- }
-
- includes.add( a.getGroupId() + ":" + a.getArtifactId() );
- }
-
- return includes;
- }
-
- /**
- * Retrieves all artifact dependencies in a Map keyed by conflict id.
- *
- * @return A Map of artifacts
- */
- protected Map getDependenciesMap()
- throws MojoExecutionException
- {
- 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 )
- {
- Artifact artifact = project.getArtifact();
-
- if ( artifact.getFile() != null )
- {
- String key = artifact.getDependencyConflictId();
+ Set dependenciesSet = new HashSet();
- dependencies.put( key, artifact );
- }
- }
-
- for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
+ if ( project.getArtifact() != null && project.getArtifact().getFile() != null )
{
- MavenProject reactorProject = (MavenProject) i.next();
-
- Artifact artifact = reactorProject.getArtifact();
-
- if ( artifact.getFile() != null )
- {
- String key = artifact.getDependencyConflictId();
-
- if ( !dependencies.containsKey( key ) )
- {
- dependencies.put( key, artifact );
- }
- }
-
- for ( Iterator j = reactorProject.getArtifacts().iterator(); j.hasNext(); )
- {
- artifact = (Artifact) j.next();
-
- String key = artifact.getDependencyConflictId();
-
- if ( !dependencies.containsKey( key ) )
- {
- dependencies.put( key, artifact );
- }
- }
+ dependenciesSet.add( project.getArtifact() );
}
- return dependencies;
- }
-
- protected Set getModules()
- throws MojoExecutionException, MojoFailureException
- {
- Map dependencies = new HashMap();
-
- for ( Iterator i = reactorProjects.iterator(); i.hasNext(); )
+ Set projectArtifacts = project.getArtifacts();
+ if ( projectArtifacts != null )
{
- MavenProject reactorProject = (MavenProject) i.next();
-
- Artifact artifact = reactorProject.getArtifact();
-
- try
- {
- artifactResolver.resolve( artifact, project.getRemoteArtifactRepositories(), localRepository );
- }
- catch ( ArtifactNotFoundException e )
- {
- //TODO: Is there a better way to get the artifact if it is not yet installed in the repo?
- //reactorProject.getArtifact().getFile() is returning null
- //tried also the project.getArtifact().getFile() but returning same result
- File fileArtifact = new File( reactorProject.getBuild().getDirectory() + File.separator +
- reactorProject.getBuild().getFinalName() + "." + reactorProject.getPackaging() );
-
- getLog().info( "Artifact ( " + artifact.getFile().getName() + " ) not found " +
- "in any repository, resolving thru modules..." );
-
- artifact.setFile( fileArtifact );
-
- if ( fileArtifact.exists() )
- {
- if ( artifact.getType().equals( "pom" ) )
- {
- continue;
- }
-
- addModuleArtifact( dependencies, artifact );
- }
- }
- catch ( ArtifactResolutionException e )
- {
- throw new MojoExecutionException( "Failed to resolve artifact", e );
- }
-
- if ( artifact.getFile() != null )
- {
- if ( artifact.getType().equals( "pom" ) )
- {
- continue;
- }
-
- addModuleArtifact( dependencies, artifact );
- }
+ dependenciesSet.addAll( projectArtifacts );
}
- return new HashSet( dependencies.values() );
- }
- private void addModuleArtifact( Map dependencies, Artifact artifact )
- {
- String key = artifact.getDependencyConflictId();
-
- if ( !dependencies.containsKey( key ) )
- {
- dependencies.put( key, artifact );
- }
+ return dependenciesSet;
}
protected abstract MavenProject getExecutedProject();
Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/mdo/descriptor.mdo
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/main/mdo/descriptor.mdo?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/mdo/descriptor.mdo (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/mdo/descriptor.mdo Thu May 4 02:45:34 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/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java Thu May 4 02:45:34 2006
@@ -0,0 +1,202 @@
+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.plugin.assembly.stubs.ArchiverManagerStub;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.artifact.Artifact;
+import org.codehaus.plexus.PlexusTestCase;
+
+import java.util.Set;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.io.File;
+
+/**
+ * @author Edwin Punzalan
+ */
+public class AssemblyMojoTest
+ extends AbstractMojoTestCase
+{
+ public void testMinConfiguration()
+ throws Exception
+ {
+ executeMojo( "min-plugin-config.xml" );
+ }
+
+ public void testPackedDependencySet()
+ throws Exception
+ {
+ AssemblyMojo mojo = getMojo( "depSet-default-plugin-config.xml" );
+
+ MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "executedProject" );
+ Set artifactSet = project.getArtifacts();
+
+ mojo.execute();
+
+ Map archiveMap = ArchiverManagerStub.archiverStub.getFiles();
+ Collection archivedFiles = archiveMap.keySet();
+
+ assertEquals( "Test number of files in archive", artifactSet.size() + 1, archivedFiles.size() );
+
+ for( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); )
+ {
+ Artifact expected = (Artifact) artifacts.next();
+
+ assertTrue( "Test expected dependency artifacts in archive", archivedFiles.contains( expected.getFile() ) );
+ assertTrue( "Test expected dependency is not unpacked", expected.getFile().getName().endsWith( ".jar" ) );
+
+ String archivePath = archiveMap.get( expected.getFile() ).toString();
+ assertTrue( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) );
+ }
+
+ assertTrue( "Test project is in archive", archivedFiles.contains( project.getArtifact().getFile() ) );
+ assertTrue( "Test project is not unpacked", project.getArtifact().getFile().getName().endsWith( ".jar" ) );
+
+ String archivePath = archiveMap.get( project.getArtifact().getFile() ).toString();
+ assertTrue( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) );
+ }
+
+ public void testPackedDependencySetWithFilenameMapping()
+ throws Exception
+ {
+ AssemblyMojo mojo = getMojo( "depSet-filename-mapping-plugin-config.xml" );
+
+ MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "executedProject" );
+ Set artifactSet = project.getArtifacts();
+
+ mojo.execute();
+
+ Map archiveMap = ArchiverManagerStub.archiverStub.getFiles();
+ Collection archivedFiles = archiveMap.keySet();
+
+ assertEquals( "Test number of files in archive", artifactSet.size() + 1, archivedFiles.size() );
+
+ for( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); )
+ {
+ Artifact expected = (Artifact) artifacts.next();
+
+ assertTrue( "Test expected dependency artifacts in archive", archivedFiles.contains( expected.getFile() ) );
+ assertTrue( "Test expected dependency is not unpacked", expected.getFile().getName().endsWith( ".jar" ) );
+
+ String archivePath = archiveMap.get( expected.getFile() ).toString();
+ String expectedName = "libs/" + expected.getVersion() + "-" +
+ expected.getArtifactId() + "-" + expected.getGroupId();
+ assertTrue( "Test filename mapping was used", archivePath.equals( expectedName ) );
+ assertFalse( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) );
+ }
+
+ assertTrue( "Test project is in archive", archivedFiles.contains( project.getArtifact().getFile() ) );
+ assertTrue( "Test project is not unpacked", project.getArtifact().getFile().getName().endsWith( ".jar" ) );
+
+ String archivePath = archiveMap.get( project.getArtifact().getFile() ).toString();
+ assertFalse( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) );
+ }
+
+ public void testPackedDependencySetWithScope()
+ throws Exception
+ {
+ AssemblyMojo mojo = getMojo( "depSet-scoped-plugin-config.xml" );
+
+ MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "executedProject" );
+ Set artifactSet = project.getArtifacts();
+
+ mojo.execute();
+
+ Map archiveMap = ArchiverManagerStub.archiverStub.getFiles();
+ Collection archivedFiles = archiveMap.keySet();
+
+ for( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); )
+ {
+ Artifact expected = (Artifact) artifacts.next();
+
+ if ( !expected.getScope().equals( Artifact.SCOPE_TEST ) )
+ {
+ assertTrue( "Test expected dependency artifacts in archive", archivedFiles.contains( expected.getFile() ) );
+ assertTrue( "Test expected dependency is not unpacked", expected.getFile().getName().endsWith( ".jar" ) );
+
+ String archivePath = archiveMap.get( expected.getFile() ).toString();
+ assertTrue( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) );
+ }
+ else
+ {
+ assertFalse( "Test unexpected dependency artifacts in archive", archivedFiles.contains( expected.getFile() ) );
+ }
+ }
+
+ assertTrue( "Test project is in archive", archivedFiles.contains( project.getArtifact().getFile() ) );
+ assertTrue( "Test project is not unpacked", project.getArtifact().getFile().getName().endsWith( ".jar" ) );
+
+ String archivePath = archiveMap.get( project.getArtifact().getFile() ).toString();
+ assertTrue( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) );
+ }
+
+ public void testUnpackedDependencySet()
+ throws Exception
+ {
+ AssemblyMojo mojo = getMojo( "depSet-unpack-plugin-config.xml" );
+
+ MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "executedProject" );
+ Set artifactSet = project.getArtifacts();
+
+ File workDir = (File) getVariableValueFromObject( mojo, "workDirectory" );
+
+ mojo.execute();
+
+ Collection archivedFileSet = ArchiverManagerStub.archiverStub.getFiles().keySet();
+
+ assertEquals( "Test number of files in archive", artifactSet.size() + 1, archivedFileSet.size() );
+
+ for( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); )
+ {
+ Artifact dependency = (Artifact) artifacts.next();
+
+ String name = dependency.getArtifactId() + "-" + dependency.getVersion();
+ File workPath = new File( workDir, name );
+
+ assertTrue( "Test if expected dependency is unpacked", workPath.exists() && workPath.isDirectory() );
+ assertTrue( "Test if expected dependency is in the archive", archivedFileSet.contains( workPath ) );
+ }
+
+ String name = project.getArtifact().getArtifactId() + "-" + project.getArtifact().getVersion();
+ File workPath = new File( workDir, name );
+
+ assertTrue( "Test if project is unpacked", workPath.exists() && workPath.isDirectory() );
+ assertTrue( "Test if project is in the archive", archivedFileSet.contains( workPath ) );
+ }
+
+ 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();
+
+ assertTrue( "Test an archive was created", ArchiverManagerStub.archiverStub.getDestFile().exists() );
+
+ return mojo;
+ }
+}
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/UnpackMojoTest.java Thu May 4 02:45:34 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/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java Thu May 4 02:45:34 2006
@@ -47,22 +47,22 @@
if ( !destFile.createNewFile() )
{
- throw new ArchiverException( "Unable to create archive file" );
+ throw new ArchiverException( "Unable to create archive file: " + destFile.getAbsolutePath() );
}
}
public void addDirectory( File file )
throws ArchiverException
{
- System.out.println( "Adding dir " + file.getPath() );
-
- files.put( file.getPath(), file );
+ addDirectory( file, "" );
}
public void addDirectory( File file, String string )
throws ArchiverException
{
- addDirectory( file );
+ System.out.println( "Adding dir " + file.getPath() );
+
+ files.put( file, string );
}
public void addDirectory( File file, String[] strings, String[] strings1 )
@@ -82,7 +82,7 @@
{
System.out.println( "Adding file " + file.getPath() );
- files.put( file.getPath(), file );
+ files.put( file, string );
}
public void addFile( File file, String string, int i )
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/AssemblyMavenProjectStub.java Thu May 4 02:45:34 2006
@@ -18,9 +18,11 @@
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Model;
import java.util.Set;
import java.util.Collections;
+import java.util.Properties;
/**
* @author Edwin Punzalan
@@ -49,6 +51,21 @@
}
return artifact;
+ }
+
+ public Model getModel()
+ {
+ Model model = new Model();
+
+ model.setProperties( new Properties() );
+
+ model.setGroupId( getGroupId() );
+
+ model.setArtifactId( getArtifactId() );
+
+ model.setVersion( getVersion() );
+
+ return model;
}
public Set getArtifacts()
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/MavenProjectWithArtifactsStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/MavenProjectWithArtifactsStub.java?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/MavenProjectWithArtifactsStub.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/MavenProjectWithArtifactsStub.java Thu May 4 02:45:34 2006
@@ -32,8 +32,8 @@
Set artifacts = new HashSet();
artifacts.add( new ArtifactStub( "assembly", "dependency-artifact1", "1.0", "jar", Artifact.SCOPE_COMPILE ) );
- artifacts.add( new ArtifactStub( "assembly", "dependency-artifact2", "1.0", "jar", Artifact.SCOPE_COMPILE ) );
- artifacts.add( new ArtifactStub( "assembly", "dependency-artifact3", "1.0", "jar", Artifact.SCOPE_COMPILE ) );
+ artifacts.add( new ArtifactStub( "assembly", "dependency-artifact2", "1.0", "jar", Artifact.SCOPE_RUNTIME ) );
+ artifacts.add( new ArtifactStub( "assembly", "dependency-artifact3", "1.0", "jar", Artifact.SCOPE_TEST ) );
setArtifacts( artifacts );
}
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-default-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-default-plugin-config.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-default-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-default-plugin-config.xml Thu May 4 02:45:34 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/depSet-default/target</outputDirectory>
+ <finalName>assembly</finalName>
+ <workDirectory>${basedir}/target/test-harness/assembly/depSet-default/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.MavenProjectWithArtifactsStub" />
+ <executedProject implementation="org.apache.maven.plugin.assembly.stubs.MavenProjectWithArtifactsStub" />
+ <descriptorRefs>
+ <descriptorRef>dependencySet-default</descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>warn</tarLongFileMode>
+ <basedir>${basedir}</basedir>
+ <tempRoot>${basedir}/target/test-harness/assembly/depSet-default/archive-tmp</tempRoot>
+ <tempFile>${basedir}/target/test-harness/assembly/depSet-default/tempFile</tempFile>
+ <siteDirectory>${basedir}/target/test-harness/assembly/depSet-default/site</siteDirectory>
+ <includeSite>false</includeSite>
+ <appendAssemblyId>true</appendAssemblyId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-filename-mapping-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-filename-mapping-plugin-config.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-filename-mapping-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-filename-mapping-plugin-config.xml Thu May 4 02:45:34 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/depSet-filename-mapping/target</outputDirectory>
+ <finalName>assembly</finalName>
+ <workDirectory>${basedir}/target/test-harness/assembly/depSet-filename-mapping/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.MavenProjectWithArtifactsStub" />
+ <executedProject implementation="org.apache.maven.plugin.assembly.stubs.MavenProjectWithArtifactsStub" />
+ <descriptorRefs>
+ <descriptorRef>dependencySet-filename-mapping</descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>warn</tarLongFileMode>
+ <basedir>${basedir}</basedir>
+ <tempRoot>${basedir}/target/test-harness/assembly/depSet-filename-mapping/archive-tmp</tempRoot>
+ <tempFile>${basedir}/target/test-harness/assembly/depSet-filename-mapping/tempFile</tempFile>
+ <siteDirectory>${basedir}/target/test-harness/assembly/depSet-filename-mapping/site</siteDirectory>
+ <includeSite>false</includeSite>
+ <appendAssemblyId>true</appendAssemblyId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-scoped-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-scoped-plugin-config.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-scoped-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-scoped-plugin-config.xml Thu May 4 02:45:34 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/depSet-scoped/target</outputDirectory>
+ <finalName>assembly</finalName>
+ <workDirectory>${basedir}/target/test-harness/assembly/depSet-scoped/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.MavenProjectWithArtifactsStub" />
+ <executedProject implementation="org.apache.maven.plugin.assembly.stubs.MavenProjectWithArtifactsStub" />
+ <descriptorRefs>
+ <descriptorRef>dependencySet-scoped</descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>warn</tarLongFileMode>
+ <basedir>${basedir}</basedir>
+ <tempRoot>${basedir}/target/test-harness/assembly/depSet-scoped/archive-tmp</tempRoot>
+ <tempFile>${basedir}/target/test-harness/assembly/depSet-scoped/tempFile</tempFile>
+ <siteDirectory>${basedir}/target/test-harness/assembly/depSet-scoped/site</siteDirectory>
+ <includeSite>false</includeSite>
+ <appendAssemblyId>true</appendAssemblyId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-unpack-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-unpack-plugin-config.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-unpack-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/depSet-unpack-plugin-config.xml Thu May 4 02:45:34 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/depSet-unpack/target</outputDirectory>
+ <finalName>assembly</finalName>
+ <workDirectory>${basedir}/target/test-harness/assembly/depSet-unpack/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.MavenProjectWithArtifactsStub" />
+ <executedProject implementation="org.apache.maven.plugin.assembly.stubs.MavenProjectWithArtifactsStub" />
+ <descriptorRefs>
+ <descriptorRef>dependencySet-unpack</descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>warn</tarLongFileMode>
+ <basedir>${basedir}</basedir>
+ <tempRoot>${basedir}/target/test-harness/assembly/depSet-unpack/archive-tmp</tempRoot>
+ <tempFile>${basedir}/target/test-harness/assembly/depSet-unpack/tempFile</tempFile>
+ <siteDirectory>${basedir}/target/test-harness/assembly/depSet-unpack/site</siteDirectory>
+ <includeSite>false</includeSite>
+ <appendAssemblyId>true</appendAssemblyId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/min-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/min-plugin-config.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/min-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/assembly/min-plugin-config.xml Thu May 4 02:45:34 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/min/target</outputDirectory>
+ <finalName>assembly</finalName>
+ <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>
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping-pluginConfig.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping-pluginConfig.xml?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping-pluginConfig.xml (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping-pluginConfig.xml Thu May 4 02:45:34 2006
@@ -33,7 +33,6 @@
</descriptors>
<outputDirectory>${project.build.directory}/test-harness/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping/target</outputDirectory>
<finalName>basicAbstractAssemblyMojoFeaturesTest-ouputFileNameMapping</finalName>
- <projectModulesOnly>false</projectModulesOnly>
<workDirectory>${project.build.directory}/test-harness/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping/work</workDirectory>
<archiverManager implementation="org.apache.maven.plugin.assembly.BasicAbstractAssemblyMojoFeaturesTest$FileLoggingArchiverManagerStub" />
<localRepository>${localRepository}</localRepository>
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMappingWithTwoDependencySets-pluginConfig.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMappingWithTwoDependencySets-pluginConfig.xml?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMappingWithTwoDependencySets-pluginConfig.xml (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMappingWithTwoDependencySets-pluginConfig.xml Thu May 4 02:45:34 2006
@@ -35,7 +35,6 @@
</descriptors>
<outputDirectory>${project.build.directory}/test-harness/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping/target</outputDirectory>
<finalName>basicAbstractAssemblyMojoFeaturesTest-ouputFileNameMapping</finalName>
- <projectModulesOnly>false</projectModulesOnly>
<workDirectory>${project.build.directory}/test-harness/basicAbstractAssemblyMojoFeaturesTest/outputFileNameMapping/work</workDirectory>
<archiverManager implementation="org.apache.maven.plugin.assembly.BasicAbstractAssemblyMojoFeaturesTest$FileLoggingArchiverManagerStub" />
<localRepository>${localRepository}</localRepository>
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/archiver-manager-exception-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/archiver-manager-exception-plugin-config.xml?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/archiver-manager-exception-plugin-config.xml (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/archiver-manager-exception-plugin-config.xml Thu May 4 02:45:34 2006
@@ -21,7 +21,6 @@
<configuration>
<outputDirectory>${basedir}/target/test-harness/unpack/archiver-manager-exception/target</outputDirectory>
<finalName>unpack-min</finalName>
- <projectModulesOnly>false</projectModulesOnly>
<workDirectory>${basedir}/target/test-harness/unpack/archiver-manager-exception/work</workDirectory>
<archiverManager implementation="org.apache.maven.plugin.assembly.stubs.ArchiverManagerWithExceptionStub" />
<localRepository>${localRepository}</localRepository>
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/min-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/min-plugin-config.xml?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/min-plugin-config.xml (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/min-plugin-config.xml Thu May 4 02:45:34 2006
@@ -21,7 +21,6 @@
<configuration>
<outputDirectory>${basedir}/target/test-harness/unpack/min/target</outputDirectory>
<finalName>unpack-min</finalName>
- <projectModulesOnly>false</projectModulesOnly>
<workDirectory>${basedir}/target/test-harness/unpack/min/work</workDirectory>
<archiverManager implementation="org.apache.maven.plugin.assembly.stubs.ArchiverManagerStub" />
<localRepository>${localRepository}</localRepository>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/unpack-exception-plugin-config.xml Thu May 4 02:45:34 2006
@@ -0,0 +1,34 @@
+<!--
+ ~ 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>
+ <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
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/with-reactor-projects-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/with-reactor-projects-plugin-config.xml?rev=399640&r1=399639&r2=399640&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/with-reactor-projects-plugin-config.xml (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/plugin-configs/unpack/with-reactor-projects-plugin-config.xml Thu May 4 02:45:34 2006
@@ -21,7 +21,6 @@
<configuration>
<outputDirectory>${basedir}/target/test-harness/unpack/with-reactor-projects/target</outputDirectory>
<finalName>unpack-min</finalName>
- <projectModulesOnly>false</projectModulesOnly>
<workDirectory>${basedir}/target/test-harness/unpack/with-reactor-projects/work</workDirectory>
<archiverManager implementation="org.apache.maven.plugin.assembly.stubs.ArchiverManagerStub" />
<localRepository>${localRepository}</localRepository>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-default.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-default.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-default.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-default.xml Thu May 4 02:45:34 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>dependencySet-default</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <unpack>false</unpack>
+ <outputDirectory></outputDirectory>
+ <scope>test</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-filename-mapping.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-filename-mapping.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-filename-mapping.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-filename-mapping.xml Thu May 4 02:45:34 2006
@@ -0,0 +1,31 @@
+<!--
+ ~ 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>dependencySet-filename-mapping</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <outputFileNameMapping>${version}-${artifactId}-${groupId}</outputFileNameMapping>
+ <unpack>false</unpack>
+ <outputDirectory>libs</outputDirectory>
+ <scope>test</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-scoped.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-scoped.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-scoped.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-scoped.xml Thu May 4 02:45:34 2006
@@ -0,0 +1,28 @@
+<!--
+ ~ 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>dependencySet-scoped</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <unpack>false</unpack>
+ <outputDirectory></outputDirectory>
+ </dependencySet>
+ </dependencySets>
+</assembly>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-unpack.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-unpack.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-unpack.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/dependencySet-unpack.xml Thu May 4 02:45:34 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>dependencySet-unpack</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <unpack>true</unpack>
+ <outputDirectory></outputDirectory>
+ <scope>test</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
Added: maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/simple.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/simple.xml?rev=399640&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/simple.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/resources/assemblies/simple.xml Thu May 4 02:45:34 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>