Re: another enforcer problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: another enforcer problem

Mark Hiner
Hi Tobias,

 Argh... I added an exclude for this in pom-scijava 5.1, which would just make it necessary to release a pom-imglib2 5.1 and update algorithm-gpl to use it...

 BUT my fix was incomplete because the scijava.enforcer.rules profile also declares enforceBytecodeVersion excludes, which then destructively overrides the default configuration.

 This problem will resolve itself when the scijava.enforcer.rules profile is removed and we just have one master list of excludes for each enforcer rule.

Best,
Mark

On Mon, Nov 17, 2014 at 9:44 AM, Tobias Pietzsch <[hidden email]> wrote:
Hi again,

I just noticed another thing with the enforcer rules, now building "imglib2-algorithm-gpl”.
It makes the build depend on the JDK version used to build:
With JDK 1.7 I get this error:

pietzsch@tomancak-mac-17:~/workspace/imglib/imglib2-algorithm-gpl (master)$ mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ImgLib2 Algorithms (GPL) 0.1.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ imglib2-algorithm-gpl ---
[INFO] Deleting /Users/pietzsch/workspace/imglib/imglib2-algorithm-gpl/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-rules) @ imglib2-algorithm-gpl ---
[INFO] Adding ignorable dependency: null:jcodings:null
[INFO]   Adding ignore: org/jcodings/*
[INFO] Adding ignorable dependency: null:jnr-constants:null
[INFO]   Adding ignore: com/kenai/constantine/*
[INFO]   Adding ignore: jnr/constants/*
[INFO] Adding ignorable dependency: null:jnr-ffi:null
[INFO]   Adding ignore: jnr/ffi/*
[INFO] Restricted to JDK 1.6 yet com.sun:tools:jar:1.4.2:system contains sun/tools/asm/ArrayData.class targeted to JDK 1.7
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message:
Found Banned Dependency: com.sun:tools:jar:1.4.2
Use 'mvn dependency:tree' to locate the source of the banned dependencies.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.865s
[INFO] Finished at: Mon Nov 17 16:27:05 CET 2014
[INFO] Final Memory: 9M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-rules) on project imglib2-algorithm-gpl: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:

To avoid it, I need to use JDK 1.6 to make it find the “right” com.sun:tools:jar:1.4.2.
This is very inconvenient because it requires everybody who want’s to build it to install JDK 1.6, although JDK 1.7 or 1.8 are perfectly able to build for the 1.6 target.
Is there a way to modify the enforcer setup such that these core jdk jars are ignored?

best regards,
Tobias

PS:


_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel