[
https://issues.apache.org/jira/browse/MINSTALL-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634313#comment-16634313
]
Guillermo Fernandes commented on MINSTALL-151:
----------------------------------------------
Hi [~khmarbaise],
We are having the same issue, seems that 3.0.0-M1 has changed its behaviour
when installing a project without main artifact but with attachments.
maven-installer-plugin 2.5.2 was just logging an info message on this scenario:
[https://github.com/apache/maven-install-plugin/blob/maven-install-plugin-2.5.2/src/main/java/org/apache/maven/plugin/install/InstallMojo.java#L203]
{code:java}
getLog().info( "No primary artifact to install, installing attached artifacts
instead." );{code}
3.0.0-M1 instead delegates this logic to maven-artifact-transfer which instead
throws an exception on this scenario:
[https://github.com/apache/maven-artifact-transfer/blob/maven-artifact-transfer-0.10.0/src/main/java/org/apache/maven/shared/transfer/project/install/internal/DefaultProjectInstaller.java#L116]
I know that would make sense to fail on this scenarios but I'm wondering if
this intentional or just you were not aware that this will break builds where
plugins declare a custom packaging and are not setting the main artifact to the
project.
Regards,
> Module packaging of `feature` fails to install
> ----------------------------------------------
>
> Key: MINSTALL-151
> URL: https://issues.apache.org/jira/browse/MINSTALL-151
> Project: Maven Install Plugin
> Issue Type: Bug
> Affects Versions: 3.0.0-M1
> Reporter: Peter Huffer
> Priority: Major
> Attachments: minstall-151.zip
>
>
> I have a module which has a packaging of {{feature}} from the
> {{karaf-maven-plugin}}. When running the {{mvn install}} command, the
> following error occurs:
> {code:java}
> Failed to execute goal
> org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install
> (default-install) on project <project_name>: NoFileAssignedException: The
> packaging plugin for this project did not assign a main file to the project
> but it has attachments. Change packaging to 'pom'. -> [Help 1]
> {code}
> Reverting back to version {{2.5.2}} made the {{mvn install}} command succeed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)