Author: pgier
Date: Fri Jul 2 03:45:20 2010
New Revision: 959842
URL: http://svn.apache.org/viewvc?rev=959842&view=rev
Log:
[MANTRUN-143] Add localRepository and settings.localRepository properties to
fix regression.
Added:
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/invoker.properties
(with props)
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
(with props)
Modified:
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
Added:
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/invoker.properties
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/invoker.properties?rev=959842&view=auto
==============================================================================
---
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/invoker.properties
(added)
+++
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/invoker.properties
Fri Jul 2 03:45:20 2010
@@ -0,0 +1 @@
+invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:run
Propchange:
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/invoker.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/invoker.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml?rev=959842&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
(added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
Fri Jul 2 03:45:20 2010
@@ -0,0 +1,70 @@
+<?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>antrun-plugin.test</groupId>
+ <artifactId>antrun-plugin-test</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2006</inceptionYear>
+ <name>Maven Antrun Plugin Test</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <tasks>
+ <echo message="${localRepository}"/>
+ <fail message="Local repository property not set 1">
+ <condition>
+ <not>
+ <contains string="${localRepository}"
substring="Repository[local" casesensitive="no"/>
+ </not>
+ </condition>
+ </fail>
+ <echo message="${settings.localRepository}"/>
+ <fail message="Local repository property not set 2">
+ <condition>
+ <not>
+ <isset property="settings.localRepository"/>
+ </not>
+ </condition>
+ </fail>
+ </tasks>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange:
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified:
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java?rev=959842&r1=959841&r2=959842&view=diff
==============================================================================
---
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
(original)
+++
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
Fri Jul 2 03:45:20 2010
@@ -358,6 +358,8 @@ public class AntRunMojo
mavenProject.getBuild().getSourceDirectory() );
antProject.setProperty( ( propertyPrefix +
"project.build.testSourceDirectory" ),
mavenProject.getBuild().getTestSourceDirectory() );
+ antProject.setProperty( ( propertyPrefix + "localRepository" ),
localRepository.toString() );
+ antProject.setProperty( ( propertyPrefix + "settings.localRepository"
), localRepository.getBasedir() );
// Add properties for depenedency artifacts
Set depArtifacts = mavenProject.getArtifacts();