java - When using "bundle" packaging with maven-bundle-plugin goals are executed twice -
i have (simple) maven project packaging type "bundle" using org.apache.felix:maven-bundle-plugin:2.5.4
. produces correct osgi bundle jar. observe goals executed @ least twice. how prevent this? problem goals (checkstyle in example) slow duplicate execution problem here.
note: use maven 3.2.5 command line.
output or mvn clean install
(removed irrelevant info). notice many plugins executed 4 times. maven-checkstyle-plugin
execurted twice.
[info] --- maven-clean-plugin:2.5:clean (default-clean) @ my-project --- [info] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ my-project --- [info] --- maven-resources-plugin:2.7:resources (default-resources) @ my-project --- [info] --- maven-compiler-plugin:3.3:compile (default-compile) @ my-project --- [info] --- maven-resources-plugin:2.7:testresources (default-testresources) @ my-project --- [info] --- maven-compiler-plugin:3.3:testcompile (default-testcompile) @ my-project --- [info] --- maven-surefire-plugin:2.18.1:test (default-test) @ my-project --- [info] >>> maven-bundle-plugin:2.5.4:bundle (default-bundle) > package @ my-project >>> [info] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ my-project --- [info] --- maven-resources-plugin:2.7:resources (default-resources) @ my-project --- [info] --- maven-compiler-plugin:3.3:compile (default-compile) @ my-project --- [info] --- maven-resources-plugin:2.7:testresources (default-testresources) @ my-project --- [info] --- maven-compiler-plugin:3.3:testcompile (default-testcompile) @ my-project --- [info] --- maven-surefire-plugin:2.18.1:test (default-test) @ my-project --- [info] <<< maven-bundle-plugin:2.5.4:bundle (default-bundle) < package @ my-project <<< [info] --- maven-bundle-plugin:2.5.4:bundle (default-bundle) @ my-project --- [info] --- maven-checkstyle-plugin:2.15:check (checkstyle-main) @ my-project --- [info] --- maven-install-plugin:2.5.2:install (default-install) @ my-project --- [info] >>> maven-bundle-plugin:2.5.4:install (default-install) > install @ my-project >>> [info] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ my-project --- [info] --- maven-resources-plugin:2.7:resources (default-resources) @ my-project --- [info] --- maven-compiler-plugin:3.3:compile (default-compile) @ my-project --- [info] --- maven-resources-plugin:2.7:testresources (default-testresources) @ my-project --- [info] --- maven-compiler-plugin:3.3:testcompile (default-testcompile) @ my-project --- [info] --- maven-surefire-plugin:2.18.1:test (default-test) @ my-project --- [info] >>> maven-bundle-plugin:2.5.4:bundle (default-bundle) > package @ my-project >>> [info] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ my-project --- [info] --- maven-resources-plugin:2.7:resources (default-resources) @ my-project --- [info] --- maven-compiler-plugin:3.3:compile (default-compile) @ my-project --- [info] --- maven-resources-plugin:2.7:testresources (default-testresources) @ my-project --- [info] --- maven-compiler-plugin:3.3:testcompile (default-testcompile) @ my-project --- [info] --- maven-surefire-plugin:2.18.1:test (default-test) @ my-project --- [info] <<< maven-bundle-plugin:2.5.4:bundle (default-bundle) < package @ my-project <<< [info] --- maven-bundle-plugin:2.5.4:bundle (default-bundle) @ my-project --- [info] --- maven-checkstyle-plugin:2.15:check (checkstyle-main) @ my-project --- [info] --- maven-install-plugin:2.5.2:install (default-install) @ my-project --- [info] <<< maven-bundle-plugin:2.5.4:install (default-install) < install @ my-project <<< [info] --- maven-bundle-plugin:2.5.4:install (default-install) @ my-project ---
extra info:
parent pom
<project ...> <parent> <groupid>org.sonatype.oss</groupid> <artifactid>oss-parent</artifactid> <version>9</version> </parent> ... <version>3.0.5-snapshot</version> <packaging>pom</packaging> ... <build> <pluginmanagement> <plugins> <plugin> <groupid>org.apache.felix</groupid> <artifactid>maven-bundle-plugin</artifactid> <version>2.5.4</version> <extensions>true</extensions> <inherited>true</inherited> </plugin> </plugins> </pluginmanagement> </build> </project>
pom osgi bundle:
<project ...> <parent> <groupid>mygroupid</groupid> <artifactid>myartifactid</artifactid> <version>3.0.5-snapshot</version> <relativepath>../</relativepath> </parent> ... <packaging>bundle</packaging> ... <build> <plugins> <plugin> <groupid>org.apache.felix</groupid> <artifactid>maven-bundle-plugin</artifactid> <configuration> <instructions> <export-package>mypackage</export-package> </instructions> </configuration> </plugin> </plugins> </build> </project>
update: known bug (also see answer k erlandsson): https://issues.apache.org/jira/browse/felix-4882
this issue resolved (maven-bundle-plugin-2.5.5
)
edit: rmuller have updated in question, bug: https://issues.apache.org/jira/browse/felix-4882. bug fixed in version 3.0.0
.
i recall having similar problem (specifically, bundle deployed twice) when upgraded maven-bundle-plugin
2.5.4
. downgraded 2.5.3
solve our problems.
i have not dug deeper see if bug or if there other requirements configuration 2.5.4
.
Comments
Post a Comment