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

The plugin requires second run and makes strange aligment of configuration section #101

Open
vitalijr2 opened this issue May 13, 2024 · 1 comment

Comments

@vitalijr2
Copy link

vitalijr2 commented May 13, 2024

I have made formatting of pom.xml, see the commit Tidy POM.

But a workflow is failed because of

The POM violates the code style. Please format it by running mvn tidy:pom

Then I run tidy:pom again and it makes strange things like this:

-      <plugin>
-        <configuration>
+      <plugin><configuration>
           <classpathDependencyExcludes>
             <classpathDependencyExclude>com.ocarlsen.test:mock-slf4j-impl
             </classpathDependencyExclude>

I use the version 1.3.0

@vitalijr2
Copy link
Author

vitalijr2 commented Nov 18, 2024

OK, my old project was removed. I have new one just for example what I say: vitalijr2/mock-loggers.

I run the goal pom first time, it corrects POMs (reorder elements) and says in the final:

$ ./mvnw org.codehaus.mojo:tidy-maven-plugin:1.3.0:pom
...
[INFO] --- tidy:1.3.0:pom (default-cli) @ mock-loggers-slf4j ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Mock Loggers 1.0.0:
[INFO] 
[INFO] Mock Loggers ....................................... SUCCESS [  0.211 s]
[INFO] Logger Keeper and jUnit Extension .................. SUCCESS [  0.003 s]
[INFO] Mock loggers for Apache Commons Logging ............ SUCCESS [  0.004 s]
[INFO] Mock loggers for JDK Platform Logging .............. SUCCESS [  0.002 s]
[INFO] Mock loggers for SLF4J ............................. SUCCESS [  0.003 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.349 s
[INFO] Finished at: 2024-11-18T13:04:13+02:00

But alignment is correct.

Then I run the goal check and it's failed:

$ ./mvnw org.codehaus.mojo:tidy-maven-plugin:1.3.0:check
...
[INFO] Reactor Summary for Mock Loggers 1.0.0:
[INFO] 
[INFO] Mock Loggers ....................................... FAILURE [  0.137 s]
[INFO] Logger Keeper and jUnit Extension .................. SKIPPED
[INFO] Mock loggers for Apache Commons Logging ............ SKIPPED
[INFO] Mock loggers for JDK Platform Logging .............. SKIPPED
[INFO] Mock loggers for SLF4J ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.253 s
[INFO] Finished at: 2024-11-18T13:08:26+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:tidy-maven-plugin:1.3.0:check (default-cli) on project mock-loggers: The POM violates the code style. Please format it by running `mvn tidy:pom`. -> [Help 1]

Then I run pom another time and it just breaks alignment:

@@ -140,8 +140,7 @@
           <artifactId>central-publishing-maven-plugin</artifactId>
           <version>0.6.0</version>
         </plugin>
-        <plugin>
-          <configuration>
+        <plugin><configuration>
             <flattenMode>ossrh</flattenMode>
           </configuration>
           <executions>

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