sonatype-nexus-community / nexus-repository-apt

A Nexus Repository 3 plugin that allows usage of apt repositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not compile

matthiasbeyer opened this issue · comments

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

This looks really much like: sonatype-nexus-community/nexus-repository-p2#13

  • What are you trying to do?

Compiling the latest git clone of this repository using

$ javac -version
javac 1.8.0_181

on

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
  • What feature or behavior is this required for?

Installing the plugin.

  • How could we solve this issue? (Not knowing is okay!)

Making it compile?

  • Anything else?

Sonatype Nexus Repository Manager OSS 3.15.2-01 if that matters at all for simply building this plugin.

Error output:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.819 s
[INFO] Finished at: 2019-03-26T10:07:43+01:00
[INFO] Final Memory: 70M/689M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project nexus-repository-apt: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/nexus/nexus-repository-apt && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xmx300M -XX:MaxDirectMemorySize=2G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/nexus/nexus-repository-apt/target/surefire-reports -jar /home/nexus/nexus-repository-apt/target/surefire/surefirebooter1344853666627079444.jar /home/nexus/nexus-repository-apt/target/surefire/surefire4878077633569526490tmp /home/nexus/nexus-repository-apt/target/surefire/surefire_07376472616082621989tmp
[ERROR] -> [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/PluginExecutionException

With that change to the pom.xml it works:

diff --git a/pom.xml b/pom.xml
index 5535fc0..66d197c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,6 +68,15 @@
           <compilerId>javac</compilerId>
         </configuration>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.22.1</version>
+        <configuration>
+          <useSystemClassLoader>false</useSystemClassLoader>
+        </configuration>
+      </plugin>

       <plugin>
         <groupId>org.sonatype.nexus.buildsupport</groupId>

This looks like a problem on your system. Somehow the Java process that surefire forks to run tests is crashing. I cannot reproduce.