users@glassfish.java.net

Re: IDE Hot-deploy for OSGI hybrid Bundles

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Tue, 11 Oct 2011 10:07:26 +0530

Add the following snippet in the pom.xml:

<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>deploy-bundle</id>
<phase>package</phase>
<configuration>
<target name="deploy">
<exec executable="command.exe" failOnError="true" osfamily="Windows">
<arg value="/c"/>
<arg value="deploy"/>
<arg value="--type=osgi"/>
<arg value="--force=true"/>
<arg value="${project.build.directory}/${artifactId}.jar"/>
</exec>
<exec executable="asadmin" failOnError="true" osfamily="Unix">
<arg value="deploy"/>
<arg value="--type=osgi"/>
<arg value="--force=true"/>
<arg value="${project.build.directory}/${artifactId}.jar"/>
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

This should work as long as glassfish/bin is in PATH. It may need some
adjustment in Windows, as I have not tried it on that platform.

To avoid duplication, you can configure this in parent pom's
pluginManagement section and then reference the plugin in each pom.xml's
build section as well.

Thanks,
Sahoo

On Monday 10 October 2011 05:56 PM, forums_at_java.net wrote:
> HI,
>
> thank you for help,
>
> I'm building my apps using the pom.xml off your hand's on lab s313522,
> I get
> it
> here: http://blogs.oracle.com/arungupta/entry/screencast_32_osgi_enabled_java
>
> [1]
> it's uses the maven-bundle-plugin to create the manifest.mf
> configurations
> and install the bundles in my local maven repository
>
> i know that forum is not about maven, but if someone could help with
> these
> build config, i'll really apreciate.
>
> Best regards.
>
>
>
>
> [1]
> http://blogs.oracle.com/arungupta/entry/screencast_32_osgi_enabled_java
>
> --
>
> [Message sent by forum member 'omeuefilipe']
>
> View Post: http://forums.java.net/node/851666
>
>