-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Is it normal that pom.xml in target repository is checked ? #229
Comments
Hi! I am busy the following days, so it will take some time before I can look at this for real. Thanks for your patience. |
I will maybe find time to create an integration test that but not sure. Waiting you could use : sbernard31/leshan#11 to reproduce that. |
Thanks! |
I digged a little more about this. Explanation about why it is called twice ? This is because my build also run
First try to fix it : Second try to fix it : So I guess this is not a sortpom issue. |
Before to find this, I begin to write 1 IT test but I was not able to reproduce because in my IT test Even when I was using So a remaining question (not related to sortpom) is : why IT test and "real use case" behave differently ? I let the IT test just in case : <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.ekryd.sortpom.its</groupId>
<artifactId>default-configuration</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>SortPom Plugin :: ITs :: Default configuration</name>
<description>Test default parameters of the plugin</description>
<url>no-url</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<version>3.1.4-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<violationFilename>target/sortpom_reports/violation.xml</violationFilename>
<verifyFail>stop</verifyFail>
<verifyFailOn>Strict</verifyFailOn>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.7</version>
<configuration>
<flattenMode>ossrh</flattenMode>
<!-- see https://github.com/mojohaus/flatten-maven-plugin/issues/53#issuecomment-388076343 -->
<outputDirectory>${project.build.directory}</outputDirectory>
<flattenedPomFilename>${project.artifactId}-${project.version}.pom</flattenedPomFilename>
</configuration>
<executions>
<execution>
<id>flatten</id>
<goals>
<goal>flatten</goal>
</goals>
<phase>process-resources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> |
I am glad that the problem was solved for you and thank you for posting it as an issue (in case somebody else stumbles on the same problem). |
Probably something like this. 🤷 I guess we can close this issue ? |
I use v3.0.1 because of #225
I add this to my project :
When launching :
mvn com.github.ekryd.sortpom:sortpom-maven-plugin:verify
all seems OKbut when launching :
mvn clean install
My explanation is that :
mvn com.github.ekryd.sortpom:sortpom-maven-plugin:verify
only check pom.xml from source directory.but
mvn clean install
checkstarget/leshan-core-2.0.0-SNAPSHOT.pom
which means build directory and not source directory.In my case I use flatten-maven-plugin which change the pom.xml.
I would like to only check the source pom.xml file in source directory not the generated one in build directory.
Is there a way to do that or maybe I did something wrong ?
The text was updated successfully, but these errors were encountered: