maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1396670 - in /maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker: AbstractPatchMojo.java tracking/jenkins/JenkinsPatchTracker.java
Date Wed, 10 Oct 2012 16:20:16 GMT
Author: olamy
Date: Wed Oct 10 16:20:16 2012
New Revision: 1396670

URL: http://svn.apache.org/viewvc?rev=1396670&view=rev
Log:
use better naming for field. Start some code for posting summary and description of the patch:
to finish/debug

Modified:
    maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java
    maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/tracking/jenkins/JenkinsPatchTracker.java

Modified: maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java?rev=1396670&r1=1396669&r2=1396670&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java
(original)
+++ maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/AbstractPatchMojo.java
Wed Oct 10 16:20:16 2012
@@ -94,8 +94,8 @@ public abstract class AbstractPatchMojo
     @Parameter ( property = "patch.password" )
     protected String password;
 
-    @Parameter ( property = "patch.issueSystem" )
-    protected String issueSystem;
+    @Parameter ( property = "patch.patchTrackerSystem" )
+    protected String patchTrackerSystem;
 
     @Parameter ( property = "patch.patchSystem", defaultValue = "${project.patchManagement.system}"
)
     protected String patchSystem;
@@ -307,10 +307,10 @@ public abstract class AbstractPatchMojo
     {
         String value = project.getIssueManagement() == null ? "" : project.getIssueManagement().getSystem();
 
-        // cli must win !
-        if ( StringUtils.isNotEmpty( issueSystem ) )
+        // configuration/cli must win !
+        if ( StringUtils.isNotEmpty( patchTrackerSystem ) )
         {
-            return issueSystem;
+            return patchTrackerSystem;
         }
 
         try

Modified: maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/tracking/jenkins/JenkinsPatchTracker.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/tracking/jenkins/JenkinsPatchTracker.java?rev=1396670&r1=1396669&r2=1396670&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/tracking/jenkins/JenkinsPatchTracker.java
(original)
+++ maven/sandbox/trunk/plugins/maven-patch-tracker-plugin/src/main/java/org/apache/maven/plugins/patchtracker/tracking/jenkins/JenkinsPatchTracker.java
Wed Oct 10 16:20:16 2012
@@ -30,6 +30,7 @@ import org.apache.http.client.protocol.C
 import org.apache.http.entity.mime.HttpMultipartMode;
 import org.apache.http.entity.mime.MultipartEntity;
 import org.apache.http.entity.mime.content.FileBody;
+import org.apache.http.entity.mime.content.StringBody;
 import org.apache.http.impl.auth.BasicScheme;
 import org.apache.http.impl.client.BasicAuthCache;
 import org.apache.http.impl.client.DefaultHttpClient;
@@ -70,6 +71,23 @@ public class JenkinsPatchTracker
             FileBody fileBody = new FileBody( tmpPathFile );
             entity.addPart( "patch.diff", fileBody );
 
+            // jenkins need this format ?
+            //Content-Disposition: form-data; name="name" patch.summary
+            //Content-Disposition: form-data; name="value" sum
+
+            // charset ?
+            /*  post additionnal parameters with summary and description.
+                fail currently !
+            entity.addPart( "patch.summary", new StringBody( patchTrackerRequest.getSummary()
) );
+            entity.addPart( "patch.description", new StringBody( patchTrackerRequest.getDescription()
) );
+
+
+            entity.addPart( "name", new StringBody( "patch.summary" ) );
+            entity.addPart( "value", new StringBody( patchTrackerRequest.getSummary() ) );
+
+            entity.addPart( "name", new StringBody( "patch.description" ) );
+            entity.addPart( "value", new StringBody( patchTrackerRequest.getDescription()
) );
+            */
             post.setEntity( entity );
 
             BasicHttpContext context = null;



Mime
View raw message