continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r161713 - in maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum: Continuum.java DefaultContinuum.java
Date Mon, 18 Apr 2005 02:59:55 GMT
Author: jvanzyl
Date: Sun Apr 17 19:59:54 2005
New Revision: 161713

URL: http://svn.apache.org/viewcvs?view=rev&rev=161713
Log:
o adding method which take an url in the form of a string
o check for null when adding shell project argumentsy

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java?view=diff&r1=161712&r2=161713
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
Sun Apr 17 19:59:54 2005
@@ -43,11 +43,20 @@
 {
     String ROLE = Continuum.class.getName();
 
+    //TODO: an URL converter in OGNL would be nice.
+
+    String addProjectFromUrl( String url, String builder )
+        throws ContinuumException;
+
     String addProjectFromUrl( URL url, String builder )
         throws ContinuumException;
 
-    String addProjectFromScm( String scmUrl, String builderType, String projectName, String
nagEmailAddress,
-                              String version, Properties configuration )
+    String addProjectFromScm( String scmUrl,
+                              String builderType,
+                              String projectName,
+                              String nagEmailAddress,
+                              String version,
+                              Properties configuration )
         throws ContinuumException;
 
     void removeProject( String projectId )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?view=diff&r1=161712&r2=161713
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Sun Apr 17 19:59:54 2005
@@ -21,6 +21,7 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.net.URL;
+import java.net.MalformedURLException;
 import java.util.Iterator;
 import java.util.Properties;
 
@@ -135,6 +136,23 @@
     // -> check out from scm
     // -> update the project metadata
 
+    public String addProjectFromUrl( String url, String builderType )
+        throws ContinuumException
+    {
+        URL u;
+
+        try
+        {
+            u = new URL( url );
+        }
+        catch ( MalformedURLException e )
+        {
+            throw new ContinuumException( "Invalid URL", e );
+        }
+
+        return addProjectFromUrl( u, builderType );
+    }
+
     public String addProjectFromUrl( URL url, String builderType )
         throws ContinuumException
     {
@@ -489,7 +507,10 @@
 
         configuration.setProperty( ShellBuilder.CONFIGURATION_EXECUTABLE, project.getExecutable()
);
 
-        configuration.setProperty( ShellBuilder.CONFIGURATION_ARGUMENTS, project.getArguments()
);
+        if ( project.getArguments() != null )
+        {
+            configuration.setProperty( ShellBuilder.CONFIGURATION_ARGUMENTS, project.getArguments()
);
+        }
 
         addProjectFromScm( project.getScmUrl(),
                            "maven2",



Mime
View raw message