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

Workflow for publishing to the Maven Central fails #510

Closed
luigi-asprino opened this issue Oct 16, 2024 · 2 comments
Closed

Workflow for publishing to the Maven Central fails #510

luigi-asprino opened this issue Oct 16, 2024 · 2 comments
Labels
Bug Something isn't working

Comments

@luigi-asprino
Copy link
Member

This seems to be related to upgrading the Java version, but the workflow file already states that Java 17 is required.

@luigi-asprino luigi-asprino added the Bug Something isn't working label Oct 16, 2024
luigi-asprino added a commit that referenced this issue Oct 16, 2024
@luigi-asprino
Copy link
Member Author

The workflow ends with this error

Error:  Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project sparql-anything-json: MavenReportException: Error while creating archive: 
Error:  Exit code: 1 - Loading source files for package io.github.sparqlanything.json...
Error:  /home/runner/work/sparql.anything/sparql.anything/sparql-anything-json/src/main/java/io/github/sparqlanything/json/JSONTriplifier.java:56: error: text blocks are not supported in -source 11
Error:  	@Option(description = """
Error:  	                      ^
Error:    (use -source 15 or higher to enable text blocks)
Error:  /home/runner/work/sparql.anything/sparql.anything/sparql-anything-json/src/main/java/io/github/sparqlanything/json/JSONTriplifier.java:91: error: switch rules are not supported in -source 11
Error:  			case START_ARRAY -> {
Error:  			                 ^
Error:    (use -source 14 or higher to enable switch rules)
Error:  /home/runner/work/sparql.anything/sparql.anything/sparql-anything-json/src/main/java/io/github/sparqlanything/json/JSONTriplifier.java:101: error: multiple case labels are not supported in -source 11
Error:  			case VALUE_FALSE, VALUE_TRUE ->
Error:  			                  ^
Error:    (use -source 14 or higher to enable multiple case labels)
Error:  /home/runner/work/sparql.anything/sparql.anything/sparql-anything-json/src/main/java/io/github/sparqlanything/json/JSONTriplifier.java:451: error: pattern matching in instanceof is not supported in -source 11
Error:  			if (slice instanceof JSONTokenSlice jslice) {
Error:  			                                    ^
Error:    (use -source 16 or higher to enable pattern matching in instanceof)
Error: [ERROR] 4 errors
Error:  
Error:  Command line was: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64/bin/javadoc @options @packages
Error:  
Error:  Refer to the generated Javadoc files in '/home/runner/work/sparql.anything/sparql.anything/sparql-anything-json/target/apidocs' dir.
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/MojoExecutionException
Error:  
Error:  After correcting the problems, you can resume the build with the command
Error:    mvn <args> -rf :sparql-anything-json
Error: Process completed with exit code 1.

However, mvn -version displays

Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /usr/share/apache-maven-3.8.8
Java version: 17.0.12, vendor: Eclipse Adoptium, runtime: /usr/lib/jvm/temurin-17-jdk-amd64

luigi-asprino added a commit that referenced this issue Oct 16, 2024
luigi-asprino added a commit that referenced this issue Oct 16, 2024
@luigi-asprino
Copy link
Member Author

maven-javadoc-plugin was still configured for version 11.
Changing the version number in the pom.xml made the workflow work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant