You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2009/02/18 13:41:01 UTC

[jira] Created: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Add HTTP PUT support for maven-sling-plugin
-------------------------------------------

                 Key: SLING-861
                 URL: https://issues.apache.org/jira/browse/SLING-861
             Project: Sling
          Issue Type: New Feature
          Components: Maven Plugins
            Reporter: Alexander Klimetschek
            Priority: Minor
             Fix For: Maven Sling Plugin 2.0.4


In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.

Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.

To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.

There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").

Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:

           <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>maven-sling-plugin</artifactId>
                <version>2.0.3-incubator-SNAPSHOT</version>
                <configuration>
                    <slingUrl>http://localhost:8080</slingUrl>
                    <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
                    <usePut>true</usePut>
                </configuration>
            </plugin>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674621#action_12674621 ] 

Carsten Ziegeler commented on SLING-861:
----------------------------------------

I agree and renamed it in revision: 745515

> Add HTTP PUT support for maven-sling-plugin
> -------------------------------------------
>
>                 Key: SLING-861
>                 URL: https://issues.apache.org/jira/browse/SLING-861
>             Project: Sling
>          Issue Type: New Feature
>          Components: Maven Plugins
>    Affects Versions: Maven Sling Plugin 2.0.2
>            Reporter: Alexander Klimetschek
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: Maven Sling Plugin 2.0.4
>
>         Attachments: sling-install-PUT-support.patch
>
>
> In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.
> Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.
> To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.
> There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").
> Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:
>            <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.0.3-incubator-SNAPSHOT</version>
>                 <configuration>
>                     <slingUrl>http://localhost:8080</slingUrl>
>                     <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
>                     <usePut>true</usePut>
>                 </configuration>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674620#action_12674620 ] 

Felix Meschberger commented on SLING-861:
-----------------------------------------

Thanks for the patch, I think this is a valuable addition. I have just a single remarK. How about naming the MIME Type parameter simply as 

   sling.mimeType

It is already documented to be only used for usePut=true, so this is looks cleaner and more straight-forward without sacrificing any thing.

WDYT ?

> Add HTTP PUT support for maven-sling-plugin
> -------------------------------------------
>
>                 Key: SLING-861
>                 URL: https://issues.apache.org/jira/browse/SLING-861
>             Project: Sling
>          Issue Type: New Feature
>          Components: Maven Plugins
>    Affects Versions: Maven Sling Plugin 2.0.2
>            Reporter: Alexander Klimetschek
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: Maven Sling Plugin 2.0.4
>
>         Attachments: sling-install-PUT-support.patch
>
>
> In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.
> Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.
> To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.
> There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").
> Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:
>            <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.0.3-incubator-SNAPSHOT</version>
>                 <configuration>
>                     <slingUrl>http://localhost:8080</slingUrl>
>                     <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
>                     <usePut>true</usePut>
>                 </configuration>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-861.
------------------------------------

    Resolution: Fixed

Thanks for your patch - I've applied it in revision:745510.
Please cross check and then close this bugs.

Thanks!

> Add HTTP PUT support for maven-sling-plugin
> -------------------------------------------
>
>                 Key: SLING-861
>                 URL: https://issues.apache.org/jira/browse/SLING-861
>             Project: Sling
>          Issue Type: New Feature
>          Components: Maven Plugins
>            Reporter: Alexander Klimetschek
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: Maven Sling Plugin 2.0.4
>
>         Attachments: sling-install-PUT-support.patch
>
>
> In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.
> Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.
> To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.
> There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").
> Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:
>            <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.0.3-incubator-SNAPSHOT</version>
>                 <configuration>
>                     <slingUrl>http://localhost:8080</slingUrl>
>                     <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
>                     <usePut>true</usePut>
>                 </configuration>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reassigned SLING-861:
--------------------------------------

    Assignee: Carsten Ziegeler

> Add HTTP PUT support for maven-sling-plugin
> -------------------------------------------
>
>                 Key: SLING-861
>                 URL: https://issues.apache.org/jira/browse/SLING-861
>             Project: Sling
>          Issue Type: New Feature
>          Components: Maven Plugins
>            Reporter: Alexander Klimetschek
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: Maven Sling Plugin 2.0.4
>
>         Attachments: sling-install-PUT-support.patch
>
>
> In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.
> Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.
> To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.
> There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").
> Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:
>            <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.0.3-incubator-SNAPSHOT</version>
>                 <configuration>
>                     <slingUrl>http://localhost:8080</slingUrl>
>                     <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
>                     <usePut>true</usePut>
>                 </configuration>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-861.
----------------------------------


