o Restored original intention of it0120, i.e. merely captured MNG-2921, and decoupled it from production plugins

(The test was changed in r572208 to also capture MNG-2871 which is however a substantially different issue)
o Added dedicated IT for MNG-2871

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@707908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-10-25 22:02:59 +00:00
parent 4275fdcd42
commit 9be1f43015
20 changed files with 500 additions and 210 deletions

View File

@ -131,8 +131,10 @@ MavenITmng3645POMSyntaxErrorTest
suite.addTestSuite( MavenITmng3052DepRepoAggregationTest.class ); suite.addTestSuite( MavenITmng3052DepRepoAggregationTest.class );
suite.addTestSuite( MavenITmng3012Test.class ); suite.addTestSuite( MavenITmng3012Test.class );
suite.addTestSuite( MavenITmng2972OverridePluginDependency.class ); suite.addTestSuite( MavenITmng2972OverridePluginDependency.class );
suite.addTestSuite( MavenITmng2921Test.class );
suite.addTestSuite( MavenITmng2892Test.class ); suite.addTestSuite( MavenITmng2892Test.class );
suite.addTestSuite( MavenITmng2878Test.class ); suite.addTestSuite( MavenITmng2878Test.class );
suite.addTestSuite( MavenITmng2871Test.class );
suite.addTestSuite( MavenITmng2861RelocationsAndRanges.class ); suite.addTestSuite( MavenITmng2861RelocationsAndRanges.class );
suite.addTestSuite( MavenITmng2790Test.class ); suite.addTestSuite( MavenITmng2790Test.class );
suite.addTestSuite( MavenITmng2749Test.class ); suite.addTestSuite( MavenITmng2749Test.class );
@ -279,9 +281,6 @@ MavenITmng3645POMSyntaxErrorTest
// suite.addTestSuite( MavenITmng3391ImportScopeErrorScenariosTest.class ); // suite.addTestSuite( MavenITmng3391ImportScopeErrorScenariosTest.class );
// suite.addTestSuite( MavenITmng3530DynamicPOMInterpolationTest.class ); // suite.addTestSuite( MavenITmng3530DynamicPOMInterpolationTest.class );
// -- not passing for 2.0.7 either, looks to be 2.1+ ?
// suite.addTestSuite( MavenIT0120EjbClientDependency.class );
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
// suite.addTestSuite( MavenIT0121TransitiveDepManVersion.class ); -- MNG-3038 // suite.addTestSuite( MavenIT0121TransitiveDepManVersion.class ); -- MNG-3038
// suite.addTestSuite( MavenIT0122ReactorDependencyResolutionTest.class ); -- MNG-3023 // suite.addTestSuite( MavenIT0122ReactorDependencyResolutionTest.class ); -- MNG-3023

View File

@ -19,29 +19,46 @@ package org.apache.maven.it;
* under the License. * under the License.
*/ */
import java.io.File;
import org.apache.maven.it.Verifier; import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor; import org.apache.maven.it.util.ResourceExtractor;
public class MavenIT0120EjbClientDependency import java.io.File;
import java.util.List;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-2871">MNG-2871</a>.
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class MavenITmng2871Test
extends AbstractMavenIntegrationTestCase extends AbstractMavenIntegrationTestCase
{ {
public void testit0120()
public MavenITmng2871Test()
{
super( "(2.999,)" );
}
/**
* Verify that dependencies on not-yet-packaged sub artifacts in build phases prior to package can be satisfied
* from a module's output directory, i.e. with the loose class files.
*/
public void testitMNG2871()
throws Exception throws Exception
{ {
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0120-ejbClientDependency" ); File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2871" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() ); Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.deleteArtifact( "org.apache.maven.its.it0120", "parent", "1.0-SNAPSHOT", "pom" ); verifier.setAutoclean( false );
verifier.deleteArtifact( "org.apache.maven.its.it0120", "client", "1.0-SNAPSHOT", "jar" ); verifier.deleteDirectory( "consumer/target" );
verifier.deleteArtifact( "org.apache.maven.its.it0120", "model", "1.0-SNAPSHOT", "ejb" ); verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
/* Not "install" or "higher" goal to repeat the bug */
verifier.executeGoal( "compile" );
verifier.verifyErrorFreeLog();
verifier.resetStreams(); verifier.resetStreams();
List compileClassPath = verifier.loadLines( "consumer/target/compile.txt", "UTF-8" );
assertEquals( 2, compileClassPath.size() );
assertEquals( new File( testDir, "ejbs/target/classes" ).getCanonicalFile(),
new File( compileClassPath.get( 1 ).toString() ).getCanonicalFile() );
} }
} }

View File

@ -0,0 +1,74 @@
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 org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
import java.util.Collection;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-2921">MNG-2921</a>.
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class MavenITmng2921Test
extends AbstractMavenIntegrationTestCase
{
public MavenITmng2921Test()
{
super( "(2.0.6,)" );
}
/**
* Verify that attached project artifacts can be resolved from the reactor as active project artifacts for
* consumption on other module's class paths. Note the subtle difference of this test compared to the closely
* related issue MNG-2871: This test is about *attached* artifacts, i.e. dependencies that have already been
* packaged. MNG-2871 on the other hand is about dependencies that haven't been packaged yet but merely exist
* as loose class files in a module's output directory.
*/
public void testitMNG2921()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2921" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteDirectory( "consumer/target" );
verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Collection compileArtifacts = verifier.loadLines( "consumer/target/compile.txt", "UTF-8" );
assertTrue( compileArtifacts.toString(),
compileArtifacts.contains( "org.apache.maven.its.mng2921:ejbs:ejb-client:client:1.0-SNAPSHOT" ) );
assertFalse( compileArtifacts.toString(),
compileArtifacts.contains( "org.apache.maven.its.mng2921:tests:test-jar:tests:1.0-SNAPSHOT" ) );
Collection testArtifacts = verifier.loadLines( "consumer/target/test.txt", "UTF-8" );
assertTrue( testArtifacts.toString(),
testArtifacts.contains( "org.apache.maven.its.mng2921:ejbs:ejb-client:client:1.0-SNAPSHOT" ) );
assertTrue( testArtifacts.toString(),
testArtifacts.contains( "org.apache.maven.its.mng2921:tests:test-jar:tests:1.0-SNAPSHOT" ) );
}
}

