[jira] [Comment Edited] (MASSEMBLY-992) Facility to define assembly descriptor in body of POM
[ https://issues.apache.org/jira/browse/MASSEMBLY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17738286#comment-17738286 ] Garret Wilson edited comment on MASSEMBLY-992 at 6/28/23 8:21 PM: -- That use of {{maven-dependency-plugin}} is interesting; I'll have to read more about it. Thanks for the pointer. That technique may prove useful one day. Nevertheless it means that in my child POM I have to declare some other plugin with its own comprehensive configuration. I don't have to do that with the Maven Shade Plugin. I don't have to do that with the Spring Maven Plugin. I don't have to do that with the Versions Maven Plugin. I don't have to do that with the Launch4J plugin. I don't have to do that with the (insert the name of virtually any other Maven plugin). I just want to inherit everything automatically from the POM without additional plugins and artifacts. Thus I am filing a ticket for this improvement, so that the Maven Plugin Assembly, like 99.9% of other Maven plugins can be 100% configured within the POM without the need for additional artifacts or additional plugin configurations just to get the additional artifacts included in the project. was (Author: garretwilson): That use of {{maven-dependency-plugin}} is interesting; I'll have to read more about it. Thanks for the pointer. That technique may prove useful one day. Nevertheless it means that in my child POM I have to declare some other plugin with its own comprehensive configuration. I don't have to do that with the Maven Shade Plugin. I don't have to do that with the Spring Maven Plugin. I don't have to do that with the Versions Maven Plugin. I don't have to do that with the Launch4J plugin. I don't have to do that with the (insert the name of virtually any other Maven plugin). I just want to inherit everything automatically from the POM without additional plugins and artifacts. Maybe you don't want that. But I want that. It's not available now. So I am filing a ticket for this improvement, so that the Maven Plugin Assembly, like 99.9% of other Maven plugins can be 100% configured within the POM without the need for additional artifacts or additional plugin configurations just to get the additional artifacts included in the project. > Facility to define assembly descriptor in body of POM > - > > Key: MASSEMBLY-992 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-992 > Project: Maven Assembly Plugin > Issue Type: New Feature >Reporter: Garret Wilson >Priority: Major > Fix For: waiting-for-feedback > > > The Maven Assembly Plugin allows custom descriptors to be defined, but only > in an external file. Please add the capability to define the descriptor in > the body of the POM itself. > Requiring a separate descriptor file makes it almost impossible to declare an > assembly in a parent POM so that it can be inherited by child POMs. The > documentation describe a way to [share > descriptors|https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html], > but it is complex and doesn't obviously support Maven property interpolation. > Without this facility, in order to easily inherit an assembly from a parent > POM, I'm currently resorting to workaround involving AntRun to generate an > assembly descriptor on the fly. See [this > {{pom.xml}}|https://github.com/globalmentor/globalmentor-root/blob/main/pom.xml]. > It's pretty convoluted and tedious to get right. In addition, it has to be > placed in a phase that is guaranteed to run before the execution of the Maven > Assembly Plugin itself. > {code:xml} > > org.apache.maven.plugins > maven-antrun-plugin > > > > generate-bin-assembly-descriptor > prepare-package > > run > > > ${_isSkipGenerateExe} > > encoding="UTF-8"> > > > > > > > > {code} > This was requested and finally implemented for Versions Maven Plugin; see > [#258|https://github.com/mojohaus/versions/issues/258] and > [#684|https://github.com/mojohaus/versions/issues/684], along with [_Versions > Maven Plugin rules that are > inheritable_|https://stackoverflow.com/q/72416739] on Stack Overflow. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (MASSEMBLY-992) Facility to define assembly descriptor in body of POM
[ https://issues.apache.org/jira/browse/MASSEMBLY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17738286#comment-17738286 ] Garret Wilson edited comment on MASSEMBLY-992 at 6/28/23 8:16 PM: -- That use of {{maven-dependency-plugin}} is interesting; I'll have to read more about it. Thanks for the pointer. That technique may prove useful one day. Nevertheless it means that in my child POM I have to declare some other plugin with its own comprehensive configuration. I don't have to do that with the Maven Shade Plugin. I don't have to do that with the Spring Maven Plugin. I don't have to do that with the Versions Maven Plugin. I don't have to do that with the Launch4J plugin. I don't have to do that with the (insert the name of virtually any other Maven plugin). I just want to inherit everything automatically from the POM without additional plugins and artifacts. Maybe you don't want that. But I want that. It's not available now. So I am filing a ticket for this improvement, so that the Maven Plugin Assembly, like 99.9% of other Maven plugins can be 100% configured within the POM without the need for additional artifacts or additional plugin configurations just to get the additional artifacts included in the project. was (Author: garretwilson): That use of {{maven-dependency-plugin}} is interesting; I'll have to read more about it. Thanks for the pointer. That technique may prove useful one day. Nevertheless it means that in my child POM I have to declare some other plugin with its own comprehensive configuration. I don't have to do that with the Maven Shade Plugin. I don't have to do that with the Spring Maven Plugin. I don't have to do that withe Versions Maven Plugin. I don't have to do that with the Launch4J plugin. I don't have to do that with the (insert the name of virtually any other Maven plugin). I just want to inherit everything automatically from the POM without additional plugins and artifacts. Maybe you don't want that. But I want that. It's not available now. So I am filing a ticket for this improvement, so that the Maven Plugin Assembly, like 99.9% of other Maven plugins can be 100% configured within the POM without the need for additional artifacts or additional plugin configurations just to get the additional artifacts included in the project. > Facility to define assembly descriptor in body of POM > - > > Key: MASSEMBLY-992 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-992 > Project: Maven Assembly Plugin > Issue Type: New Feature >Reporter: Garret Wilson >Priority: Major > Fix For: waiting-for-feedback > > > The Maven Assembly Plugin allows custom descriptors to be defined, but only > in an external file. Please add the capability to define the descriptor in > the body of the POM itself. > Requiring a separate descriptor file makes it almost impossible to declare an > assembly in a parent POM so that it can be inherited by child POMs. The > documentation describe a way to [share > descriptors|https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html], > but it is complex and doesn't obviously support Maven property interpolation. > Without this facility, in order to easily inherit an assembly from a parent > POM, I'm currently resorting to workaround involving AntRun to generate an > assembly descriptor on the fly. See [this > {{pom.xml}}|https://github.com/globalmentor/globalmentor-root/blob/main/pom.xml]. > It's pretty convoluted and tedious to get right. In addition, it has to be > placed in a phase that is guaranteed to run before the execution of the Maven > Assembly Plugin itself. > {code:xml} > > org.apache.maven.plugins > maven-antrun-plugin > > > > generate-bin-assembly-descriptor > prepare-package > > run > > > ${_isSkipGenerateExe} > > encoding="UTF-8"> > > > > > > > > {code} > This was requested and finally implemented for Versions Maven Plugin; see > [#258|https://github.com/mojohaus/versions/issues/258] and > [#684|https://github.com/mojohaus/versions/issues/684], along with [_Versions > Maven Plugin rules that are > inheritable_|https://stackoverflow.com/q/72416739] on Stack Overflow. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (MASSEMBLY-992) Facility to define assembly descriptor in body of POM
[ https://issues.apache.org/jira/browse/MASSEMBLY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17737849#comment-17737849 ] Garret Wilson edited comment on MASSEMBLY-992 at 6/27/23 7:59 PM: -- After reading and re-reading your comments and GitHub project, and looking at the [files uploaded to Maven Central|https://repo1.maven.org/maven2/net/sf/michael-o/michael-o-parent/17/], I think what you're really saying is that you used the Assembly Plugin to create and upload _some other_ ZIP file to Maven Central along with your parent POM. OK, assuming that I modify that to include an assembly descriptor, how would I use that assembly descriptor in a child POM? Let's say that in my POM I use this: {code:xml} net.sf.michael-o michael-o-parent 17 {code} I see that's published on Maven Central. Now when I issue: {code} mvn clean package {code} You're saying that Maven will then automatically go out and download some file that was "attached" to the parent POM, with no further action on my part, and place them somewhere so that the child POM could use it for the assembly plugin? was (Author: garretwilson): Pardon me, but either I'm a little slow or somehow we're talking past each other or something else. So let's say that in my POM I use this: {code:xml} net.sf.michael-o michael-o-parent 17 {code} I see that's published on Maven Central. Now when I issue: {code} mvn clean package {code} You're saying that Maven will then automatically go out and download [{{michael-o-parent-17-site-resources.zip}}|https://search.maven.org/remotecontent?filepath=net/sf/michael-o/michael-o-parent/17/michael-o-parent-17-site-resources.zip], with no further action on my part, and place them somewhere? What mechanism does that? I've never heard of such a mechanism. And where would Maven place {{michael-o-parent-17-site-resources.zip}} so that it would be available to the child POM? > Facility to define assembly descriptor in body of POM > - > > Key: MASSEMBLY-992 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-992 > Project: Maven Assembly Plugin > Issue Type: New Feature >Reporter: Garret Wilson >Priority: Major > Fix For: waiting-for-feedback > > > The Maven Assembly Plugin allows custom descriptors to be defined, but only > in an external file. Please add the capability to define the descriptor in > the body of the POM itself. > Requiring a separate descriptor file makes it almost impossible to declare an > assembly in a parent POM so that it can be inherited by child POMs. The > documentation describe a way to [share > descriptors|https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html], > but it is complex and doesn't obviously support Maven property interpolation. > Without this facility, in order to easily inherit an assembly from a parent > POM, I'm currently resorting to workaround involving AntRun to generate an > assembly descriptor on the fly. See [this > {{pom.xml}}|https://github.com/globalmentor/globalmentor-root/blob/main/pom.xml]. > It's pretty convoluted and tedious to get right. In addition, it has to be > placed in a phase that is guaranteed to run before the execution of the Maven > Assembly Plugin itself. > {code:xml} > > org.apache.maven.plugins > maven-antrun-plugin > > > > generate-bin-assembly-descriptor > prepare-package > > run > > > ${_isSkipGenerateExe} > > encoding="UTF-8"> > > > > > > > > {code} > This was requested and finally implemented for Versions Maven Plugin; see > [#258|https://github.com/mojohaus/versions/issues/258] and > [#684|https://github.com/mojohaus/versions/issues/684], along with [_Versions > Maven Plugin rules that are > inheritable_|https://stackoverflow.com/q/72416739] on Stack Overflow. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (MASSEMBLY-992) Facility to define assembly descriptor in body of POM
[ https://issues.apache.org/jira/browse/MASSEMBLY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17737853#comment-17737853 ] Garret Wilson edited comment on MASSEMBLY-992 at 6/27/23 7:51 PM: -- I'm feeling a little frustrated here. I thought the description of what I wanted was understandable, but maybe I am not being clear. Let me try again. # I can configure Maven Shade Plugin in My Parent POM with coordinates {{com.example:parent}} and publish that to Maven Central. # Then in My Child Project, a completely separate project, I need merely indicate that the parent POM is {{com.example:parent}}. # Finally I can issue {{mvn clean package}} in My Child Project, and it will create a shaded JAR according to the configuration I placed in My Parent POM _with no further action required on the part of the developer_. It is my understanding that scenario I described cannot be done using the Maven Assembly Plugin as currently designed. Note that we discussed this in depth [on Stack Overflow|https://stackoverflow.com/q/72416739] and no one else had heard of some way to attach files to a parent POM so that they are automatically available to the child project. was (Author: garretwilson): I'm feeling a little frustrated here. I thought the description of what I wanted was understandable, but maybe I am not being clear. Let me try again. # I can configure Maven Shade Plugin in My Parent POM with coordinates {{com.example:parent}} and publish that to Maven Central. # Then in My Child Project, a completely separate project, I need merely indicate that the parent POM is {{com.example:parent}}. # Finally I can issue {{mvn clean package}} in My Child Project, and it will create a shaded JAR according to the configuration I placed in My Parent POM _with no further action required on the part of the developer_. It is my understanding that scenario I described cannot be done using the Maven Assembly Plugin as currently designed. It is my understanding that [~michael-o]'s "attached resources" will not work automatically as in the scenario I described for the Maven Shade Plugin above. If I am in error in my understanding, I will happily admit it—but please explain this in detail. Note that we discussed this in depth [on Stack Overflow|https://stackoverflow.com/q/72416739] and no one else had heard of some way to attach files to a parent POM so that they are automatically available to the child project. So if you have some magic formula, [~michael-o], I would glad to year it, but you still haven't explained how a ZIP file you managed to get uploaded to Maven Central helps my child project without extra development work. > Facility to define assembly descriptor in body of POM > - > > Key: MASSEMBLY-992 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-992 > Project: Maven Assembly Plugin > Issue Type: New Feature >Reporter: Garret Wilson >Priority: Major > Fix For: waiting-for-feedback > > > The Maven Assembly Plugin allows custom descriptors to be defined, but only > in an external file. Please add the capability to define the descriptor in > the body of the POM itself. > Requiring a separate descriptor file makes it almost impossible to declare an > assembly in a parent POM so that it can be inherited by child POMs. The > documentation describe a way to [share > descriptors|https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html], > but it is complex and doesn't obviously support Maven property interpolation. > Without this facility, in order to easily inherit an assembly from a parent > POM, I'm currently resorting to workaround involving AntRun to generate an > assembly descriptor on the fly. See [this > {{pom.xml}}|https://github.com/globalmentor/globalmentor-root/blob/main/pom.xml]. > It's pretty convoluted and tedious to get right. In addition, it has to be > placed in a phase that is guaranteed to run before the execution of the Maven > Assembly Plugin itself. > {code:xml} > > org.apache.maven.plugins > maven-antrun-plugin > > > > generate-bin-assembly-descriptor > prepare-package > > run > > > ${_isSkipGenerateExe} > > encoding="UTF-8"> > > > > > > > > {code} > This was requested and finally implemented for Versions Maven Plugin; see > [#258|https://github.com/mojohaus/versions/issues/258] and > [#684|https://github.com/mojohaus/vers