> Add HTTP PUT support for maven-sling-plugin
> -------------------------------------------
>
>                 Key: SLING-861
>                 URL: https://issues.apache.org/jira/browse/SLING-861
>             Project: Sling
>          Issue Type: New Feature
>          Components: Maven Plugins
>    Affects Versions: Maven Sling Plugin 2.0.2
>            Reporter: Alexander Klimetschek
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: Maven Sling Plugin 2.0.4
>
>         Attachments: sling-install-PUT-support.patch
>
>
> In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.
> Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.
> To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.
> There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").
> Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:
>            <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.0.3-incubator-SNAPSHOT</version>
>                 <configuration>
>                     <slingUrl>http://localhost:8080</slingUrl>
>                     <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
>                     <usePut>true</usePut>
>                 </configuration>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-861:
-----------------------------------

    Affects Version/s: Maven Sling Plugin 2.0.2

> Add HTTP PUT support for maven-sling-plugin
> -------------------------------------------
>
>                 Key: SLING-861
>                 URL: https://issues.apache.org/jira/browse/SLING-861
>             Project: Sling
>          Issue Type: New Feature
>          Components: Maven Plugins
>    Affects Versions: Maven Sling Plugin 2.0.2
>            Reporter: Alexander Klimetschek
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: Maven Sling Plugin 2.0.4
>
>         Attachments: sling-install-PUT-support.patch
>
>
> In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.
> Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.
> To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.
> There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").
> Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:
>            <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.0.3-incubator-SNAPSHOT</version>
>                 <configuration>
>                     <slingUrl>http://localhost:8080</slingUrl>
>                     <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
>                     <usePut>true</usePut>
>                 </configuration>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-861) Add HTTP PUT support for maven-sling-plugin

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated SLING-861:
----------------------------------------

    Attachment: sling-install-PUT-support.patch

Here is the patch against rev 745474 to be applied in maven/maven-sling-plugin.

Let me know what you think!

> Add HTTP PUT support for maven-sling-plugin
> -------------------------------------------
>
>                 Key: SLING-861
>                 URL: https://issues.apache.org/jira/browse/SLING-861
>             Project: Sling
>          Issue Type: New Feature
>          Components: Maven Plugins
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>             Fix For: Maven Sling Plugin 2.0.4
>
>         Attachments: sling-install-PUT-support.patch
>
>
> In addition to the standard POST that is tailored for the felix webconsole in the maven-sling-plugin install goal, it can also be useful to support simple PUT uploads of the bundle jar. This is useful in combination with the jcrinstall extension, where you could PUT the jar file via Jackrabbit's or Sling's WebDAV into a folder that is watched by jcrinstall.
> Therefore I implemented this feature, using PUT for the install goal and DELETE for the uninstall goal. There is a new config option "sling.usePut" that must be set to "true" for using PUT or DELETE - by default it is false, so that the POST behaviour stays default.
> To make the configuration of the plugin in a multi-module POM structure simpler, I also added a new config "sling.urlSuffix" that (if present) will be appended to the "sling.url" (in all cases, POST, PUT and DELETE). That allows you to specify a base path in your parent POM (sling.url=http://localhost:8080) and define a different path for each project (sling.urlSuffix=/libs/myproject/install), because with jcrinstall you can place them at different locations in the repository, if you wish.
> There is also a "sling.mimeTypeForPut" option to set the content-type for the PUT request (by default it is "application/java-archive").
> Just for reference, since the config names are different if you specify them in the pom (using the java field name in the Mojo rather than the defined expression....), here is a sample configuration:
>            <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.0.3-incubator-SNAPSHOT</version>
>                 <configuration>
>                     <slingUrl>http://localhost:8080</slingUrl>
>                     <slingUrlSuffix>/libs/myproject/install/</slingUrlSuffix>
>                     <usePut>true</usePut>
>                 </configuration>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.