You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:36:29 UTC

[maven-invoker-plugin] 22/22: [maven-release-plugin] copy for tag maven-invoker-plugin-1.1

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-invoker-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git

commit 0a96498c413f2c422653cd88adc50eafed8a4a85
Author: Oliver Lamy <ol...@apache.org>
AuthorDate: Mon Dec 17 09:02:55 2007 +0000

    [maven-release-plugin]  copy for tag maven-invoker-plugin-1.1
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/tags/maven-invoker-plugin-1.1@604797 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 39 +++++++---------------
 .../apache/maven/plugin/invoker/InvokerMojo.java   |  9 +++--
 .../maven/plugin/invoker/InterpolationTest.java    | 12 +++++++
 3 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2689c5c..cf1f779 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,22 +1,3 @@
-<?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>
@@ -25,17 +6,17 @@ under the License.
     <version>10</version>
   </parent>
   <artifactId>maven-invoker-plugin</artifactId>
-  <version>1.1-SNAPSHOT</version>
-  <prerequisites>                                                                                                                                                      
-    <maven>2.0</maven>                                                                                                                                                 
+  <version>1.1</version>
+  <prerequisites>
+    <maven>2.0.6</maven>
   </prerequisites>   
   <packaging>maven-plugin</packaging>
   <name>Maven Invoker Plugin</name>
 		
   <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-invoker-plugin/</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-invoker-plugin/</developerConnection>
-    <url>http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-invoker-plugin-1.1</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-invoker-plugin-1.1</developerConnection>
+    <url>http://svn.apache.org/viewvc/maven/plugins/tags/maven-invoker-plugin-1.1</url>
   </scm>	
   <issueManagement>
     <system>jira</system>
@@ -47,13 +28,17 @@ under the License.
         <artifactId>maven-surefire-plugin</artifactId>
         <version>2.3</version>
       </plugin>
+      <plugin>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.0.4</version>
+      </plugin>      
     </plugins>
   </build>	
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-invoker</artifactId>
-      <version>2.0.7-SNAPSHOT</version>
+      <version>2.0.7</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -97,4 +82,4 @@ under the License.
       <scope>test</scope>
     </dependency>	
   </dependencies>
-</project>
+</project>
\ No newline at end of file
diff --git a/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java b/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
index 7646b9a..cb97e0f 100644
--- a/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
@@ -909,7 +909,7 @@ public class InvokerMojo
 
         try
         {
-            Map composite = new CompositeMap(this.project, this.interpolationsProperties);
+            Map composite = new CompositeMap( this.project, this.interpolationsProperties );
             reader = new BufferedReader( new InterpolationFilterReader( new FileReader( projectGoalList ), composite ) );
             /// new BufferedReader( new FileReader( projectGoalList ) );
 
@@ -925,7 +925,7 @@ public class InvokerMojo
         {
             getLog().warn(
                            "Failed to load goal list from file: " + projectGoalList
-                                           + ". Using 'goal' parameter configured on this plugin instead." );
+                               + ". Using 'goal' parameter configured on this plugin instead." );
             getLog().debug( "Error reading goals file: " + projectGoalList, e );
         }
         finally
@@ -966,6 +966,10 @@ public class InvokerMojo
         throws MojoExecutionException
     {
         File interpolatedPomFile = new File( targetDirectory, "interpolated-pom.xml" );
+        if (interpolatedPomFile.exists())
+        {
+            interpolatedPomFile.delete();
+        }
         interpolatedPomFile.deleteOnExit();
         Map composite = new CompositeMap( this.project, this.interpolationsProperties );
 
@@ -997,6 +1001,7 @@ public class InvokerMojo
                 fileWriter.write( line );
             }
             fileWriter.flush();
+            fileWriter.close();
         }
         catch ( IOException e )
         {
diff --git a/src/test/java/org/apache/maven/plugin/invoker/InterpolationTest.java b/src/test/java/org/apache/maven/plugin/invoker/InterpolationTest.java
index 9f9525d..03b464d 100755
--- a/src/test/java/org/apache/maven/plugin/invoker/InterpolationTest.java
+++ b/src/test/java/org/apache/maven/plugin/invoker/InterpolationTest.java
@@ -104,6 +104,18 @@ public class InterpolationTest
             fileReader = new FileReader( interpolatedPomFile );
             String content = IOUtil.toString( fileReader );
             assertTrue( content.indexOf( "<interpolateValue>bar</interpolateValue>" ) > 0 );
+            fileReader.close();
+            // recreate it to test delete if exists before creation
+            interpolatedPomFile = invokerMojo.buildInterpolatedPomFile( new File( dirPath, "pom.xml" ),
+                                                                        new File( getBasedir() + File.separatorChar
+                                                                            + "target" ) );
+            fileReader = new FileReader( interpolatedPomFile );
+            content = IOUtil.toString( fileReader );
+            assertTrue( content.indexOf( "<interpolateValue>bar</interpolateValue>" ) > 0 );
+            fileReader.close();
+        } catch (Exception e)
+        {
+            throw e;
         }
         finally
         {

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.