[ 
https://jira.codehaus.org/browse/MASSEMBLY-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=343743#comment-343743
 ] 

Karl Heinz Marbaise commented on MASSEMBLY-690:
-----------------------------------------------

Currently the code produces the warning without any checking of the real 
situation
{code:java}
        final List<DependencySet> depSets = getDependencySets( binaries );

        if ( depSets != null )
        {
            for (final DependencySet ds : depSets) {
                // NOTE: Disabling useProjectArtifact flag, since module 
artifact has already been handled!
                ds.setUseProjectArtifact(false);
            }

            // FIXME: This will produce unpredictable results when module 
dependencies have a version conflict.
            getLogger().warn( "NOTE: Currently, inclusion of module 
dependencies may produce unpredictable "
                                  + "results if a version conflict occurs." );

            for (final MavenProject moduleProject : moduleProjects) {
                getLogger().debug("Processing binary dependencies for module 
project: " + moduleProject.getId());

                final AddDependencySetsTask task =
                        new AddDependencySetsTask(depSets, 
context.getResolvedArtifacts(), moduleProject, projectBuilder,
                                archiverManager, getLogger());

                task.setModuleProject(moduleProject);
                
task.setModuleArtifact(chosenModuleArtifacts.get(moduleProject));
                task.setDefaultOutputDirectory(binaries.getOutputDirectory());
                
task.setDefaultOutputFileNameMapping(binaries.getOutputFileNameMapping());

                task.execute(archiver, configSource);
            }
        }
{code}


> Think about WARNING for module dependencies
> -------------------------------------------
>
>                 Key: MASSEMBLY-690
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-690
>             Project: Maven Assembly Plugin
>          Issue Type: Improvement
>          Components: moduleSet
>    Affects Versions: 2.4
>            Reporter: Karl Heinz Marbaise
>            Priority: Minor
>
> Currently the maven-assembly-plugin produces a WARNING like this:
> {code}
> [INFO] 
> [INFO] --- maven-assembly-plugin:2.4:single (make-bundles-attached) @ dist ---
> [INFO] Reading assembly descriptor: proj1-assembly.xml
> [WARNING] NOTE: Currently, inclusion of module dependencies may produce 
> unpredictable results if a version conflict occurs.
> [INFO] Building zip: 
> /Users/kama/ws-git/apache/massembly/massembly-628/dist/target/dist-1.0.0-SNAPSHOT-bin.zip
> [INFO] 
> [INFO] --- maven-assembly-plugin:2.4:single (make-bundles-not-attached) @ 
> dist ---
> [INFO] Reading assembly descriptor: proj1-dir.xml
> [WARNING] NOTE: Currently, inclusion of module dependencies may produce 
> unpredictable results if a version conflict occurs.
> [INFO] Copying files to 
> /Users/kama/ws-git/apache/massembly/massembly-628/dist/target/dist-1.0.0-SNAPSHOT-bin-dir
> [INFO] 
> ------------------------------------------------------------------------
> {code}
> If you use a moduleSet within your descriptor which should only happen if 
> really problem exist. In this 
> [case|https://github.com/khmarbaise/massembly/tree/master/massembly-628] it 
> does not exist really a problem, cause all versions are fine.
> This means that we need to check the versions? Can we predict this in a 
> better way...? Is this really possible within maven-assembly-plugin ?



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to