[
https://issues.apache.org/jira/browse/EMAIL-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14047814#comment-14047814
]
Thomas Neidhart commented on EMAIL-140:
---------------------------------------
Updating powermock/easymock like this solves the problem for Java 8:
{noformat}
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
- <version>1.4.12</version>
+ <version>1.5.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
- <version>1.4.12</version>
+ <version>1.5.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
- <version>3.1</version>
+ <version>3.2</version>
<scope>test</scope>
</dependency>
{noformat}
I tested it with Java 6 - 8, but this will not work for Java 5 as then we have
unsupported class versions in the easymock jars.
> Cannot build with Java 8
> ------------------------
>
> Key: EMAIL-140
> URL: https://issues.apache.org/jira/browse/EMAIL-140
> Project: Commons Email
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Apache Maven 3.2.2
> (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T09:51:42-04:00)
> Maven home: C:\Java\apache-maven-3.2.2
> Java version: 1.8.0_05, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.8.0_05\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
> Reporter: Gary Gregory
>
> If I build trunk with Java 8, I get:
> {noformat}
> Tests in error:
> HtmlEmailTest.initializationError » IllegalState Failed to transform class
> wit...
> ImageHtmlEmailTest.initializationError » IllegalState Failed to transform
> clas...
> MultiPartEmailTest.initializationError » IllegalState Failed to transform
> clas...
> Tests run: 125, Failures: 0, Errors: 3, Skipped: 1
> {noformat}
> With:
> {noformat}
> Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e;
> 2014-06-17T09:51:42-04:00)
> Maven home: C:\Java\apache-maven-3.2.2
> Java version: 1.8.0_05, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.8.0_05\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
> {noformat}
> With Java 7, all is well:
> {noformat}
> Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e;
> 2014-06-17T09:51:42-04:00)
> Maven home: C:\Java\apache-maven-3.2.2
> Java version: 1.7.0_60, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.7.0_60\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)