You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by if...@apache.org on 2014/03/01 15:20:58 UTC
[1/2] git commit: MNG-5591 use 'reactor' hint for reactor
WorkspaceReader
Repository: maven-integration-testing
Updated Branches:
refs/heads/master 3aa0589ff -> 1e9743a7f
MNG-5591 use 'reactor' hint for reactor WorkspaceReader
Signed-off-by: Igor Fedorenko <ig...@ifedorenko.com>
Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/1e9743a7
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/1e9743a7
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/1e9743a7
Branch: refs/heads/master
Commit: 1e9743a7f89b4c18bfdc2acdac3a74c5463989a9
Parents: 260d52e
Author: Igor Fedorenko <ig...@ifedorenko.com>
Authored: Sat Mar 1 09:15:15 2014 -0500
Committer: Igor Fedorenko <ig...@ifedorenko.com>
Committed: Sat Mar 1 09:15:27 2014 -0500
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 3 +-
.../maven/it/MavenITmng5591WorkspaceReader.java | 66 ++++++++++++++++++++
.../basic/module-a/pom.xml | 37 +++++++++++
.../basic/module-b/pom.xml | 30 +++++++++
.../mng-5591-workspace-reader/basic/pom.xml | 35 +++++++++++
.../mng-5591-workspace-reader/extension/pom.xml | 61 ++++++++++++++++++
.../workspacereader/EmptyWorkspaceReader.java | 40 ++++++++++++
7 files changed, 271 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1e9743a7/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 7914c45..1ea1362 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@ -104,7 +104,8 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// Tests that don't run stable and need to be fixed
// -------------------------------------------------------------------------------------------------------------
- // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng5591WorkspaceReader.class );
suite.addTestSuite( MavenITmng5581LifecycleMappingDelegate.class );
suite.addTestSuite( MavenITmng5572ReactorPluginExtensionsTest.class );
suite.addTestSuite( MavenITmng5576CdFriendlyVersions.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1e9743a7/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5591WorkspaceReader.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5591WorkspaceReader.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5591WorkspaceReader.java
new file mode 100644
index 0000000..440995f
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5591WorkspaceReader.java
@@ -0,0 +1,66 @@
+package org.apache.maven.it;
+
+/*
+ * 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 java.io.File;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+public class MavenITmng5591WorkspaceReader
+ extends AbstractMavenIntegrationTestCase
+{
+ public MavenITmng5591WorkspaceReader()
+ {
+ super( "[3.1.0,)" );
+ }
+
+ public void testWorkspaceReader()
+ throws Exception
+ {
+ /*
+ * The point of this test is to validate that ide WorkspaceReader, like one used by m2e, does not interfere with
+ * reactor dependency resolution. The test comes in two parts. mng-5591-workspace-reader/extension is noop
+ * WorkspaceReader implementation and mng-5591-workspace-reader/basic is a multimodule project with inter-module
+ * dependencies. The workspace reader extension is injected in maven runtime with -Dmaven.ext.class.path command
+ * line argument. The multimodule build fails unless reactor resolution works properly.
+ */
+
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5591-workspace-reader" );
+ File extensionDir = new File( testDir, "extension" );
+ File projectDir = new File( testDir, "basic" );
+
+ Verifier verifier;
+
+ // install the test extension
+ verifier = newVerifier( extensionDir.getAbsolutePath(), "remote" );
+ verifier.executeGoal( "install" );
+ verifier.resetStreams();
+ verifier.verifyErrorFreeLog();
+
+ // compile the test project
+ verifier = newVerifier( projectDir.getAbsolutePath(), "remote" );
+ verifier.addCliOption( "-Dmaven.ext.class.path="
+ + new File( extensionDir, "target/mng-5591-workspace-reader-extension-0.1.jar" ).getCanonicalPath() );
+ verifier.executeGoal( "compile" );
+ verifier.resetStreams();
+ verifier.verifyErrorFreeLog();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1e9743a7/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-a/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-a/pom.xml b/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-a/pom.xml
new file mode 100644
index 0000000..017eeef
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-a/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<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>mng-5591-workspace-reader</groupId>
+ <artifactId>mng-5591-workspace-reader-module-a</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>mng-5591-workspace-reader</groupId>
+ <artifactId>mng-5591-workspace-reader-module-b</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1e9743a7/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-b/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-b/pom.xml b/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-b/pom.xml
new file mode 100644
index 0000000..bb1a7f9
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/module-b/pom.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<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>mng-5591-workspace-reader</groupId>
+ <artifactId>mng-5591-workspace-reader-module-b</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1e9743a7/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/pom.xml b/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/pom.xml
new file mode 100644
index 0000000..2a1c0ea
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5591-workspace-reader/basic/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<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>mng-5591-workspace-reader</groupId>
+ <artifactId>mng-5591-workspace-reader-basic</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>module-a</module>
+ <module>module-b</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1e9743a7/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml b/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml
new file mode 100644
index 0000000..4cdc988
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/pom.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<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>mng-5591-workspace-reader</groupId>
+ <artifactId>mng-5591-workspace-reader-extension</artifactId>
+ <version>0.1</version>
+
+ <properties>
+ <maven.version>3.2.1</maven.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${maven.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>sisu-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>generate-index</id>
+ <goals>
+ <goal>main-index</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1e9743a7/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/src/main/java/org/apache/maven/its/mng5591/workspacereader/EmptyWorkspaceReader.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/src/main/java/org/apache/maven/its/mng5591/workspacereader/EmptyWorkspaceReader.java b/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/src/main/java/org/apache/maven/its/mng5591/workspacereader/EmptyWorkspaceReader.java
new file mode 100644
index 0000000..f8080bc
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5591-workspace-reader/extension/src/main/java/org/apache/maven/its/mng5591/workspacereader/EmptyWorkspaceReader.java
@@ -0,0 +1,40 @@
+package org.apache.maven.its.mng5591.workspacereader;
+
+/*
+ * 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 java.io.File;
+import java.util.Collections;
+import java.util.List;
+
+import javax.inject.Named;
+
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.repository.WorkspaceRepository;
+
+@Named("ide")
+public class EmptyWorkspaceReader implements WorkspaceReader {
+
+ WorkspaceRepository repository = new WorkspaceRepository("ide");
+
+ public WorkspaceRepository getRepository() {
+ return repository;
+ }
+
+ public File findArtifact(Artifact artifact) {
+ return null;
+ }
+
+ public List<String> findVersions(Artifact artifact) {
+ return Collections.emptyList();
+ }
+}
[2/2] git commit: use release 3.2.1 maven version in tests that
require it
Posted by if...@apache.org.
use release 3.2.1 maven version in tests that require it
Signed-off-by: Igor Fedorenko <ig...@ifedorenko.com>
Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/260d52ea
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/260d52ea
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/260d52ea
Branch: refs/heads/master
Commit: 260d52ea3cd74d03e64ca8146f9502a696ad6c31
Parents: 3aa0589
Author: Igor Fedorenko <ig...@ifedorenko.com>
Authored: Fri Feb 28 22:07:51 2014 -0500
Committer: Igor Fedorenko <ig...@ifedorenko.com>
Committed: Sat Mar 1 09:15:27 2014 -0500
----------------------------------------------------------------------
.../it/MavenITmng5389LifecycleParticipantAfterSessionEnd.java | 7 +------
.../apache/maven/it/MavenITmng5530MojoExecutionScopeTest.java | 2 +-
.../maven/it/MavenITmng5581LifecycleMappingDelegate.java | 6 +-----
3 files changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/260d52ea/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5389LifecycleParticipantAfterSessionEnd.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5389LifecycleParticipantAfterSessionEnd.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5389LifecycleParticipantAfterSessionEnd.java
index c0b4af3..ac32fd2 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5389LifecycleParticipantAfterSessionEnd.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5389LifecycleParticipantAfterSessionEnd.java
@@ -28,17 +28,12 @@ public class MavenITmng5389LifecycleParticipantAfterSessionEnd
{
public MavenITmng5389LifecycleParticipantAfterSessionEnd()
{
- super( "[3.1.2,)" );
+ super( "[3.2.1,)" );
}
public void test()
throws Exception
{
- /*
- * This test validates new API introduced in Maven 3.2.0-SNAPSHOT. Until 3.2.0 is released, it is necessary to
- * "mvn install" maven core before running this test.
- */
-
File testDir =
ResourceExtractor.simpleExtractResources( getClass(), "/mng-5389-lifecycleParticipant-afterSession" );
File extensionDir = new File( testDir, "extension" );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/260d52ea/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5530MojoExecutionScopeTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5530MojoExecutionScopeTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5530MojoExecutionScopeTest.java
index f9b45be..bc0a3d1 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5530MojoExecutionScopeTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5530MojoExecutionScopeTest.java
@@ -28,7 +28,7 @@ public class MavenITmng5530MojoExecutionScopeTest
{
public MavenITmng5530MojoExecutionScopeTest()
{
- super( "[3.1.2,)" );
+ super( "[3.2.1,)" );
}
public void test_copyfiles()
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/260d52ea/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5581LifecycleMappingDelegate.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5581LifecycleMappingDelegate.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5581LifecycleMappingDelegate.java
index 590927a..f923550 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5581LifecycleMappingDelegate.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5581LifecycleMappingDelegate.java
@@ -29,13 +29,9 @@ public class MavenITmng5581LifecycleMappingDelegate
{
public MavenITmng5581LifecycleMappingDelegate()
{
- super( "[3.2.0,)" );
+ super( "[3.2.1,)" );
}
- /**
- * This test uses API introduced in Maven 3.2.0-SNAPSHOT. Until 3.2.0 is released, latest maven core must be
- * installed in local repository before running this test.
- */
public void testCustomLifecycle()
throws Exception
{