You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jean-Claude <je...@ipi.ch> on 2009/04/14 14:09:34 UTC

ejb and bundle (OSGi)

Hi,

We have a maven module containing EJBs. Therefore the packaging must be ejb.
This allows us to create an ear file containing these EJBs as ejbModule (see 
http://maven.apache.org/plugins/maven-ear-plugin/ maven-ear-plugin ).

But these EJBs are also used by an Eclipse Client and we want to package
them as an OSGi bundle. Therefore the packaging must be bundle (see 
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
maven-bundle-plugin ).

How can I achieve to package the EJBs so that they can be used as EJBs and
OSGi bundles?

Thank you for your help
J.-Claude
-- 
View this message in context: http://www.nabble.com/%3Cpackaging%3Eejb%3C-packaging%3E-and-%3Cpackaging%3Ebundle%3C-packaging%3E-%28OSGi%29-tp23038273p23038273.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: ejb and bundle (OSGi)

Posted by Jean-Claude <je...@ipi.ch>.
Thank you for your help.
I just had to modify your solution to fit for an EJB:

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ejb-plugin</artifactId>
            <configuration>
              <ejbVersion>3.0</ejbVersion>
              <generateClient>true</generateClient>
              <archive>
               
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
              </archive>                
            </configuration>
          </plugin>
...
              <supportedProjectTypes>
                <supportedProjectType>ejb</supportedProjectType>
              </supportedProjectTypes>

and it worked!

 

Sahoo wrote:
> 
> You can explicitly call the goals of maven-bundle-plugin to do necessary 
> OSGi bundling if you don't want to change the packaging type. See 
> "Adding OSGi metadata to existing projects without changing the 
> packaging type" section at 
> http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
> 

-- 
View this message in context: http://www.nabble.com/%3Cpackaging%3Eejb%3C-packaging%3E-and-%3Cpackaging%3Ebundle%3C-packaging%3E-%28OSGi%29-tp23038273p23042255.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: ejb and bundle (OSGi)

Posted by Jean-Claude <je...@ipi.ch>.
When the package is set to
  <packaging>ejb</packaging>
two artifacts are generated
  . an EJB jar (e.g. core-bo-1.0.0-SNAPSHOT.jar)
  . a client jar (e.g. core-bo-1.0.0-SNAPSHOT-client.jar)
according to  http://maven.apache.org/plugins/maven-ejb-plugin/index.html
maven-ejb-plugin 

When I call
  mvn clean install -Posgi-bundle
both jar files, the EJB jar and the client jar, contain a manifest with
bundle information.

Is it possible to have the bundle information only be incorporated to the
client jar (e.g. core-bo-1.0.0-SNAPSHOT-client.jar) and not to the EJB jar
(e.g. core-bo-1.0.0-SNAPSHOT.jar) when I call
 mvn clean install -Posgi-bundle
?

Thank you for your answers.


Sahoo wrote:
> 
> You can explicitly call the goals of maven-bundle-plugin to do necessary 
> OSGi bundling if you don't want to change the packaging type. See 
> "Adding OSGi metadata to existing projects without changing the 
> packaging type" section at 
> http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
> 
> Thanks,
> Sahoo
> 

-- 
View this message in context: http://www.nabble.com/%3Cpackaging%3Eejb%3C-packaging%3E-and-%3Cpackaging%3Ebundle%3C-packaging%3E-%28OSGi%29-tp23038273p23133534.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: ejb and bundle (OSGi)

Posted by Sahoo <Sa...@Sun.COM>.
You can explicitly call the goals of maven-bundle-plugin to do necessary 
OSGi bundling if you don't want to change the packaging type. See 
"Adding OSGi metadata to existing projects without changing the 
packaging type" section at 
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

Thanks,
Sahoo
Jean-Claude wrote:
> Hi,
>
> We have a maven module containing EJBs. Therefore the packaging must be ejb.
> This allows us to create an ear file containing these EJBs as ejbModule (see 
> http://maven.apache.org/plugins/maven-ear-plugin/ maven-ear-plugin ).
>
> But these EJBs are also used by an Eclipse Client and we want to package
> them as an OSGi bundle. Therefore the packaging must be bundle (see 
> http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
> maven-bundle-plugin ).
>
> How can I achieve to package the EJBs so that they can be used as EJBs and
> OSGi bundles?
>
> Thank you for your help
> J.-Claudeo
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org