View File

@ -1,42 +0,0 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.it0120</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>client</artifactId>
<name>Client</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.it0120</groupId>
<artifactId>model</artifactId>
<type>ejb-client</type>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -1,37 +0,0 @@
package org.apache.maven.its.it0120;
/*
* 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.it0120.Component;
public class MyClient
{
void func()
{
Component testComponent = new Component()
{
public void func()
{
}
};
}
}

View File

@ -1,51 +0,0 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.it0120</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>model</artifactId>
<name>Model</name>
<packaging>ejb</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<generateClient>true</generateClient>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,25 +0,0 @@
package org.apache.maven.its.it0120;
/*
* 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();
}

View File

@ -1,26 +0,0 @@
<?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.
-->
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0">
</ejb-jar>

View File

@ -0,0 +1,67 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng2871</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>consumer</artifactId>
<packaging>jar</packaging>
<name>Maven Integration Test :: MNG-2871 :: Dependency Consumer</name>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng2871</groupId>
<artifactId>ejbs</artifactId>
<type>ejb-client</type>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>resolve</id>
<phase>validate</phase>
<configuration>
<compileClassPath>target/compile.txt</compileClassPath>
</configuration>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng2871</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>ejbs</artifactId>
<packaging>ejb</packaging>
<name>Maven Integration Test :: MNG-2871 :: EJB Client JAR Provider</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<!--
NOTE: This mimics the Maven Compiler Plugin which would normally set the output directory as the project's
artifact file.
-->
<execution>
<id>install</id>
<phase>validate</phase>
<configuration>
<mainFile>target/classes</mainFile>
</configuration>
<goals>
<goal>set</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,3 @@
# NOTE: This build output is a static part of the test and not generated by the actual test run, so apparently
# shouldn't be cleaned.
key = value

View File

@ -9,7 +9,7 @@ to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an software distributed under the License is distributed on an
@ -19,20 +19,23 @@ specific language governing permissions and limitations
under the License. under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <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/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.it0120</groupId>
<groupId>org.apache.maven.its.mng2871</groupId>
<artifactId>parent</artifactId> <artifactId>parent</artifactId>
<name>Parent</name>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven Integration Test :: MNG-2871 :: Parent</name>
<description>
Verify that dependencies on not-yet-packaged sub artifacts in build phases prior to package can be satisfied
from a module's output directory, i.e. with the loose class files.
</description>
<modules> <modules>
<module>model</module> <module>ejbs</module>
<module>client</module> <module>consumer</module>
</modules> </modules>
<properties>
<issue>MNG-2921,MNG-2871</issue>
</properties>
</project> </project>

View File

@ -0,0 +1,80 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng2921</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>consumer</artifactId>
<packaging>jar</packaging>
<name>Maven Integration Test :: MNG-2921 :: Dependency Consumer</name>
<dependencies>
<!--
NOTE: Is is an essential part of the test design to check dependencies with different scopes since active project
artifacts must be resolved with the same scope as the requested dependency.
-->
<dependency>
<groupId>org.apache.maven.its.mng2921</groupId>
<artifactId>ejbs</artifactId>
<type>ejb-client</type>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng2921</groupId>
<artifactId>tests</artifactId>
<type>test-jar</type>
<version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>resolve</id>
<phase>validate</phase>
<configuration>
<compileArtifacts>target/compile.txt</compileArtifacts>
<testArtifacts>target/test.txt</testArtifacts>
</configuration>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng2921</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>ejbs</artifactId>
<packaging>ejb</packaging>
<name>Maven Integration Test :: MNG-2921 :: EJB Client JAR Provider</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>install</id>
<phase>validate</phase>
<configuration>
<mainFile>main.jar</mainFile>
<attachedFile>attached.jar</attachedFile>
<artifactType>ejb-client</artifactType>
<artifactClassifier>client</artifactClassifier>
</configuration>
<goals>
<goal>set</goal>
<goal>attach</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,45 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng2921</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven Integration Test :: MNG-2921 :: Parent</name>
<description>
Verify that attached project artifacts can be resolved from the reactor as active project artifacts for
consumption on other module's class paths. Note the subtle difference of this test compared to the closely
related issue MNG-2871: This test is about *attached* artifacts, i.e. dependencies that have already been
packaged. MNG-2871 on the other hand is about dependencies that haven't been packaged yet but merely exist
as loose class files in a module's output directory.
</description>
<modules>
<module>tests</module>
<module>ejbs</module>
<module>consumer</module>
</modules>
</project>

View File

@ -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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng2921</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>tests</artifactId>
<packaging>jar</packaging>
<name>Maven Integration Test :: MNG-2921 :: Test JAR Provider</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>install</id>
<phase>validate</phase>
<configuration>
<mainFile>main.jar</mainFile>
<attachedFile>attached.jar</attachedFile>
<artifactType>test-jar</artifactType>
<artifactClassifier>tests</artifactClassifier>
</configuration>
<goals>
<goal>set</goal>
<goal>attach</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>