You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/11/11 14:19:36 UTC
[maven-integration-testing] branch
mng-6754-version-timestamp-in-multimodule-build created (now b5c1143)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.
at b5c1143 Deploy separate repo and verify mavenBuildTimestamp
This branch includes the following new commits:
new 31481c6 [MNG-6754] Don't work outside project dir
new e310e89 [MNG-6754] Verify deployment timestamp of parent
new b81c426 [MNG-6754] Add the wait between all modules
new 482feaf [MNG-6754] Use decent names for all modules in build
new 2a8b3be [MNG-6754] Also verify timestamps in local repo
new 2df7592 [MNG-6754] Also verify timestamps in local repo with remote deployed
new 3211bf8 [MNG-6754] Correct version range for test
new c77c80d [MNG-6754] Make JUnit a managed dependency in test project
new b5c1143 Deploy separate repo and verify mavenBuildTimestamp
The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-integration-testing] 05/09: [MNG-6754] Also verify
timestamps in local repo
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 2a8b3bef94d310a57d3eda5c2632d425b162ec1f
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Tue Nov 10 19:53:44 2020 +0100
[MNG-6754] Also verify timestamps in local repo
---
...avenITmng6754TimestampInMultimoduleProject.java | 39 ++++++++++++++++------
1 file changed, 29 insertions(+), 10 deletions(-)
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
index 42289d7..ee6dd56 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
@@ -31,6 +31,8 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import static java.util.Arrays.asList;
+
public class MavenITmng6754TimestampInMultimoduleProject
extends AbstractMavenIntegrationTestCase
{
@@ -49,23 +51,40 @@ public class MavenITmng6754TimestampInMultimoduleProject
{
final File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
- final Path repoDir = Paths.get( verifier.getBasedir() ).resolve( "repo" );
+ final Path baseDir = Paths.get( System.getProperty("maven.repo.local") );
+ final Path repoDir = baseDir.resolve( "repo" );
verifier.addCliOption( "-Drepodir=" + repoDir.toString() );
- verifier.executeGoal( "deploy" );
+ verifier.executeGoals( asList( "install", "deploy" ) );
verifier.verifyErrorFreeLog();
- final String parentLastUpdated = getLastUpdatedFromMetadata( getMetadataPath( repoDir, "parent" ) );
- final String aLastUpdated = getLastUpdatedFromMetadata( getMetadataPath( repoDir, "child-a" ) );
- final String bLastUpdated = getLastUpdatedFromMetadata( getMetadataPath( repoDir, "child-b" ) );
+ final String parentLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "parent" ) );
+ final String aLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "child-a" ) );
+ final String bLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "child-b" ) );
+
+ assertEquals( "Installed child modules should have equal lastUpdated in maven-metadata-local.xml",
+ aLastUpdatedLocal, bLastUpdatedLocal );
+ assertEquals( "Installed parent module should have equal lastUpdated in maven-metadata-local.xml as their children",
+ aLastUpdatedLocal, parentLastUpdatedLocal );
- assertEquals( "Expect child modules to be deployed with the same lastUpdated in maven-metadata.xml",
- aLastUpdated, bLastUpdated );
- assertEquals( "Expect parent modules to be deployed with the same lastUpdated in maven-metadata.xml as their children",
- aLastUpdated, parentLastUpdated );
+ final String parentLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "parent" ) );
+ final String aLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "child-a" ) );
+ final String bLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "child-b" ) );
+
+ assertEquals( "Deployed child modules should have equal lastUpdated in maven-metadata.xml",
+ aLastUpdatedRemote, bLastUpdatedRemote );
+ assertEquals( "Deployed parent module should have equal lastUpdated in maven-metadata.xml as their children",
+ aLastUpdatedRemote, parentLastUpdatedRemote );
+ }
+
+ private Path getLocalMetadataPath( final Path projectDir, final String moduleName )
+ {
+ final Path mng6754Path = Paths.get( "org", "apache", "maven", "its", "mng6754" );
+ final Path modulePath = projectDir.resolve( mng6754Path.resolve( moduleName ) );
+ return modulePath.resolve( "maven-metadata-local.xml" );
}
- private Path getMetadataPath( final Path repoDir, final String moduleName )
+ private Path getRemoteMetadataPath( final Path repoDir, final String moduleName )
{
final Path mng6754Path = Paths.get( "org", "apache", "maven", "its", "mng6754" );
final Path modulePath = repoDir.resolve( mng6754Path.resolve( moduleName ) );
[maven-integration-testing] 09/09: Deploy separate repo and verify
mavenBuildTimestamp
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit b5c11438b3869861a62f40f0b280ff9214278207
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Wed Nov 11 15:18:40 2020 +0100
Deploy separate repo and verify mavenBuildTimestamp
---
...avenITmng6754TimestampInMultimoduleProject.java | 34 ++++++++++++++--------
.../pom.xml | 28 +++++++++++++++++-
2 files changed, 49 insertions(+), 13 deletions(-)
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
index 67b261c..247050a 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
@@ -28,6 +28,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
+import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -50,20 +51,25 @@ public class MavenITmng6754TimestampInMultimoduleProject
{
final File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
- final Path baseDir = Paths.get( System.getProperty("maven.repo.local") );
- final Path repoDir = baseDir.resolve( "repo" );
- verifier.addCliOption( "-Drepodir=" + repoDir.toString() );
+ final Path localRepoDir = Paths.get( verifier.getLocalRepository() );
+ final Path remoteRepoDir = Paths.get( verifier.getBasedir(), "repo" );
+ verifier.deleteDirectory( "repo" );
+ verifier.deleteArtifacts ( "org.apache.maven.its.mng6754" );
+ verifier.addCliOption( "-Drepodir=" + remoteRepoDir );
verifier.executeGoals( asList( "install", "deploy" ) );
verifier.verifyErrorFreeLog();
- final String parentLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "parent" ) );
- final String aLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "child-a" ) );
- final String bLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "child-b" ) );
+ final Properties props = verifier.loadProperties( "target/timestamp.properties" );
+ final String mavenBuildTimestamp = props.getProperty( "project.properties.timestamp" );
- final String parentLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "parent" ) );
- final String aLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "child-a" ) );
- final String bLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "child-b" ) );
+ final String parentLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( localRepoDir, "parent" ) );
+ final String aLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( localRepoDir, "child-a" ) );
+ final String bLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( localRepoDir, "child-b" ) );
+
+ final String parentLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( remoteRepoDir, "parent" ) );
+ final String aLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( remoteRepoDir, "child-a" ) );
+ final String bLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( remoteRepoDir, "child-b" ) );
assertEquals( "Installed child modules should have equal lastUpdated in maven-metadata-local.xml",
aLastUpdatedLocal, bLastUpdatedLocal );
@@ -79,12 +85,16 @@ public class MavenITmng6754TimestampInMultimoduleProject
aLastUpdatedLocal, aLastUpdatedRemote );
assertEquals( "Installed child-b module should have equal lastUpdated as deployed counterparts",
bLastUpdatedLocal, bLastUpdatedRemote );
+ assertEquals( "Installed parent module should have equal lastUpdated as the Maven build timestamp",
+ parentLastUpdatedLocal, mavenBuildTimestamp );
+ assertEquals( "Deployed parent module should have equal lastUpdated as the Maven build timestamp",
+ parentLastUpdatedRemote, mavenBuildTimestamp );
}
- private Path getLocalMetadataPath( final Path projectDir, final String moduleName )
+ private Path getLocalMetadataPath( final Path repoDir, final String moduleName )
{
final Path mng6754Path = Paths.get( "org", "apache", "maven", "its", "mng6754" );
- final Path modulePath = projectDir.resolve( mng6754Path.resolve( moduleName ) );
+ final Path modulePath = repoDir.resolve( mng6754Path.resolve( moduleName ) );
return modulePath.resolve( "maven-metadata-local.xml" );
}
@@ -109,6 +119,6 @@ public class MavenITmng6754TimestampInMultimoduleProject
// just in case, make sure the test will fail if there's no <lastUpdated>
// inside "maven-metadata.xml"
- return "" + Math.random();
+ return "";
}
}
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml
index 339dbed..4fd354c 100644
--- a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml
@@ -39,7 +39,8 @@ under the License.
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
- <custom.property>${maven.build.timestamp}</custom.property>
+ <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
+ <timestamp>${maven.build.timestamp}</timestamp>
</properties>
<distributionManagement>
@@ -64,4 +65,29 @@ under the License.
</dependency>
</dependencies>
</dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-expression</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <outputFile>target/timestamp.properties</outputFile>
+ <expressions>
+ <expression>project/properties/timestamp</expression>
+ </expressions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>eval</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
[maven-integration-testing] 07/09: [MNG-6754] Correct version range
for test
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 3211bf8394f05eb3bb35ed2bfc4f130a859f589f
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Tue Nov 10 19:56:47 2020 +0100
[MNG-6754] Correct version range for test
---
.../apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
index 4f47ac8..67b261c 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
@@ -42,8 +42,7 @@ public class MavenITmng6754TimestampInMultimoduleProject
public MavenITmng6754TimestampInMultimoduleProject()
{
-// super( "[3.7.0,)" );
- super( "[3.6.0,)" );
+ super( "[3.7.0,)" );
}
public void testArtifactsHaveSameTimestamp()
[maven-integration-testing] 08/09: [MNG-6754] Make JUnit a managed
dependency in test project
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit c77c80d6985ef3c40d03405bc0ac9a70d1f5b909
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Wed Nov 11 08:29:47 2020 +0100
[MNG-6754] Make JUnit a managed dependency in test project
---
.../child-a/pom.xml | 2 --
.../child-b/pom.xml | 2 --
.../mng-6754-version-timestamp-in-multimodule-build/pom.xml | 10 ++++++++++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
index b004969..9f10439 100644
--- a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
@@ -35,8 +35,6 @@ under the License.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
</dependency>
</dependencies>
</project>
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml
index 21f586a..f4122f7 100644
--- a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml
@@ -35,8 +35,6 @@ under the License.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
</dependency>
</dependencies>
</project>
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml
index a8e6be7..339dbed 100644
--- a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/pom.xml
@@ -54,4 +54,14 @@ under the License.
<module>child-b</module>
</modules>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
</project>
[maven-integration-testing] 01/09: [MNG-6754] Don't work outside
project dir
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 31481c6910d27f8b2c3cfd04e5cf3978a59c574f
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Tue Nov 10 19:15:24 2020 +0100
[MNG-6754] Don't work outside project dir
---
.../apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
index 568a2b4..f3a3deb 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
@@ -49,7 +49,7 @@ public class MavenITmng6754TimestampInMultimoduleProject
{
final File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
- final Path repoDir = Files.createTempDirectory( "mng6754" ).resolve( "repo" );
+ final Path repoDir = Paths.get( verifier.getBasedir() ).resolve( "repo" );
verifier.addCliOption( "-Drepodir=" + repoDir.toString() );
verifier.executeGoal( "deploy" );
[maven-integration-testing] 02/09: [MNG-6754] Verify deployment
timestamp of parent
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit e310e8952845dfb537030b779b7d80bd292303f4
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Tue Nov 10 19:18:50 2020 +0100
[MNG-6754] Verify deployment timestamp of parent
---
.../apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
index f3a3deb..42289d7 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
@@ -55,11 +55,14 @@ public class MavenITmng6754TimestampInMultimoduleProject
verifier.executeGoal( "deploy" );
verifier.verifyErrorFreeLog();
+ final String parentLastUpdated = getLastUpdatedFromMetadata( getMetadataPath( repoDir, "parent" ) );
final String aLastUpdated = getLastUpdatedFromMetadata( getMetadataPath( repoDir, "child-a" ) );
final String bLastUpdated = getLastUpdatedFromMetadata( getMetadataPath( repoDir, "child-b" ) );
assertEquals( "Expect child modules to be deployed with the same lastUpdated in maven-metadata.xml",
aLastUpdated, bLastUpdated );
+ assertEquals( "Expect parent modules to be deployed with the same lastUpdated in maven-metadata.xml as their children",
+ aLastUpdated, parentLastUpdated );
}
private Path getMetadataPath( final Path repoDir, final String moduleName )
[maven-integration-testing] 04/09: [MNG-6754] Use decent names for
all modules in build
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 482feaf3b7fc05709a932c81a94d9f7c321fd0f7
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Tue Nov 10 19:23:22 2020 +0100
[MNG-6754] Use decent names for all modules in build
---
.../mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml | 1 +
.../mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml | 1 +
2 files changed, 2 insertions(+)
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
index 45c5cd8..b004969 100644
--- a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
@@ -30,6 +30,7 @@ under the License.
<version>1.0</version>
</parent>
<artifactId>child-a</artifactId>
+ <name>Maven Integration Test :: Child A</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml
index 1097930..21f586a 100644
--- a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-b/pom.xml
@@ -30,6 +30,7 @@ under the License.
<version>1.0</version>
</parent>
<artifactId>child-b</artifactId>
+ <name>Maven Integration Test :: Child B</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
[maven-integration-testing] 06/09: [MNG-6754] Also verify
timestamps in local repo with remote deployed
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 2df75927b947a4a3cd9a1d61758d98c91f605dea
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Tue Nov 10 19:55:51 2020 +0100
[MNG-6754] Also verify timestamps in local repo with remote deployed
---
.../it/MavenITmng6754TimestampInMultimoduleProject.java | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
index ee6dd56..4f47ac8 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6754TimestampInMultimoduleProject.java
@@ -62,19 +62,24 @@ public class MavenITmng6754TimestampInMultimoduleProject
final String aLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "child-a" ) );
final String bLastUpdatedLocal = getLastUpdatedFromMetadata( getLocalMetadataPath( baseDir, "child-b" ) );
- assertEquals( "Installed child modules should have equal lastUpdated in maven-metadata-local.xml",
- aLastUpdatedLocal, bLastUpdatedLocal );
- assertEquals( "Installed parent module should have equal lastUpdated in maven-metadata-local.xml as their children",
- aLastUpdatedLocal, parentLastUpdatedLocal );
-
final String parentLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "parent" ) );
final String aLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "child-a" ) );
final String bLastUpdatedRemote = getLastUpdatedFromMetadata( getRemoteMetadataPath( repoDir, "child-b" ) );
+ assertEquals( "Installed child modules should have equal lastUpdated in maven-metadata-local.xml",
+ aLastUpdatedLocal, bLastUpdatedLocal );
+ assertEquals( "Installed parent module should have equal lastUpdated in maven-metadata-local.xml as their children",
+ aLastUpdatedLocal, parentLastUpdatedLocal );
assertEquals( "Deployed child modules should have equal lastUpdated in maven-metadata.xml",
aLastUpdatedRemote, bLastUpdatedRemote );
assertEquals( "Deployed parent module should have equal lastUpdated in maven-metadata.xml as their children",
aLastUpdatedRemote, parentLastUpdatedRemote );
+ assertEquals( "Installed parent module should have equal lastUpdated as deployed counterparts",
+ parentLastUpdatedLocal, parentLastUpdatedRemote );
+ assertEquals( "Installed child-a module should have equal lastUpdated as deployed counterparts",
+ aLastUpdatedLocal, aLastUpdatedRemote );
+ assertEquals( "Installed child-b module should have equal lastUpdated as deployed counterparts",
+ bLastUpdatedLocal, bLastUpdatedRemote );
}
private Path getLocalMetadataPath( final Path projectDir, final String moduleName )
[maven-integration-testing] 03/09: [MNG-6754] Add the wait between
all modules
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch mng-6754-version-timestamp-in-multimodule-build
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit b81c426a749144cb4e90ecc6d6404577aa39693e
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Tue Nov 10 19:22:57 2020 +0100
[MNG-6754] Add the wait between all modules
---
.../child-a/pom.xml | 8 ++++++
.../org/apache/maven/its/mng6754/DelayingTest.java | 33 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
index 61c94db..45c5cd8 100644
--- a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/pom.xml
@@ -30,4 +30,12 @@ under the License.
<version>1.0</version>
</parent>
<artifactId>child-a</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
diff --git a/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/src/test/java/org/apache/maven/its/mng6754/DelayingTest.java b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/src/test/java/org/apache/maven/its/mng6754/DelayingTest.java
new file mode 100644
index 0000000..63536a0
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-6754-version-timestamp-in-multimodule-build/child-a/src/test/java/org/apache/maven/its/mng6754/DelayingTest.java
@@ -0,0 +1,33 @@
+package org.apache.maven.its.mng6754;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.junit.Test;
+
+import java.util.concurrent.TimeUnit;
+
+public class DelayingTest
+{
+ @Test
+ public void generateSomeDelay() throws InterruptedException
+ {
+ TimeUnit.SECONDS.sleep( 1 );
+ }
+}