[ImageJ-devel] another enforcer problem
Mark Hiner
hiner at wisc.edu
Mon Nov 17 10:27:33 CST 2014
Hi Tobias,
Argh... I added an exclude for this
<https://github.com/scijava/pom-scijava/commit/0b45545817d29c4ed95897bcc48b96722a6438e7>
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 <tobias.pietzsch at gmail.com>
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 at 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:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>
> 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:
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20141117/1e56fcd4/attachment.html>
More information about the ImageJ-devel
mailing list