Example to attach assembly to package incorrect
-----------------------------------------------

                 Key: MASSEMBLY-318
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-318
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2-beta-2
            Reporter: Michael Mattox


The website page:

http://maven.apache.org/plugins/maven-assembly-plugin/usage.html#Resources

lists the way to attach assembly to the package phase:

{code:xml}
<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id> <!-- this is used for inheritance merges -->
            <phase>package</phase> <!-- append to the packaging phase. -->
            <goals>
              <goal>attached</goal> <!-- goals == mojos -->
            </goals>
          </execution>
        </executions>
      </plugin>
      [...]
</project>
{code}

This doesn't work for me and I believe it may be incorrect.  What I have to do 
is put the configuration INSIDE the execution:

{code:xml}
                        <plugin>
                                <artifactId>maven-assembly-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <id>make-assembly</id>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>attached</goal>
                                                </goals>
                                        <configuration>
                                                <descriptors>
                                                        <descriptor>
                                                                
src/main/assembly/bin.xml
                                                        </descriptor>
                                                </descriptors>
                                                <archive>
                                                        <manifest>
                                                                <mainClass>
                                                                        
creation.CreationGeneriqueMain
                                                                </mainClass>
                                                                
<addClasspath>true</addClasspath>
                                                        </manifest>
                                                </archive>
                                        </configuration>
                                        </execution>
                                </executions>
                        </plugin>
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to