Regression - dependency is skipped?
-----------------------------------

                 Key: MASSEMBLY-294
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-294
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2-beta-2
         Environment: Windows Vista Business, Sun JDK 5
Fedora Core 4, Sun JDK 5
            Reporter: James Abley


There has been a regression between 2.2-beta-1, which was working for us, and 
2.2-beta-2, which showed up the problem.

With 2.2-beta-1, we saw the following output.

[INFO] [assembly:directory-inline {execution: create-directories}]
[INFO] Reading assembly descriptor: 
c:\Users\jabley\work\eclipse\workspaces\main\mpinstaller\mpinstaller-dependencies\src\main\assembly\dep.xml
[INFO] Processing DependencySet (output=/applications)
[INFO] Expanding: 
C:\Users\jabley\.m2\repository\com\example\serviceoptimizer\serviceoptimizer-webapp\1.17-SNAPSHOT\serviceoptimizer-webapp-1.17-SNAPSHOT.war
 into c:\Users\jabley\
AppData\Local\Temp\archived-file-set.770382062.tmp
[INFO] Processing DependencySet (output=/applications)
[INFO] Expanding: 
C:\Users\jabley\.m2\repository\com\example\contentrepository\gwt-interface\1.16-SNAPSHOT\gwt-interface-1.16-SNAPSHOT.war
 into c:\Users\jabley\AppData\Local\Temp\
archived-file-set.1945898079.tmp
[INFO] Processing DependencySet (output=/applications)
[INFO] Copying 1878 files to 
c:\Users\jabley\work\eclipse\workspaces\main\mpinstaller\mpinstaller-dependencies\target\mpinstaller-dependencies.dir
[INFO] [antrun:run {execution: default}]

With 2.2-beta-2, we see the output below.

[INFO] [assembly:directory-inline {execution: create-directories}]
[INFO] Reading assembly descriptor: src/main/assembly/dep.xml
[INFO] Processing DependencySet (output=/applications)
[WARNING] Cannot include project artifact: 
com.example.mpinstaller:mpinstaller-dependencies:pom:1.14-SNAPSHOT; it doesn't 
have an associated file or directory.
[INFO] Processing DependencySet (output=/applications)
[WARNING] Cannot include project artifact: 
com.example.mpinstaller:mpinstaller-dependencies:pom:1.14-SNAPSHOT; it doesn't 
have an associated file or directory.
[WARNING] Archive: 
C:\Users\jabley\.m2\repository\com\example\contentrepository\gwt-interface\1.16-SNAPSHOT\gwt-interface-1.16-SNAPSHOT.war
 has already been added. Skipping.
[WARNING] Archive: 
C:\Users\jabley\.m2\repository\com\example\serviceoptimizer\serviceoptimizer-webapp\1.17-SNAPSHOT\serviceoptimizer-webapp-1.17-SNAPSHOT.war
 has already been add
ed. Skipping.
[INFO] Processing DependencySet (output=/applications)
[WARNING] Cannot include project artifact: 
com.example.mpinstaller:mpinstaller-dependencies:pom:1.14-SNAPSHOT; it doesn't 
have an associated file or directory.
[INFO] Copying files to 
c:\Users\jabley\work\eclipse\workspaces\main\mpinstaller\mpinstaller-dependencies\target\mpinstaller-dependencies.dir
[INFO] [antrun:run {execution: default}]

I can provide debug output if you think it would be helpful, for both cases.

In my pom.xml

            <!-- Get all of the dependencies for the installer -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-2</version>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <descriptor>
                            src/main/assembly/dep.xml
                        </descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>create-directories</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>directory-inline</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

And in the assembly dep.xml mentioned in the pom.xml

<assembly>
    <id>mpinstaller-dependencies</id>
    <formats>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <!-- Include release notes and related documentation -->
        <fileSet>
            <directory>src/site</directory>
            <includes>
                <include>RELEASE-NOTES.txt</include>
            </includes>
            <outputDirectory>docs</outputDirectory>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <includes>
                <include>serviceoptimizer-*war</include>
            </includes>
            <outputFileNameMapping>ms.war</outputFileNameMapping>
            <outputDirectory>/applications</outputDirectory>
            <!-- Extract the war files - makes it easier to filter and for 
Deployers to work with -->
            <unpack>true</unpack>
            <scope>runtime</scope>
        </dependencySet>
        <dependencySet>
            <includes>
                <include>gwt-interface*war</include>
            </includes>
            <outputFileNameMapping>mmi.war</outputFileNameMapping>
            <outputDirectory>/applications</outputDirectory>
            <!-- Extract the war files - makes it easier to filter and for 
Deployers to work with -->
            <unpack>true</unpack>
            <scope>runtime</scope>
        </dependencySet>
        <dependencySet>
            <includes>
                <include>jackrabbit*rar</include>
            </includes>
            <outputFileNameMapping>jcr-repository.rar</outputFileNameMapping>
            <outputDirectory>/applications</outputDirectory>
            <unpack>false</unpack>
            <scope>runtime</scope>
        </dependencySet>
    </dependencySets>
</assembly>


Sorry for not being able to provide a test case. I'm not yet familiar with how 
to write tests for maven. This ticket may be a duplicate of one of the existing 
reported issues with dependency resolution in 2.2-beta-2, but I thought it 
worth reporting (as much a reference for me as for the developers). I can at 
least try out subsequent RC for the plugin and see if the problem is fixed.

-- 
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