And to follow up on this for anyone else that has a similar scenario, I just 
used the bndwrap ant task in the maven-antrun-plugin to bnd the 2 jar files.

                        <plugin>
                                <artifactId>maven-antrun-plugin</artifactId>
                                <version>1.1</version>
                                <executions>
                                        <execution>
                                                <id>bundle-client</id>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>run</goal>
                                                </goals>
                                                <configuration>
                                                        <tasks>
                                                                <taskdef 
resource="aQute/bnd/ant/taskdef.properties" 
classpath="../lib/build/bnd-0.0.249.jar" />
                                                                <taskdef 
resource="net/sf/antcontrib/antlib.xml" 
classpath="../lib/build/ant-contrib-1.0b3.jar" />
                                                                <bndwrap 
definitions="../osgi/bnd" output="target" failok="false">
                                                                        
<fileset dir="target" includes="${pom.artifactId}-${pom.version}-*.jar" />
                                                                </bndwrap>
                                                                <move 
todir="target">
                                                                        
<fileset dir="target" includes="${pom.artifactId}-${pom.version}-*" />
                                                                        <mapper 
type="glob" from="*.jar$" to="*.jar" />
                                                                </move>         
                                                                                
                                                        </tasks>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>

Brendan Haverlock

-----Original Message-----
From: Allen Lau [mailto:[email protected]] 
Sent: Friday, May 15, 2009 1:05 PM
To: [email protected]
Subject: Re: Maven bundle plugin - building multiple bundles in one project

Hi,

Not sure if this will help, but if you want to run the bundle-plugin twice,
I think you can accomplish this by
specifying multiple <execution> with separate <configuration> options.

For example:
<artifactId>maven-bundle-plugin</artifactId>
<executions>
              <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                        <configuration>... </configuration>
               </execution>
               <execution>
                         <id> other-job</id>
                         <configuration>...</configuration>
              </execution>
 </executions>

Allen

On Fri, May 15, 2009 at 12:39 PM, Brendan Haverlock
<[email protected]>wrote:

> Hi all,
>
>
>
> I have a bunch of maven modules, each of which has its own logical client,
> server, and common packages (shared between the client and server).  I want
> to make both a client and a server bundle within this project, yet I don't
> get how we can separate the two in the maven bundle plugin.  I tried
> including the classes of just the client and common in an
> <Include-Resource>
> tag, but that didn't have an effect because it still included all the class
> files from the project.
>
>
>
> I also am in a pickle because I would need to run two of the bundle
> plugins,
> which I don't think is supported under the <build>  tag.
>
>
>
> Does anyone have any insight on either of these issues?  Any help would be
> appreciated. Also, I don't want to split up each project into 3 individual
> projects because then I'd have 50+ projects with a huge web of
> dependencies.
>
>
>
> Thanks!
>
>
>
> Brendan Haverlock
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to