[ 
https://issues.apache.org/jira/browse/MINSTALL-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634357#comment-16634357
 ] 

Guillermo Fernandes commented on MINSTALL-151:
----------------------------------------------

I would say that makes sense to break if the plugin defines a packaging and it 
not setting the main artifact but... it was working before for a long time... 

So, I would either prefer a warning message instead of this exception and let 
the whole community know that this will be changed from a warning message to an 
error in 3.0.0 version. 

The thing here is that suddenly we have seen this issue in customer 
environments as well in our environments when installing artifacts that use our 
maven plugin (which defines the custom packaging and is not setting the main 
artifact) as we were not setting a fixed version of maven-install-plugin as 
soon as 3.0.0-M1 was deployed they started to use this version and got this 
issue.

Would it make sense as even this is a milestone version to log a warning and 
once 3.0.0 is released just throw the error?

I'm wondering how many custom maven plugins may have this issue too.

> Projects without primary artifacts, but with attachment artifacts fail 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)

Reply via email to