tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1240234 - in /tomcat/maven-plugin/trunk: tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
Date Fri, 03 Feb 2012 16:27:42 GMT
Author: olamy
Date: Fri Feb  3 16:27:41 2012
New Revision: 1240234

URL: http://svn.apache.org/viewvc?rev=1240234&view=rev
Log:
[MTOMCAT-118] tomcat7:run wont accept additionalClasspathDir arguments
before 3.0.3 maven doesn't support mojo fields Collections other than String

Modified:
    tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java
    tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java

Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java?rev=1240234&r1=1240233&r2=1240234&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java
(original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java
Fri Feb  3 16:27:41 2012
@@ -122,9 +122,9 @@ public class RunMojo
      * Additional optional directories to add to the embedded tomcat classpath.
      *
      * @parameter alias = "additionalClassesDirs"
-     * @since 2.0
+     * @since 2.0-beta-1
      */
-    private List<File> additionalClasspathDirs;
+    private List<String> additionalClasspathDirs;
 
     private File temporaryContextFile = null;
 
@@ -202,11 +202,14 @@ public class RunMojo
             }
             if ( additionalClasspathDirs != null && !additionalClasspathDirs.isEmpty()
)
             {
-                for ( File additionalClasspathDir : additionalClasspathDirs )
+                for ( String additionalClasspathDir : additionalClasspathDirs )
                 {
-                    if ( additionalClasspathDir.exists() )
+                    File file = new File( additionalClasspathDir );
+                    if ( file.exists() )
                     {
-                        loader.addRepository( additionalClasspathDir.toURI().toString() );
+                        String fileUri = file.toURI().toString();
+                        getLog().debug( "add file:" + fileUri + " as a additionalClasspathDir"
);
+                        loader.addRepository( fileUri );
                     }
                 }
             }

Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java?rev=1240234&r1=1240233&r2=1240234&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
(original)
+++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
Fri Feb  3 16:27:41 2012
@@ -120,7 +120,7 @@ public class RunMojo
      * @parameter alias = "additionalClassesDirs"
      * @since 2.0
      */
-    private List<File> additionalClasspathDirs;
+    private List<String> additionalClasspathDirs;
 
     private File temporaryContextFile = null;
 
@@ -263,11 +263,14 @@ public class RunMojo
 
             if ( additionalClasspathDirs != null && !additionalClasspathDirs.isEmpty()
)
             {
-                for ( File additionalClasspathDir : additionalClasspathDirs )
+                for ( String additionalClasspathDir : additionalClasspathDirs )
                 {
-                    if ( additionalClasspathDir.exists() )
+                    File file = new File( additionalClasspathDir );
+                    if ( file.exists() )
                     {
-                        loader.addRepository( additionalClasspathDir.toURI().toString() );
+                        String fileUri = file.toURI().toString();
+                        getLog().debug( "add file:" + fileUri + " as a additionalClasspathDir"
);
+                        loader.addRepository( fileUri );
                     }
                 }
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message