Author: olamy
Date: Thu Jul 12 22:37:40 2012
New Revision: 1360989
URL: http://svn.apache.org/viewvc?rev=1360989&view=rev
Log:
fix ear plugin build
Modified:
maven/plugins/trunk/maven-ear-plugin/pom.xml
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/AbstractEarPluginIT.java
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-029/pom.xml
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-043/pom.xml
Modified: maven/plugins/trunk/maven-ear-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/pom.xml?rev=1360989&r1=1360988&r2=1360989&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-ear-plugin/pom.xml Thu Jul 12 22:37:40 2012
@@ -114,7 +114,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
- <version>1.0</version>
+ <version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -187,17 +187,48 @@ under the License.
</reporting>
<profiles>
+
<profile>
<id>run-its</id>
+ <properties>
+
<localRepositoryPath>${project.build.testOutputDirectory}/m2repo</localRepositoryPath>
+ </properties>
<build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/pom.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>false</filtering>
+ <excludes>
+ <exclude>**/pom.xml</exclude>
+ </excludes>
+ </testResource>
+ <testResource>
+ <directory>src/test/filtered-resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <configuration>
+ <escapeString>\</escapeString>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<!-- NOTE: Must be synced with the repo path used by
AbstractEarPluginIT -->
-
<localRepositoryPath>${project.build.testOutputDirectory}/m2repo</localRepositoryPath>
+
<localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
<goals>
<goal>clean</goal>
<goal>package</goal>
@@ -208,27 +239,6 @@ under the License.
</pluginManagement>
<plugins>
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <copy overwrite="true"
todir="${project.build.testOutputDirectory}/projects">
- <fileset dir="src/test/resources/projects"
includes="**/pom.xml" />
- <filterset>
- <filter token="project.version"
value="${project.version}" />
- </filterset>
- </copy>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
@@ -242,6 +252,10 @@ under the License.
</includes>
<systemPropertyVariables combine.children="append">
<maven.home>${maven.home}</maven.home>
+
<userlocalRepository>${settings.localRepository}</userlocalRepository>
+
<localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
+ <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
+ <basedirectory>${basedir}</basedirectory>
</systemPropertyVariables>
</configuration>
</execution>
Modified:
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/AbstractEarPluginIT.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/AbstractEarPluginIT.java?rev=1360989&r1=1360988&r2=1360989&view=diff
==============================================================================
---
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/AbstractEarPluginIT.java
(original)
+++
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/AbstractEarPluginIT.java
Thu Jul 12 22:37:40 2012
@@ -20,7 +20,6 @@ package org.apache.maven.plugin.ear.it;
*/
import junit.framework.TestCase;
-
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
@@ -30,17 +29,18 @@ import org.custommonkey.xmlunit.XMLAsser
import org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier;
import org.xml.sax.helpers.DefaultHandler;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
/**
* Base class for ear test cases.
*
@@ -85,9 +85,12 @@ public abstract class AbstractEarPluginI
File testDir = getTestDir( projectName );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
// Let's add alternate settings.xml setting so that the latest
dependencies are used
- verifier.getCliOptions().add( "-s \"" + settingsFile.getAbsolutePath()
+ "\"" );
+ String localRepo = System.getProperty( "localRepositoryPath" );
+ verifier.setLocalRepo( localRepo );
+
+ verifier.getCliOptions().add( "-s \"" + settingsFile.getAbsolutePath()
+ "\"" );//
verifier.getCliOptions().add( "-X" );
- verifier.localRepo = localRepositoryDir.getAbsolutePath();
+ verifier.localRepo = localRepo;
// On linux and macOSX, an exception is thrown if a build failure
occurs underneath
try
@@ -393,9 +396,8 @@ public abstract class AbstractEarPluginI
// Make sure that it matches even if the elements are not
in
// the exact same order
- final Diff myDiff =
- new Diff( docBuilder.parse(
expectedDeploymentDescriptor ),
- docBuilder.parse( actualDeploymentDescriptor
) );
+ final Diff myDiff = new Diff( docBuilder.parse(
expectedDeploymentDescriptor ),
+ docBuilder.parse(
actualDeploymentDescriptor ) );
myDiff.overrideElementQualifier( new
RecursiveElementNameAndTextQualifier() );
XMLAssert.assertXMLEqual(
"Wrong deployment descriptor generated for[" +
expectedDeploymentDescriptor.getName() + "]",
Modified:
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java?rev=1360989&r1=1360988&r2=1360989&view=diff
==============================================================================
---
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
(original)
+++
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
Thu Jul 12 22:37:40 2012
@@ -519,7 +519,7 @@ public class EarMojoIT
final String content = IOUtil.toString( ReaderFactory.newReader(
actualReadme, "UTF-8" ) );
assertTrue( "application name and version should not have been
filtered",
content.indexOf( "my-app 99.0" ) == -1 );
- assertTrue( "orignial properties not found",
+ assertTrue( "original properties not found",
content.indexOf( "${application.name} ${project.version}"
) != -1 );
}
Modified:
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-029/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-029/pom.xml?rev=1360989&r1=1360988&r2=1360989&view=diff
==============================================================================
---
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-029/pom.xml
(original)
+++
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-029/pom.xml
Thu Jul 12 22:37:40 2012
@@ -38,7 +38,7 @@ under the License.
<artifactId>jdbc-stdext</artifactId>
<version>2.0</version>
<scope>system</scope>
- <systemPath>${basedir}/lib/rt.jar</systemPath>
+ <systemPath>\${basedir}/lib/rt.jar</systemPath>
</dependency>
</dependencies>
<build>
Modified:
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-043/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-043/pom.xml?rev=1360989&r1=1360988&r2=1360989&view=diff
==============================================================================
---
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-043/pom.xml
(original)
+++
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-043/pom.xml
Thu Jul 12 22:37:40 2012
@@ -41,9 +41,7 @@ under the License.
<artifactId>maven-ear-plugin</artifactId>
<version>@project.version@</version>
<configuration>
- <generatedDescriptorLocation>
- ${project.build.directory}/custom-descriptor-dir
- </generatedDescriptorLocation>
+
<generatedDescriptorLocation>\${project.build.directory}/custom-descriptor-dir</generatedDescriptorLocation>
</configuration>
</plugin>
</plugins>