Skip to content

Commit

Permalink
IT tests cleanup
Browse files Browse the repository at this point in the history
- add explicit version for plugin under test
- don't use clean goal - invoker cleans during clone
- reformat poms
  • Loading branch information
slawekjaranowski committed Aug 15, 2022
1 parent e6ba68b commit a21b7db
Show file tree
Hide file tree
Showing 90 changed files with 1,218 additions and 1,123 deletions.
1 change: 0 additions & 1 deletion pom.xml
Expand Up @@ -251,7 +251,6 @@
<settingsFile>${project.build.directory}/it/interpolated-settings.xml</settingsFile>
</properties>
<goals>
<goal>clean</goal>
<goal>${project.groupId}:${project.artifactId}:${project.version}:flatten -Drevision=1.2.3.4</goal>
</goals>
<projectsDirectory>src/it/projects</projectsDirectory>
Expand Down
7 changes: 4 additions & 3 deletions src/it/projects/bom-flattenMode/bom/pom.xml
@@ -1,4 +1,5 @@
<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/xsd/maven-4.0.0.xsd">
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.codehaus.mojo.flatten.its</groupId>
Expand All @@ -8,7 +9,7 @@
<artifactId>bom</artifactId>
<packaging>pom</packaging>
<version>${bom.project.version}</version>

<dependencyManagement>
<dependencies>
<!-- BOM of spring boot -->
Expand Down Expand Up @@ -79,5 +80,5 @@
</dependency>
</dependencies>
</dependencyManagement>

</project>
23 changes: 12 additions & 11 deletions src/it/projects/bom-flattenMode/pom.xml
@@ -1,5 +1,5 @@
<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/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- required -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
Expand All @@ -12,14 +12,15 @@
<spring.version>4.0.8.RELEASE</spring.version>
<bom.project.version>0.9.1-beta1</bom.project.version>
</properties>

<!-- banned -->
<build>
<defaultGoal>verify</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>bom</flattenMode>
Expand All @@ -45,7 +46,7 @@
<artifactId>dep</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>

<description>This project contains a module with a BOM.</description>
Expand Down Expand Up @@ -77,7 +78,7 @@
<modules>
<module>bom</module>
</modules>

<organization>
<name>Codehaus</name>
</organization>
Expand All @@ -87,7 +88,7 @@
<artifactId>parent-depMngt</artifactId>
<version>2</version>
</parent>

<pluginRepositories>
<pluginRepository>
<id>none</id>
Expand All @@ -99,17 +100,17 @@
<prerequisites>
<maven>3.0</maven>
</prerequisites>

<reporting>
<outputDirectory>target/site</outputDirectory>
</reporting>

<reports/>

<scm>
<url>http://svn.codehaus.org/mojo</url>
</scm>
</scm>

<url>http://mojo.codehaus.org</url>

</project>
</project>
7 changes: 4 additions & 3 deletions src/it/projects/bom-pomElements/bom/pom.xml
@@ -1,4 +1,5 @@
<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/xsd/maven-4.0.0.xsd">
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.codehaus.mojo.flatten.its</groupId>
Expand All @@ -8,7 +9,7 @@
<artifactId>bom</artifactId>
<packaging>pom</packaging>
<version>${bom.project.version}</version>

<dependencyManagement>
<dependencies>
<!-- BOM of spring boot -->
Expand Down Expand Up @@ -79,5 +80,5 @@
</dependency>
</dependencies>
</dependencyManagement>

</project>
23 changes: 12 additions & 11 deletions src/it/projects/bom-pomElements/pom.xml
@@ -1,5 +1,5 @@
<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/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- required -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
Expand All @@ -12,14 +12,15 @@
<spring.version>4.0.8.RELEASE</spring.version>
<bom.project.version>0.9.1-beta1</bom.project.version>
</properties>

<!-- banned -->
<build>
<defaultGoal>verify</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<updatePomFile>true</updatePomFile>
<pomElements>
Expand Down Expand Up @@ -47,7 +48,7 @@
<artifactId>dep</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>

<description>This project contains a module with a BOM.</description>
Expand Down Expand Up @@ -79,7 +80,7 @@
<modules>
<module>bom</module>
</modules>

<organization>
<name>Codehaus</name>
</organization>
Expand All @@ -89,7 +90,7 @@
<artifactId>parent-depMngt</artifactId>
<version>2</version>
</parent>

<pluginRepositories>
<pluginRepository>
<id>none</id>
Expand All @@ -101,17 +102,17 @@
<prerequisites>
<maven>3.0</maven>
</prerequisites>

<reporting>
<outputDirectory>target/site</outputDirectory>
</reporting>

<reports/>

<scm>
<url>http://svn.codehaus.org/mojo</url>
</scm>
</scm>

<url>http://mojo.codehaus.org</url>

</project>
</project>
8 changes: 5 additions & 3 deletions src/it/projects/cmd-property-substituion/pom.xml
@@ -1,23 +1,25 @@
<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/xsd/maven-4.0.0.xsd">
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
<!-- https://github.com/mojohaus/flatten-maven-plugin/issues/3 -->
<artifactId>cmd-property-substitution</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>${cmd.test.property}</name>
<properties>
<cmd.test.property>FallbackDefaultValue</cmd.test.property>
<cmd.test.property>FallbackDefaultValue</cmd.test.property>
</properties>
<build>
<defaultGoal>verify</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<flattenMode>oss</flattenMode>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
22 changes: 11 additions & 11 deletions src/it/projects/complete-artifact-pom/pom.xml
@@ -1,5 +1,5 @@
<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/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- required -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
Expand All @@ -22,15 +22,15 @@
</contributors>

<description>This project contains only required ignorable elements</description>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo.flatten.its</groupId>
<artifactId>dep</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>

<developers>
Expand Down Expand Up @@ -70,7 +70,7 @@
<artifactId>parent-depMngt</artifactId>
<version>2</version>
</parent>

<pluginRepositories>
<pluginRepository>
<id>none</id>
Expand All @@ -81,22 +81,22 @@
<!-- this one is only required for maven-plugin packaging type -->
<prerequisites>
<maven>3.0</maven>
</prerequisites>
</prerequisites>

<properties>
<key>value</key>
</properties>

<reporting>
<outputDirectory>target/site</outputDirectory>
</reporting>

<reports/>

<scm>
<url>http://svn.codehaus.org/mojo</url>
</scm>
</scm>

<url>http://mojo.codehaus.org</url>

</project>
</project>
20 changes: 10 additions & 10 deletions src/it/projects/complete-mavenplugin-pom/pom.xml
@@ -1,5 +1,5 @@
<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/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- required -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
Expand All @@ -9,7 +9,7 @@

<prerequisites>
<maven>3.0</maven>
</prerequisites>
</prerequisites>

<!-- banned -->
<build>
Expand All @@ -35,7 +35,7 @@
<artifactId>dep</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>

<developers>
Expand Down Expand Up @@ -75,7 +75,7 @@
<artifactId>parent-depMngt</artifactId>
<version>2</version>
</parent>

<pluginRepositories>
<pluginRepository>
<id>none</id>
Expand All @@ -86,17 +86,17 @@
<properties>
<key>value</key>
</properties>

<reporting>
<outputDirectory>target/site</outputDirectory>
</reporting>

<reports/>

<scm>
<url>http://svn.codehaus.org/mojo</url>
</scm>
</scm>

<url>http://mojo.codehaus.org</url>

</project>
</project>
@@ -1,5 +1,5 @@
<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/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
<artifactId>multimodule-module-with-parent-cifriendly</artifactId>
Expand Down
@@ -1,17 +1,17 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
<artifactId>multimodule-module-cifriendly</artifactId>
<version>${revision}</version>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo.flatten.its</groupId>
<artifactId>multimodule-module-cifriendly</artifactId>
<version>${revision}</version>


<dependencies>
<dependency>
<groupId>org.codehaus.mojo.flatten.its</groupId>
<artifactId>dep</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo.flatten.its</groupId>
<artifactId>dep</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>

</project>
</project>

0 comments on commit a21b7db

Please sign in to comment.