-
-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
Hi,
I have a maven enforcer rule on my project so that I can only use Java 6 compatible maven dependencies.
I imported your simple-java-mail:4.2.1-java6-release, I got this output from maven:
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-bytecode-version) @ thinpoc-ejb ---
[INFO] Restricted to JDK 1.6 yet org.simplejavamail:simple-java-mail:jar:4.2.1-java6-release:compile contains org/simplejavamail/outlookmessageparser/model/OutlookAttachment.class targeted to JDK 1.7
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message:
Found Banned Dependency: org.simplejavamail:simple-java-mail:jar:4.2.1-java6-release
Use 'mvn dependency:tree' to locate the source of the banned dependencies.
Seems that org.simplejavamail:outlook-message-parser is compiled with Java 7.
My maven enforcer rule, for reference:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-bytecode-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>1.6</maxJdkVersion>
<!--<excludes>-->
<!--<exclude>org.mindrot:jbcrypt</exclude>-->
<!--</excludes>-->
</enforceBytecodeVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-5</version>
</dependency>
</dependencies>
</plugin>
Please fix,
Thanks!