You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2009/02/18 14:58:23 UTC

svn commit: r745515 - /incubator/sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java

Author: cziegeler
Date: Wed Feb 18 13:58:22 2009
New Revision: 745515

URL: http://svn.apache.org/viewvc?rev=745515&view=rev
Log:
SLING-861 : Rename mimeTypeForPut to just mimeType.

Modified:
    incubator/sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java

Modified: incubator/sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java?rev=745515&r1=745514&r2=745515&view=diff
==============================================================================
--- incubator/sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java (original)
+++ incubator/sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java Wed Feb 18 13:58:22 2009
@@ -88,7 +88,7 @@
      * If a simple HTTP PUT should be used instead of the standard POST to the
      * felix console. In the <code>uninstall</code> goal, a HTTP DELETE will be
      * used.
-     * 
+     *
      * @parameter expression="${sling.usePut}" default-value="false"
      * @required
      */
@@ -97,13 +97,13 @@
     /**
      * The content type / mime type used for the HTTP PUT (if
      * <code>sling.usePut=true</code>).
-     * 
-     * @parameter expression="${sling.mimeTypeForPut}"
+     *
+     * @parameter expression="${sling.mimeType}"
      *            default-value="application/java-archive"
      * @required
      */
-    protected String mimeTypeForPut;
-    
+    protected String mimeType;
+
     /**
      * The user name to authenticate at the running Sling instance.
      *
@@ -199,19 +199,19 @@
             getLog().info(bundleFile + " is not an OSGi Bundle, not uploading");
             return;
         }
-        
+
         String targetURL = getTargetURL();
 
         getLog().info(
             "Installing Bundle " + bundleName + "(" + bundleFile + ") to "
                 + targetURL + " via " + (usePut ? "PUT" : "POST"));
-        
+
         if (usePut) {
             put(targetURL, bundleFile);
         } else {
             post(targetURL, bundleFile);
         }
-        
+
         if ( mountByFS ) {
             configure(targetURL, bundleFile);
         }
@@ -293,10 +293,10 @@
     protected void put(String targetURL, File file) throws MojoExecutionException {
 
         PutMethod filePut = new PutMethod(getPutURL(targetURL, file.getName()));
-        
+
         try {
-            filePut.setRequestEntity(new FileRequestEntity(file, mimeTypeForPut));
-        
+            filePut.setRequestEntity(new FileRequestEntity(file, mimeType));
+
             int status = getHttpClient().executeMethod(filePut);
             if (status >= 200 && status < 300) {
                 getLog().info("Bundle installed");
@@ -312,7 +312,7 @@
             filePut.releaseConnection();
         }
     }
-        
+
     /**
      * Add configurations to a running OSGi instance for initial content.
      * @param targetURL The web console base url