4

I'm trying to build OpenJPA on travis-ci.org. During mvn install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version I get

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.0:jar
(default-jar) on project openjpa-kernel: 
Error assembling JAR: Problem creating jar: Execution exception: Java heap space -> [Help 1]

specifying

env:
- MAVEN_OPTS="-Xmx6g -Xms2g"

doesn't help and the issue is unrelated to maven-surefire-plugin, so java.lang.OutOfMemoryError: Java heap space in Maven doesn't provide an answer.

Since this is supposed to be a CI testing configuration, modifying the files in not an option (a good explanation why this is definitely necessary would be acceptable, though).

An example failure can be found at https://travis-ci.org/krichter722/openjpa/jobs/238035277.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
  • First you should update to most recent version of [maven-jar-plugin](https://maven.apache.org/plugins/maven-jar-plugin/) furthermore why are binding the jar plugin manually in the module to the life cycle looks wrong. Why do you have jar files checked in in SVN does look wrong..Apart from that the memory on travis is limited...and needing 6GiB of heap looks weird... – khmarbaise Jun 01 '17 at 06:26
  • Seems like a bug in the `maven-jar-plugin` 3.0.0. 3.0.2 works fine. The 6G are chosen randomly in order to avoid any trouble, I'm sure the build process needs much less. – Kalle Richter Jun 01 '17 at 17:11
  • You should check to remove the settings to 6G. The build process should run on travis without. Yes the maven-jar-plugin had an issue in the older version... – khmarbaise Jun 02 '17 at 07:41

0 Answers0