You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Garrett Headley <gc...@yahoo.com> on 2007/09/20 23:47:12 UTC

3rd party libraries and maven

I'm trying to use jgoodies with a service based bundle with the following package imports

import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.RowSpec;


What I'm interested in, is how to modify the maven file (from the example) so I can run the install command from Maven.  Basically what I did, was add an extra class to one of the extenderbased.x bundles that implemented some of the jgoodies classes (JFormDesigner).  I'm really quite new to maven, and not sure how to modify the pom.xml file to allow me to run the install.  

The error messages I get are along the line of:

package com.jgoodies.forms.factories does not exist
package com.jgoodies.forms.layout does not exist

Any help will be appriciated!
Thanks
Garrett

       
---------------------------------
 Check out  the hottest 2008 models today at Yahoo! Autos.

Re: 3rd party libraries and maven

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Assuming that someone has put the jgoodies stuff into a maven repo 
somewhere, you need to add jgoodies as a dependency in the pom file of 
the bundle you are modifying (you will need to know the groupId and 
artifactId of jgoodies)...you can see the pom file for examples of the 
existing dependencies. If you can do this, then your bundle will 
automatically be generated with the correct metadata for importing the 
packages.

However, this might not be exactly what you want, since it will require 
that you install a bundle that exports the jgoodies packages. You have 
three options at this point:

   1. Creating a bundle to wrap jgoodies...this is pretty easy to do
      with bundle plugin.
   2. Modify your bundle's pom file to include the necessary jgoodies
      packages using
      <Private-Package>com.jgoodies.forms.*</Private-Package> or
      something similar.
   3. Modify your bundle's pom file to embed the jgoodies JAR file into
      your bundle using <Embed-Dependency>.

So, first try to browse the maven repo to see if jgoodies is in there. 
Then choose one of the options above. Check out the following web page 
to see how to create your resulting bundle with the bundleplugin:

    http://cwiki.apache.org/FELIX/maven-bundle-plugin-bnd.html

Let us know if you need more help and feel free to post your modified 
pom file in the future. :-)

-> richard


Garrett Headley wrote:
> I'm trying to use jgoodies with a service based bundle with the following package imports
>
> import com.jgoodies.forms.factories.FormFactory;
> import com.jgoodies.forms.layout.CellConstraints;
> import com.jgoodies.forms.layout.ColumnSpec;
> import com.jgoodies.forms.layout.FormLayout;
> import com.jgoodies.forms.layout.RowSpec;
>
>
> What I'm interested in, is how to modify the maven file (from the example) so I can run the install command from Maven.  Basically what I did, was add an extra class to one of the extenderbased.x bundles that implemented some of the jgoodies classes (JFormDesigner).  I'm really quite new to maven, and not sure how to modify the pom.xml file to allow me to run the install.  
>
> The error messages I get are along the line of:
>
> package com.jgoodies.forms.factories does not exist
> package com.jgoodies.forms.layout does not exist
>
> Any help will be appriciated!
> Thanks
> Garrett
>
>        
> ---------------------------------
>  Check out  the hottest 2008 models today at Yahoo! Autos.
>   

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