Index: src/test/java/org/apache/maven/integrationtests/MavenIT0121TestJarDependency.java =================================================================== --- src/test/java/org/apache/maven/integrationtests/MavenIT0121TestJarDependency.java (wersja 0) +++ src/test/java/org/apache/maven/integrationtests/MavenIT0121TestJarDependency.java (wersja 0) @@ -0,0 +1,53 @@ +package org.apache.maven.integrationtests; + +/* + * 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.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + +public class MavenIT0121TestJarDependency + extends AbstractMavenIntegrationTestCase +{ + + /** + * MNG-2871 + */ + public void testit0121() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0121-testJarDependency" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + /* It is important to start from empty repository*/ + verifier.deleteArtifact( "org.apache.maven.its.it0121", "parent", "1.0-SNAPSHOT", "pom" ); + verifier.deleteArtifact( "org.apache.maven.its.it0121", "client", "1.0-SNAPSHOT", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.it0121", "model", "1.0-SNAPSHOT", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.it0121", "model", "1.0-SNAPSHOT", "test-jar" ); + /* Not install or higher goal to repeat the bug */ + verifier.executeGoal( "compile" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + } + + + +} Index: src/test/java/org/apache/maven/integrationtests/MavenIT0120EjbClientDependency.java =================================================================== --- src/test/java/org/apache/maven/integrationtests/MavenIT0120EjbClientDependency.java (wersja 543724) +++ src/test/java/org/apache/maven/integrationtests/MavenIT0120EjbClientDependency.java (kopia robocza) @@ -27,17 +27,40 @@ public class MavenIT0120EjbClientDependency extends AbstractMavenIntegrationTestCase { - public void testit0119() + /** + * MNG-2921 issue + */ + public void testit0120_MNG2921() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0120-ejbClientDependency" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - verifier.deleteArtifact( "org.apache.maven.its.it0119", "parent", "1.0-SNAPSHOT", "pom" ); - verifier.deleteArtifact( "org.apache.maven.its.it0119", "client", "1.0-SNAPSHOT", "jar" ); - verifier.deleteArtifact( "org.apache.maven.its.it0119", "model", "1.0-SNAPSHOT", "ejb" ); + verifier.deleteArtifact( "org.apache.maven.its.it0120", "parent", "1.0-SNAPSHOT", "pom" ); + verifier.deleteArtifact( "org.apache.maven.its.it0120", "client", "1.0-SNAPSHOT", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.it0120", "model", "1.0-SNAPSHOT", "ejb" ); verifier.executeGoal( "install" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); } + + /** + * MNG-2871 + */ + public void testit0120_MNG2871() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0120-ejbClientDependency" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.deleteArtifact( "org.apache.maven.its.it0120", "parent", "1.0-SNAPSHOT", "pom" ); + verifier.deleteArtifact( "org.apache.maven.its.it0120", "client", "1.0-SNAPSHOT", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.it0120", "model", "1.0-SNAPSHOT", "ejb" ); + verifier.executeGoal( "compile" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + } + + + } Index: src/test/resources/pom.xml =================================================================== --- src/test/resources/pom.xml (wersja 543724) +++ src/test/resources/pom.xml (kopia robocza) @@ -119,6 +119,7 @@ - + it0120-ejbClientDependency + it0121-testJarDependency Index: src/test/resources/it0120-ejbClientDependency/model/pom.xml =================================================================== --- src/test/resources/it0120-ejbClientDependency/model/pom.xml (wersja 543724) +++ src/test/resources/it0120-ejbClientDependency/model/pom.xml (kopia robocza) @@ -36,6 +36,7 @@ org.apache.maven.plugins maven-ejb-plugin + 2.1 3.0 Index: src/test/resources/it0120-ejbClientDependency/pom.xml =================================================================== --- src/test/resources/it0120-ejbClientDependency/pom.xml (wersja 543724) +++ src/test/resources/it0120-ejbClientDependency/pom.xml (kopia robocza) @@ -33,6 +33,6 @@ client - MNG-2921 + MNG-2921,MNG-2871 Index: src/test/resources/it0121-testJarDependency/model/src/main/java/org/apache/maven/its/it0121/Component.java =================================================================== --- src/test/resources/it0121-testJarDependency/model/src/main/java/org/apache/maven/its/it0121/Component.java (wersja 0) +++ src/test/resources/it0121-testJarDependency/model/src/main/java/org/apache/maven/its/it0121/Component.java (wersja 0) @@ -0,0 +1,25 @@ +package org.apache.maven.its.it0121; + +/* + * 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. + */ + +public interface Component +{ + void func(); +} Index: src/test/resources/it0121-testJarDependency/model/src/main/resources/META-INF/ejb-jar.xml =================================================================== --- src/test/resources/it0121-testJarDependency/model/src/main/resources/META-INF/ejb-jar.xml (wersja 0) +++ src/test/resources/it0121-testJarDependency/model/src/main/resources/META-INF/ejb-jar.xml (wersja 0) @@ -0,0 +1,26 @@ + + + + + + Index: src/test/resources/it0121-testJarDependency/model/pom.xml =================================================================== --- src/test/resources/it0121-testJarDependency/model/pom.xml (wersja 0) +++ src/test/resources/it0121-testJarDependency/model/pom.xml (wersja 0) @@ -0,0 +1,49 @@ + + + + + + 4.0.0 + + org.apache.maven.its.it0121 + parent + 1.0-SNAPSHOT + + model + Model + jar + + + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + + Index: src/test/resources/it0121-testJarDependency/pom.xml =================================================================== --- src/test/resources/it0121-testJarDependency/pom.xml (wersja 0) +++ src/test/resources/it0121-testJarDependency/pom.xml (wersja 0) @@ -0,0 +1,38 @@ + + + + + + 4.0.0 + org.apache.maven.its.it0121 + parent + Parent + pom + 1.0-SNAPSHOT + + model + client + + + MNG-2871 + + Index: src/test/resources/it0121-testJarDependency/client/src/main/java/org/apache/maven/its/it0121/MyClient.java =================================================================== --- src/test/resources/it0121-testJarDependency/client/src/main/java/org/apache/maven/its/it0121/MyClient.java (wersja 0) +++ src/test/resources/it0121-testJarDependency/client/src/main/java/org/apache/maven/its/it0121/MyClient.java (wersja 0) @@ -0,0 +1,30 @@ +package org.apache.maven.its.it0121; + +/* + * 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.apache.maven.its.it0121.Component; + +public class MyClient +{ + + void func() + { + } +} Index: src/test/resources/it0121-testJarDependency/client/pom.xml =================================================================== --- src/test/resources/it0121-testJarDependency/client/pom.xml (wersja 0) +++ src/test/resources/it0121-testJarDependency/client/pom.xml (wersja 0) @@ -0,0 +1,42 @@ + + + + + + 4.0.0 + + org.apache.maven.its.it0121 + parent + 1.0-SNAPSHOT + + client + Client + jar + + + org.apache.maven.its.it0121 + model + test-jar + 1.0-SNAPSHOT + + +