[
https://issues.apache.org/jira/browse/MNG-8138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17851986#comment-17851986
]
Tamas Cservenak commented on MNG-8138:
--------------------------------------
In that case the plugin would need to be "packaging aware", and this is wrong,
a plugin cannot be aware of "all packagings out there" (as it is one of Maven
extension points).
IMHO, m-jar-p "knows" what is producing (a Java JAR), and it needs some means
to check "does the project expect a Java JAR as main artifact" instead.
> Maven internal state should not allow to become "broken"
> --------------------------------------------------------
>
> Key: MNG-8138
> URL: https://issues.apache.org/jira/browse/MNG-8138
> Project: Maven
> Issue Type: Bug
> Components: Core
> Reporter: Tamas Cservenak
> Priority: Major
>
> It seems by certain goal combinations we can make Maven Project instance
> state end up in "wrong" state. Example:
> * create a packaging=pom project
> * invoke jar:jar deploy:deploy
> This will result in following:
> * MavenProject has packaging=pom
> * but, jar:jar will create (an empty) JAR and make it "main artifact"
> * deploy will happily deploy pom and jar (but they both end up on same URL,
> basically replacing each other)
> Multiple issues here:
> * Maven should "protect" MavenProject instance IMHO
> * jar:jar should not (or core should not allow) to "break the state"
> * m-deploy-p should figure out this situation: we deal with two artifacts
> (POM and "main JAR") but due packaging they end up on same URL?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)