Closed mensinda closed 8 months ago
I have also moved the new user button to the requested location.
I have tried formatting with ./mvnw spotless:apply
, however I am getting:
[ERROR] Step 'google-java-format' found problem in 'src/main/java/com/box/l10n/mojito/service/security/user/UserService.java':
You are not using latest version on JVM 11+.
Try to upgrade to google-java-format 1.15.0, which may have fixed this problem.
If I bump the version, formatting works, but the entire project has changes...
I have also moved the new user button to the requested location.
I have tried formatting with
./mvnw spotless:apply
, however I am getting:[ERROR] Step 'google-java-format' found problem in 'src/main/java/com/box/l10n/mojito/service/security/user/UserService.java': You are not using latest version on JVM 11+. Try to upgrade to google-java-format 1.15.0, which may have fixed this problem.
If I bump the version, formatting works, but the entire project has changes...
I suspect that this is an issue with the Java version that is used by the maven wrapper. We're currently using Java 17 for the project but maybe the wrapper load another version
It should look like that
➜ mojito git:(ja/lib-spring3-0-13) ✗ ./mvnw -v
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /Users/jeanaurambault/.m2/wrapper/dists/apache-maven-3.8.1-bin/5jr7905sp869ck60ofuug4vpod/apache-maven-3.8.1
Java version: 17.0.9, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk@17/17.0.9/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "14.2.1", arch: "x86_64", family: "mac"
To make the maven wrapper use a specific version, you may need to export the JAVA_HOME, something like
export JAVA_HOME=/usr/local/Cellar/openjdk@17/17.0.9/libexec/openjdk.jdk/Contents/Home
For example, I see this error when my wrapper uses Java 21. It is not exactly the same error as you but similar type of problem
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.24.1:apply (default-cli) on project mojito-test-common: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.24.1:apply failed: java.lang.reflect.InvocationTargetException: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()' -> [Help 1]
with
➜ mojito git:(ja/lib-spring3-0-13) ✗ ./mvnw -v
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /Users/jeanaurambault/.m2/wrapper/dists/apache-maven-3.8.1-bin/5jr7905sp869ck60ofuug4vpod/apache-maven-3.8.1
Java version: 21.0.2, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "14.2.1", arch: "x86_64", family: "mac"
@mensinda I'm also updating the Java install instruction here: https://github.com/pinterest/mojito/pull/99
I have managed to get the formatter to run on a different machine and the CI is green now.
Thanks a lot @mensinda. I squashing this into 1 commit
This PR adds a new
User Management
tab where ADMINs and PMs can: