Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
<mavenVersion>3.9.16</mavenVersion>
<javaVersion>8</javaVersion>

<!-- Used in IT-->
<plexusUtilVersion>${version.plexus-utils}</plexusUtilVersion>
<version.groovy-maven-plugin>2.1.1</version.groovy-maven-plugin>
<version.groovy-all>2.4.21</version.groovy-all>

Expand Down Expand Up @@ -279,6 +281,9 @@
<goal>clean</goal>
<goal>package</goal>
</goals>
<scriptVariables>
<plexusUtilVersion>${version.plexus-utils}</plexusUtilVersion>
</scriptVariables>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MWAR-133/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
<version>@plexusUtilVersion@</version>
</dependency>
</dependencies>
</project>
14 changes: 9 additions & 5 deletions src/it/MWAR-427_update-without-clean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ under the License.

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Pass the variable into the test project to be able to read them -->
<testPlexusUtilVersion>@plexusUtilVersion@</testPlexusUtilVersion>
</properties>

<build>
Expand All @@ -44,28 +46,30 @@ under the License.
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>@version.groovy-maven-plugin@</version>
<version>2.1.1</version>
<configuration>
<source>
def plexusUtilVersion = project.properties['testPlexusUtilVersion']
def fileToModify = new File(project.basedir, 'pom.xml')
processFileInplace(fileToModify) { text ->
text.replaceAll(/3.0.24/,'3.0.23')
text.replaceAll(plexusUtilVersion,'3.0.23')
}
def processFileInplace(file, Closure processText) {
file.write(processText(file.text))
}

new File('src/main/webapp/root.html').renameTo 'src/main/webapp/index.html'
</source>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>@version.groovy-all@</version>
<version>2.4.21</version>
</dependency>
</dependencies>
</plugin>

</plugins>
</build>

Expand All @@ -79,7 +83,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
<version>@plexusUtilVersion@</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion src/it/MWAR-427_update-without-clean/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ assert warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.23.jar') != null
assert warFile.getEntry('WEB-INF/lib/mwar427-1.0-SNAPSHOT.jar') != null
assert warFile.getEntry('index.html') != null

assert warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.24.jar') == null
assert warFile.getEntry("WEB-INF/lib/plexus-utils-" + plexusUtilVersion + ".jar") == null
assert warFile.getEntry('root.html') != null // after MWAR-433, only WEB-INF/lib/ content is checked, other resources may be generated outside m-war-p
7 changes: 5 additions & 2 deletions src/it/MWAR-441/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ under the License.

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Pass the variable into the test project to be able to read them -->
<testPlexusUtilVersion>@plexusUtilVersion@</testPlexusUtilVersion>
</properties>

<build>
Expand All @@ -48,9 +50,10 @@ under the License.
<version>@version.groovy-maven-plugin@</version>
<configuration>
<source>
def plexusUtilVersion = project.properties['testPlexusUtilVersion']
def fileToModify = new File(project.basedir, 'pom.xml')
processFileInplace(fileToModify) { text ->
text.replaceAll(/3.0.24/,'3.0.23')
text.replaceAll(plexusUtilVersion,'3.0.23')
}
def processFileInplace(file, Closure processText) {
file.write(processText(file.text))
Expand Down Expand Up @@ -80,7 +83,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
<version>@plexusUtilVersion@</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion src/it/MWAR-441/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ assert warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.23.jar') != null
assert warFile.getEntry('WEB-INF/lib/mwar427-1.0-SNAPSHOT.jar') != null
assert warFile.getEntry('index.html') != null

assert warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.24.jar') == null
assert warFile.getEntry("WEB-INF/lib/plexus-utils-" + plexusUtilVersion + ".jar") == null
assert warFile.getEntry('root.html') == null // after MWAR-441, this path is also removed as outdated (with the '/' config in the pom).
4 changes: 2 additions & 2 deletions src/it/scoped-dependency-same-artifact/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
<version>@plexusUtilVersion@</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<classifier>sources</classifier>
<version>3.0.24</version>
<version>@plexusUtilVersion@</version>
</dependency>
</dependencies>
</project>
8 changes: 4 additions & 4 deletions src/it/scoped-dependency-same-artifact/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ try
return false;
}

File plexusUtilsDependency = new File( libDir, "plexus-utils-3.0.24.jar" );
File plexusUtilsDependency = new File( libDir, "plexus-utils-" + plexusUtilVersion + ".jar" );
if ( !plexusUtilsDependency.exists() || plexusUtilsDependency.isDirectory() )
{
System.err.println( "plexus-utils-3.0.24.jar is missing or a directory." );
System.err.println( "plexus-utils-" + plexusUtilVersion + ".jar is missing or a directory." );
return false;
}
File plexusUtilsSourceDependency = new File( libDir, "plexus-utils-3.0.24-sources.jar" );
File plexusUtilsSourceDependency = new File( libDir, "plexus-utils-" + plexusUtilVersion + "-sources.jar" );
if ( !plexusUtilsSourceDependency.exists() || plexusUtilsSourceDependency.isDirectory() )
{
System.err.println( "plexus-utils-3.0.24-sources.jar is missing or a directory." );
System.err.println( "plexus-utils-" + plexusUtilVersion + "-sources.jar is missing or a directory." );
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/it/simple-war-no-webxml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
<version>@plexusUtilVersion@</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/it/simple-war-no-webxml/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ try
return false;
}

File plexusUtilsDependency = new File( libDir, "plexus-utils-3.0.24.jar" );
File plexusUtilsDependency = new File( libDir, "plexus-utils-" + plexusUtilVersion + ".jar" );
if ( !plexusUtilsDependency.exists() || plexusUtilsDependency.isDirectory() )
{
System.err.println( "plexus-utils-3.0.24.jar is missing or a directory." );
System.err.println( "plexus-utils-" + plexusUtilVersion + ".jar is missing or a directory." );
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/it/simple-war-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
<version>@plexusUtilVersion@</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/it/simple-war-project/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ try
return false;
}

File plexusUtilsDependency = new File( libDir, "plexus-utils-3.0.24.jar" );
File plexusUtilsDependency = new File( libDir, "plexus-utils-" + plexusUtilVersion + ".jar" );
if ( !plexusUtilsDependency.exists() || plexusUtilsDependency.isDirectory() )
{
System.err.println( "plexus-utils-1.4.6.jar is missing or a directory." );
System.err.println( "plexus-utils-" + plexusUtilVersion + ".jar is missing or a directory." );
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void testDefaultOverlays(WarExplodedMojo mojo) throws Exception {
assertedFiles.addAll(assertWebXml(webAppDirectory));
assertedFiles.addAll(assertCustomContent(
webAppDirectory, new String[] {"index.jsp", "login.jsp", "admin.jsp"}, "overlay file not found"));

// index and login come from overlay1
assertOverlayedFile(webAppDirectory, "overlay-one", "index.jsp");
assertOverlayedFile(webAppDirectory, "overlay-one", "login.jsp");
Expand Down
Loading