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

Maven build fails #28

Open
zwilcox opened this issue Jan 4, 2025 · 1 comment
Open

Maven build fails #28

zwilcox opened this issue Jan 4, 2025 · 1 comment

Comments

@zwilcox
Copy link

zwilcox commented Jan 4, 2025

I'm getting the following error when building the project:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 7 is no longer supported. Use 8 or later.
[ERROR] Target option 7 is no longer supported. Use 8 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.702 s
[INFO] Finished at: 2025-01-04T11:40:49-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project libdwarf: Compilation failure: Compilation failure:
[ERROR] Source option 7 is no longer supported. Use 8 or later.
[ERROR] Target option 7 is no longer supported. Use 8 or later.
[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/MojoFailureException

The following diff resolved the build issue:

diff --git a/lib/pom.xml b/lib/pom.xml
index b376647..a318e27 100644
--- a/lib/pom.xml
+++ b/lib/pom.xml
@@ -10,8 +10,8 @@
        <packaging>jar</packaging>
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <maven.compiler.source>1.7</maven.compiler.source>
-               <maven.compiler.target>1.7</maven.compiler.target>
+               <maven.compiler.source>1.8</maven.compiler.source>^M
+               <maven.compiler.target>1.8</maven.compiler.target>^M
        </properties>
        <dependencies>
                <dependency>
@zwilcox
Copy link
Author

zwilcox commented Jan 4, 2025

 mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 21.0.5, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.15.167.4-microsoft-standard-wsl2", arch: "amd64", family: "unix"

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

1 participant