Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvn compile build failure InterfaceCompileFailed #770

Open
rCourtieux opened this issue Aug 11, 2023 · 3 comments
Open

mvn compile build failure InterfaceCompileFailed #770

rCourtieux opened this issue Aug 11, 2023 · 3 comments

Comments

@rCourtieux
Copy link

Hello,

I have some difficulties to use scapegoat.
When i do mvn compile i get :

[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile (default) on project standard-part: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile failed: Compilation failed: InterfaceCompileFailed -> [Help 1]

I can see the scapegoat report in target but the compilation fail.

My configuration :

          <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <configuration>
                <args>
                    <arg>-P:scapegoat:dataDir:./XXX/target/scapegoat</arg>
                </args>
                <compilerPlugins>
                    <compilerPlugin>
                        <groupId>com.sksamuel.scapegoat</groupId>
                        <artifactId>scalac-scapegoat-plugin_2.11.12</artifactId>
                        <version>1.4.17</version>
                    </compilerPlugin>
                </compilerPlugins>
            </configuration>
          </plugin>

    <dependency>
        <groupId>com.sksamuel.scapegoat</groupId>
        <artifactId>scalac-scapegoat-plugin_2.11.12</artifactId>
        <version>1.4.17</version>
        <scope>provided</scope>
    </dependency>

JDK : corretto-1.8.0_382
SDK : 2.11.12
MVN : 3.9.2

Any ideas ? Thanks :)

@saeltz
Copy link
Collaborator

saeltz commented Aug 11, 2023

Sorry, no clue. I've never used Scala with Maven and haven't worked with Scala 2.11 and JDK 8 in a very long time.
Do you have a minimal project that reproduces the issue?

@mccartney
Copy link
Collaborator

mccartney commented Aug 19, 2023

I have no idea either.

But Googling led me to this: https://stackoverflow.com/questions/31851733/scala-compiliation-error-with-intellij
After reading that, I'd try running this all outside of IntelliJ - where your control of the execution environment (actual versions) is simpler.
I make a random guess of you using IntelliJ as you mention "SDK" and the error message matches.

@mccartney mccartney added bug and removed bug labels Aug 21, 2023
@rCourtieux
Copy link
Author

Hi,

Yes i'm on Intellij, and i tried everything on your link without success.
I have found that : -P:scapegoat:overrideLevels:all=Warning don't break the maven build.
The counterpart is every issues are now warnings.

Do you have an option to not fail maven build on error issues ?

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants