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

Github action build error on impsort maven plugin. #1410

Closed
sbernard31 opened this issue Mar 6, 2023 · 4 comments
Closed

Github action build error on impsort maven plugin. #1410

sbernard31 opened this issue Mar 6, 2023 · 4 comments
Labels
build / ci All about Build or Continious Integration

Comments

@sbernard31
Copy link
Contributor

We currently face issue with impsort on Code Check github action. ❌
All build failed with :

Error:  

Failed to execute goal net.revelc.code:impsort-maven-plugin:1.6.2:check (default-cli) on project leshan-core: 
Execution default-cli of goal net.revelc.code:impsort-maven-plugin:1.6.2:check failed:
A required class was missing while executing net.revelc.code:impsort-maven-plugin:1.6.2:check:
org/codehaus/plexus/util/DirectoryScanner

Error:  -----------------------------------------------------
Error:  realm =    plugin>net.revelc.code:impsort-maven-plugin:1.6.2
Error:  strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Error:  urls[0] = file:/home/runner/.m2/repository/net/revelc/code/impsort-maven-plugin/1.6.2/impsort-maven-plugin-1.6.2.jar
Error:  urls[1] = file:/home/runner/.m2/repository/com/github/javaparser/javaparser-core/3.22.1/javaparser-core-3.22.1.jar
Error:  urls[2] = file:/home/runner/.m2/repository/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar
Error:  urls[3] = file:/home/runner/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
Error:  urls[4] = file:/home/runner/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
Error:  urls[5] = file:/home/runner/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
Error:  urls[6] = file:/home/runner/.m2/repository/org/checkerframework/checker-qual/3.8.0/checker-qual-3.8.0.jar
Error:  urls[7] = file:/home/runner/.m2/repository/com/google/errorprone/error_prone_annotations/2.5.1/error_prone_annotations-2.5.1.jar
Error:  urls[8] = file:/home/runner/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar
Error:  Number of foreign imports: 1
Error:  import: Entry[import  from realm ClassRealm[project>org.eclipse.leshan:leshan-core:2.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
Error:  
Error:  -----------------------------------------------------: org.codehaus.plexus.util.DirectoryScanner
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/PluginContainerException
Error: Process completed with exit code 1.

Issue faced with PRs :

@sbernard31 sbernard31 added the build / ci All about Build or Continious Integration label Mar 6, 2023
@sbernard31
Copy link
Contributor Author

I tried to get help at : actions/setup-java#459

I was thinking this was maybe maven cache which could be corrupted but I tried to remove cache and still face the issue.

I'm trying to investigate maven version issue ? 🤔

@sbernard31
Copy link
Contributor Author

sbernard31 commented Mar 6, 2023

The issue is probably about :

and :

I checked and :

  • the build are effectively using maven 3.9 ...
  • impsort-maven-plugin v1.6.2` (we are stuck to 1.6.x for java8 compatibility)

I would avoid to use maven toolchain just for impsort plugin ...
and it seems that there is no easy/official way to force the maven version in github action ... (I hope I'm wrong) and so workaround is to use script and or community actions... 😑

@sbernard31
Copy link
Contributor Author

sbernard31 commented Mar 6, 2023

A workaround if integrated in master : #1411.

I asked for real fix from impsort-maven-plugin maintainer. (revelc/impsort-maven-plugin#64 (comment))

@sbernard31
Copy link
Contributor Author

We will probably not have a release for impsort-maven-plugin v1.6.x, so at short term we should live with the current workaround.

But maybe still using java8 for build is not necessary, see #1412

Warmek pushed a commit to JaroslawLegierski/leshan that referenced this issue Mar 28, 2023
Warmek pushed a commit to JaroslawLegierski/leshan that referenced this issue Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build / ci All about Build or Continious Integration
Projects
None yet
Development

No branches or pull requests

1 participant