question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scala-maven-plugin version 4.2.4 throws error on Windows

See original GitHub issue

I created a sample project via mvn archetype:generate from net.alchim31.maven:scala-archetype-simple version 1.7. I only changed the version number of the scala-maven-plugin to 4.2.4

Please find the sample project here: https://github.com/tuhlmann/scala-maven-plugin-error

After cloning the repo, simply issue a mvn compile to see the error.

The used jdk is Oracle Java 8. The error thrown is

[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.2.4:compile (default) on project example: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.2.4:compile failed: An API incompatibility was encountered while executing net.alchim31.maven:scala-maven-plugin:4.2.4:compile: java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>net.alchim31.maven:scala-maven-plugin:4.2.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/tuhlmann/.m2/repository/net/alchim31/maven/scala-maven-plugin/4.2.4/scala-maven-plugin-4.2.4.jar
...
[ERROR] urls[68] = file:/C:/Users/tuhlmann/.m2/repository/org/scala-lang/modules/scala-java8-compat_2.12/0.9.0/scala-java8-compat_2.12-0.9.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

For the full log please see https://github.com/tuhlmann/scala-maven-plugin-error/blob/master/README.md

As soon as I change the version to 4.2.0 or 3.3.2 it compiles fine.

Also, using 4.2.4 on Ubuntu 18.04 or macOS works fine, the problem only occurs on Windows, no matter if Oracke jdk or openJdk 8 is used.

Thanks for your help!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
slandellecommented, Oct 27, 2019

Fixed, thanks for reporting!

0reactions
tuhlmanncommented, Oct 31, 2019

Thanks, repo changed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scala-maven-plugin failed to execute - Stack Overflow
The -make:transitive option is no longer accepted by the Scala compiler and so that line should be removed from your configuration. Let me...
Read more >
scala-maven-plugin – Using the plugin
To display command used when process is spawned set the property displayCmd to true. (In the incremental mode no process is spawned, so...
Read more >
Scala with Maven
By Adrian Null. Introduction. Maven is a build/project management tool. It favours “convention over configuration”; it can greatly simplify builds for ...
Read more >
All Maven projects start with failure - cannot open zip file
When I tried doing Maven Install with the embedded version I got a similar zip file type of error: [ERROR] Failed to parse...
Read more >
ODL Parent release notes - OpenDaylight Documentation
Upstream version removals¶. The following upstream dependencies have been removed from dependency/plugin management: Declaration of blueprint-maven-plugin has ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found