You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Stefano Lenzi <ki...@interfree.it> on 2006/03/29 00:01:36 UTC

Creating UPnP Base Driver Was: [ANN] OSGi archetype for Maven2

Hi Timothy,
	I'm a newbie of Maven and I trying to understand how it works.
I've figured out that I should use your osgi-archetype for creating the
UPnP Base Driver, isn't it?

	Is it correct if I'll use the following command from the felix/trunk
directory?
mvn archetype:create -DarchetypeGroupId=org.apache.felix.archetypes
-DarchetypeArtifactId=osgi-archetype -DarchetypeVersion=1.0
-DgroupId=org.apache.felix -DartifactId=org.apache.felix.upnp.basedriver

	Consdering our UPnP Base Driver relays on other bundle made by us
should I create 2 distinct subproject (each one as osgi-archetype),
shouldn't I? So that I'll find my SVN working copy as following:
trunk/org.apache.felix.upnp.basedriver
trunk/org.apache.felix.upnp.extra

Ciao,
Stefano "Kismet" Lenzi

Timothy Bennett wrote:
> Folks,
[cut]
> How-To
> ======
> To use the OSGi archetype to kickstart your next OSGi/Maven2 bundle
> development project, perform the following steps (after performing the
> above 3 steps):
> 
> (1) fetch the osgi-archetype project from the Felix repo at [2]
> 
> (2) install the osgi-archetype plugin by executing the following from
> the root of the osgi-archetype directory:
> 
> mvn clean install
> 
> (3) navigate to the directory where you wish to create your new OSGi
> bundle project and execute the following:
> 
> mvn archetype:create -DarchetypeGroupId=org.apache.felix.archetypes
> -DarchetypeArtifactId=osgi-archetype -DarchetypeVersion=1.0
> -DgroupId=<your project group ID> -DartifactId=<your project artifact ID>
> 
> (4) navigate to the subdirectory just created (named after your
> artifactId specified), and execute the following to build your OSGi bundle:
> 
> mvn package
> 
> (5) navigate to the subdirectory named 'target' and you'll see the your
> bundle jar (named after the artifactId specified).  deploy this to your
> OSGi container such as Oscar (or Felix).  A working bundle out of the box!
> 
> (6) Modify the Activator code, add your additional bundle classes, and
> modify the POM to customize the manifest entries to complete your bundle
> development.
> 
> A Few Notes
> =========
> Your project group ID should be something like a namespace identifier,
> e.g. gov.nashville.jis or org.apache.directory.  Maven will use this
> group ID as a package naming structure for your bundle code.
> 
> Your artifact ID should reflect the name of your project or bundle, e.g.
> echo-server or http-service or jabber-server.  Maven will use this
> artifact ID to construct the name of your bundle jar (unless you
> override it in the POM) and the root name of the project directory.
> 
> Refer to [1] for instructions on how to the customize the POM for
> manipulating the OSGi bundle manifest.  Refer to [3] for documentation
> on how to customize the POM for using maven for other build tasks
> (including dependency management).
> 
> I'll try to get these instructions up on the OSGi Wiki at Safehaus soon
> in hopefully a more instructive format than this email.
> 
> References
> =======
> [1] http://docs.safehaus.org/display/OSGI/OSGi+Plugin+for+Maven+2.0
> [2]
> https://svn.apache.org/repos/asf/incubator/felix/trunk/tools/maven2/osgi-archetype
> 
> [3] http://maven.apache.org/guides/index.html
> 
>