You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2019/02/10 09:07:00 UTC

[jira] [Comment Edited] (MINSTALL-151) Projects without primary artifacts, but with attachment artifacts fail install

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

Karl Heinz Marbaise edited comment on MINSTALL-151 at 2/10/19 9:06 AM:
-----------------------------------------------------------------------

[~leonard84] Can you please give a link to your pom plugin ?
[~roband] have you tried the solutions if they work or not?
[~hoehmi] Based on your configuration the {{normal}} build runs without any issue cause the maven-war-plugin sets correctly a main artifact. Based on your profile which configures maven-war-plugin the way to produce a file which has a classifier but without having a main artifact. An artifact with a classifier can only exist if a main artifact exists..which is not the case based on the given configuration. So the solution is to correctly run without a profile to produce always correctly the main artifact (via usual maven-war-plugin configuration) and a supplemental artifact via classifier or even better create a separate module which contains the supplemental/changed code and different dependencies which would result in removing the profile, the supplemental configuration of maven-war-plugin, packageExcludes and removing the need for build-helper-maven-plugin as well. 


was (Author: khmarbaise):
[~leonard84] Can you please give a link to your pom plugin ?

[~hoehmi] Based on your configuration the {{normal}} build runs without any issue cause the maven-war-plugin sets correctly a main artifact. Based on your profile which configures maven-war-plugin the way to produce a file which has a classifier but without having a main artifact. An artifact with a classifier can only exist if a main artifact exists..which is not the case based on the given configuration. So the solution is to correctly run without a profile to produce always correctly the main artifact (via usual maven-war-plugin configuration) and a supplemental artifact via classifier or even better create a separate module which contains the supplemental/changed code and different dependencies which would result in removing the profile, the supplemental configuration of maven-war-plugin, packageExcludes and removing the need for build-helper-maven-plugin as well. 

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