Andreas Veithen created MIME4J-231:
--------------------------------------
Summary: Build is nondeterministic
Key: MIME4J-231
URL: https://issues.apache.org/jira/browse/MIME4J-231
Project: James Mime4j
Issue Type: Bug
Components: parser (core)
Environment: Solaris (Jenkins @ ASF), Ubuntu (Jenkins @ ASF), Mac OS X
Reporter: Andreas Veithen
The MIME4J build from the current trunk (r1523944 at the time of writing, but
the problem exists since r1457430) is nondeterministic. Sometimes the
apache-mime4j-core artifact produced by the build is an OSGi bundle (as
expected), sometimes it is a plain JAR. This has been observed with the
apache-mime4j-core artifact because this library is used by Apache Axiom, but
the issue probably also affects other artifacts.
Builds that produce artifacts without OSGi manifests have the following output:
[INFO] --- maven-bundle-plugin:2.3.7:bundle (default-bundle) @
apache-mime4j-core ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (jar) @ apache-mime4j-core ---
[INFO] Building jar:
/Users/veithen/dev/maven/mime4j/core/target/apache-mime4j-core-0.8.0-SNAPSHOT.jar
[INFO]
On the other hand, for successful builds, the output is different:
[INFO] --- maven-bundle-plugin:2.3.7:bundle (default-bundle) @
apache-mime4j-core ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (jar) @ apache-mime4j-core ---
[INFO]
Normally, there is an up-to-date check that should cause the maven-jar-plugin
to skip the execution of the jar goal because maven-bundle-plugin already
generated the JAR. It looks like for some unknown reason that up-to-date check
is not deterministic, and sometimes maven-jar-plugin replaces the JAR generated
by maven-bundle-plugin. In that case maven-jar-plugin generates its own
MANIFEST.MF instead of using the manifest generated by maven-bundle-plugin.
That being said, since the packaging of the project is "bundle", there actually
shouldn't be any execution of the jar goal at all. It turns out that the
execution is configured by the org.apache.james:james-project parent POM. That
configuration was added between 1.8.1 and 1.8.2. In the MIME4J subproject, that
version was switched in r1457430 (Sun Mar 17 12:08:05 2013), and this is indeed
when the problems started.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira