You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/09/25 21:35:49 UTC
svn commit: r699061 - in /maven/plugins/trunk/maven-assembly-plugin/src:
it/projects/mojo-configuration/massembly-291/
it/projects/mojo-configuration/massembly-291/src/
it/projects/mojo-configuration/massembly-291/src/main/
it/projects/mojo-configurati...
Author: jdcasey
Date: Thu Sep 25 12:35:49 2008
New Revision: 699061
URL: http://svn.apache.org/viewvc?rev=699061&view=rev
Log:
[MASSEMBLY-291] If the project type is 'pom', and the assembly doesn't have the assemblyId as part of its coordinate, then attach the assembly file with a null classifier to ensure it gets installed/deployed normally.
Added:
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/goals.txt (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/pom.xml (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/assembly/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/assembly/src.xml (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/test.properties (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/verify.bsh (with props)
Modified:
maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/goals.txt?rev=699061&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/goals.txt (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/goals.txt Thu Sep 25 12:35:49 2008
@@ -0,0 +1,2 @@
+clean
+deploy
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/pom.xml?rev=699061&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/pom.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/pom.xml Thu Sep 25 12:35:49 2008
@@ -0,0 +1,37 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.plugin.assembly.test</groupId>
+ <artifactId>it-project-parent</artifactId>
+ <version>1</version>
+ </parent>
+
+ <groupId>org.test</groupId>
+ <artifactId>massembly-291</artifactId>
+ <packaging>pom</packaging>
+ <version>1</version>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/src.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/assembly/src.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/assembly/src.xml?rev=699061&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/assembly/src.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/assembly/src.xml Thu Sep 25 12:35:49 2008
@@ -0,0 +1,17 @@
+<assembly>
+ <id>src</id>
+ <formats>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <excludes>
+ <exclude>target</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/src/main/assembly/src.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/test.properties?rev=699061&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/test.properties (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/test.properties Thu Sep 25 12:35:49 2008
@@ -0,0 +1 @@
+altDeploymentRepository=test::default::file://${project.build.directory}/deploy
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/test.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/verify.bsh?rev=699061&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/verify.bsh (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/verify.bsh Thu Sep 25 12:35:49 2008
@@ -0,0 +1,38 @@
+import java.io.*;
+
+String base = "target/deploy/org/test/massembly-291/1/massembly-291-1";
+File pom = new File( basedir, base + ".pom" );
+File zip = new File( basedir, base + ".zip" );
+File tgz = new File( basedir, base + ".tar.gz" );
+
+{
+ File f = pom;
+ String type = "POM";
+
+ if ( !f.exists() )
+ {
+ System.out.println( "Project " + type + " is missing in deployment repository. File was: " + f );
+ }
+}
+
+{
+ File f = zip;
+ String type = "sources zip";
+
+ if ( !f.exists() )
+ {
+ System.out.println( "Project " + type + " is missing in deployment repository. File was: " + f );
+ }
+}
+
+{
+ File f = tgz;
+ String type = "sources tar.gz";
+
+ if ( !f.exists() )
+ {
+ System.out.println( "Project " + type + " is missing in deployment repository. File was: " + f );
+ }
+}
+
+return pom.exists() && zip.exists() && tgz.exists();
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/mojo-configuration/massembly-291/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java?rev=699061&r1=699060&r2=699061&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java Thu Sep 25 12:35:49 2008
@@ -364,7 +364,7 @@
{
projectHelper.attachArtifact( project, format, classifier, destFile );
}
- else if ( destFile.getPath().endsWith( type ) )
+ else if ( !"pom".equals( type ) && format.equals( type ) )
{
if ( !warnedAboutMainProjectArtifact )
{