You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/23 11:48:00 UTC

[jira] [Commented] (MNG-5384) Declarative artifacts

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

Elliotte Rusty Harold commented on MNG-5384:
--------------------------------------------

What if an artifact is declared and not produced?

> Declarative artifacts
> ---------------------
>
>                 Key: MNG-5384
>                 URL: https://issues.apache.org/jira/browse/MNG-5384
>             Project: Maven
>          Issue Type: New Feature
>          Components: Artifacts and Repositories, POM, Reactor and workspace
>    Affects Versions: 3.0.4
>            Reporter: Tuomas Kiviaho
>            Priority: Major
>             Fix For: Issues to be reviewed for 4.x
>
>
> Currently there's no way to know which attachments a project is going to have beforehand. Lack of this feature is currently patched inside Aether where test-jar for instance has a special treatment prior packaging phase so that we can get a file pointer to ${project.target.testOutputDirectory}. 
> Maven 2 had this hack embedded inside of it, but with Maven 3 the project attachments list doesn't contain test-jar until it is actually added to the project. I had to patch MBUILDHELPER-41 to be able attach this artifact prior packaging phase and remove it at prepare-package so that the actual attachment could be added to the project.
> I propose that POM could have a section similar to {{build.finalName}} where you'd list the attacments that the project is going to introduce. For backwards compatibility this of course would not be required. Plugins such as jar, sources and javadoc could kick in automatically when pom contains the respective declarations (race conditions would arise between maven-bundle-plugin and jar for instance).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)