You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (Jira)" <ji...@apache.org> on 2022/04/29 12:47:00 UTC
[jira] [Commented] (SLING-11291) sling-bundle-parent: Make use of bnd:jar goal
[ https://issues.apache.org/jira/browse/SLING-11291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17529973#comment-17529973 ]
Stefan Seifert commented on SLING-11291:
----------------------------------------
however, i've detected a problem when trying out bundle-parent 48-SNAPSHOT with a set of our sling modules. it works fine for simle modules like "models-api", but fails with "models-impl" which also makes use of maven-shade-plugin. there it fails with
{noformat}
INFO] --- maven-shade-plugin:3.2.4:shade (default) @ org.apache.sling.models.impl ---
[ERROR] The project main artifact does not exist. This could have the following
[ERROR] reasons:
[ERROR] - You have invoked the goal directly from the command line. This is not
[ERROR] supported. Please add the goal to the default lifecycle via an
[ERROR] <execution> element in your POM and use "mvn package" to have it run.
[ERROR] - You have bound the goal to a lifecycle phase before "package". Please
[ERROR] remove this binding from your POM such that the goal will be run in
[ERROR] the proper phase.
[ERROR] - You removed the configuration of the maven-jar-plugin that produces the main artifact.
{noformat}
probably because bnd-maven-plugin is executed after maven-shade-plugin? both goals should executed in "package" phase. explicitly defining bnd-maven-plugin before maven-shade-plugin does not seem to help.
/cc [~kwin]
> sling-bundle-parent: Make use of bnd:jar goal
> ---------------------------------------------
>
> Key: SLING-11291
> URL: https://issues.apache.org/jira/browse/SLING-11291
> Project: Sling
> Issue Type: Improvement
> Components: General
> Reporter: Stefan Seifert
> Priority: Minor
> Fix For: Bundle Parent 48
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> bnd 6.2.0 introduces a new "jar" goal, which simplifies the maven build as it is no longer required to define a separate maven-jar-plugin configuration pointing to the MANIFEST.MF generated by bnd.
> https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin#jar-goal
--
This message was sent by Atlassian Jira
(v8.20.7#820007)