You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2008/01/17 09:45:54 UTC

autoDeployBundle profile in our parent POM?

Hi,

The patch shown below allows one to auto-install Sling bundles when
building them, using "-P autoDeployBundle" on the mvn command line.

WDYT, should we do this? I find it useful for development, but maybe
you guys are doing this differently?

-Bertrand

Index: parent/pom.xml
===================================================================
--- parent/pom.xml      (revision 612756)
+++ parent/pom.xml      (working copy)
@@ -206,6 +206,35 @@
         </pluginManagement>
     </build>

+    <profiles>
+      <profile>
+        <!--
+          Use this profile to deploy the bundle automatically,
+          during development
+        -->
+        <id>autoDeployBundle</id>
+        <activation>
+          <activeByDefault>false</activeByDefault>
+        </activation>
+        <build>
+          <plugins>
+            <plugin>
+              <groupId>org.apache.sling</groupId>
+              <artifactId>maven-sling-plugin</artifactId>
+              <executions>
+                <execution>
+                  <id>install-bundle</id>
+                  <goals>
+                    <goal>install</goal>
+                  </goals>
+                </execution>
+              </executions>
+            </plugin>
+          </plugins>
+        </build>
+      </profile>
+    </profiles>
+
     <mailingLists>
         <mailingList>
             <name>Sling Development List</name>

Re: autoDeployBundle profile in our parent POM?

Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> On Jan 17, 2008 10:16 AM, Carsten Ziegeler <cz...@apache.org> wrote:
> 
>> ... assume its working for you. What maven version are
>> you using?...
> 
> It does work for me with mvn 2.0.7. Maybe Maven checks if your name is
> "Bertrand" ;-)
> 
Ah, I always suspected this (ok, a simple sudo should do I guess...) :)

I'll retry once you committed it :) Perhaps it wasn't maven's fault this 
time but "someone" too stupid to type the right xml...

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: autoDeployBundle profile in our parent POM?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Jan 17, 2008 10:16 AM, Carsten Ziegeler <cz...@apache.org> wrote:

> ... assume its working for you. What maven version are
> you using?...

It does work for me with mvn 2.0.7. Maybe Maven checks if your name is
"Bertrand" ;-)

-Bertrand

Re: autoDeployBundle profile in our parent POM?

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,

I tried the same last week and it did not work on my machine (for 
whatever reason). I assume its working for you. What maven version are 
you using?

Apart from that +1

Carsten

Bertrand Delacretaz wrote:
> Hi,
> 
> The patch shown below allows one to auto-install Sling bundles when
> building them, using "-P autoDeployBundle" on the mvn command line.
> 
> WDYT, should we do this? I find it useful for development, but maybe
> you guys are doing this differently?
> 
> -Bertrand
> 
> Index: parent/pom.xml
> ===================================================================
> --- parent/pom.xml      (revision 612756)
> +++ parent/pom.xml      (working copy)
> @@ -206,6 +206,35 @@
>          </pluginManagement>
>      </build>
> 
> +    <profiles>
> +      <profile>
> +        <!--
> +          Use this profile to deploy the bundle automatically,
> +          during development
> +        -->
> +        <id>autoDeployBundle</id>
> +        <activation>
> +          <activeByDefault>false</activeByDefault>
> +        </activation>
> +        <build>
> +          <plugins>
> +            <plugin>
> +              <groupId>org.apache.sling</groupId>
> +              <artifactId>maven-sling-plugin</artifactId>
> +              <executions>
> +                <execution>
> +                  <id>install-bundle</id>
> +                  <goals>
> +                    <goal>install</goal>
> +                  </goals>
> +                </execution>
> +              </executions>
> +            </plugin>
> +          </plugins>
> +        </build>
> +      </profile>
> +    </profiles>
> +
>      <mailingLists>
>          <mailingList>
>              <name>Sling Development List</name>
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

Re: autoDeployBundle profile in our parent POM?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Jan 17, 2008 11:26 AM, Felix Meschberger <fm...@gmail.com> wrote:

> ...Can we name it "autoInstallBundle" to not mixup the meaning of "deploy"...

Ok, I have added this "autoInstallBundle" profile to parent/pom.xml.

-Bertrand

Re: autoDeployBundle profile in our parent POM?

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Bertrand,

Sounds usefull.

Can we name it "autoInstallBundle" to not mixup the meaning of "deploy"
with what maven thinks id deployment. In addition, the sling plugin
supports a "deploy" goal, which deploys the bundle(s) to an OBR.

Apart from that, I think, this is certainly a valid addition. I usually
just rely on my command line history or hack the 30-some characters in.

Regards
Felix

Am Donnerstag, den 17.01.2008, 09:45 +0100 schrieb Bertrand Delacretaz:
> Hi,
> 
> The patch shown below allows one to auto-install Sling bundles when
> building them, using "-P autoDeployBundle" on the mvn command line.
> 
> WDYT, should we do this? I find it useful for development, but maybe
> you guys are doing this differently?
> 
> -Bertrand
> 
> Index: parent/pom.xml
> ===================================================================
> --- parent/pom.xml      (revision 612756)
> +++ parent/pom.xml      (working copy)
> @@ -206,6 +206,35 @@
>          </pluginManagement>
>      </build>
> 
> +    <profiles>
> +      <profile>
> +        <!--
> +          Use this profile to deploy the bundle automatically,
> +          during development
> +        -->
> +        <id>autoDeployBundle</id>
> +        <activation>
> +          <activeByDefault>false</activeByDefault>
> +        </activation>
> +        <build>
> +          <plugins>
> +            <plugin>
> +              <groupId>org.apache.sling</groupId>
> +              <artifactId>maven-sling-plugin</artifactId>
> +              <executions>
> +                <execution>
> +                  <id>install-bundle</id>
> +                  <goals>
> +                    <goal>install</goal>
> +                  </goals>
> +                </execution>
> +              </executions>
> +            </plugin>
> +          </plugins>
> +        </build>
> +      </profile>
> +    </profiles>
> +
>      <mailingLists>
>          <mailingList>
>              <name>Sling Development List</name>