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

Peter Schlömer commented on MINSTALL-151:
-----------------------------------------

[~cstamas] I can provide one. We also have projects that do not have a "main 
artifact" without classifier, where we use classifiers to distinguish, for 
example, artifacts configured for staging and production.

I have attached examples demonstrating this both for jar and war packaging, see 
 [^minstall-151-example-PeterSchloemer.zip].

Using the POM files in this, these maven builds will work (using 
maven-install-plugin 2.5.2):
{noformat}
mvn install -f pom-install-jar.xml
mvn install -f pom-install-war.xml
{noformat}
These will fail (using maven-install-plugin 3.0.1):
{noformat}
mvn install -f pom-install-jar.xml -P fails
mvn install -f pom-install-war.xml -P fails
{noformat}

The maven-deploy-plugin has exactly the same problem in version 3.0.0, as far 
as I can see there is no Jira issue for that yet.

> 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-example-PeterSchloemer.zip, 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
(v8.20.10#820010)

Reply via email to