You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Ryan Senior <se...@gmail.com> on 2009/01/23 15:37:32 UTC

Deploying a Bundle to a Remote OBR

I've checked out the source for the maven-felix-bundle plugin and I'm having
some difficulty pinpointing where in the code the JAR file is actually
uploading to the remote OBR.  I've looked in both the deploy mojo and the
deploy-file mojos.  I see the code that is uploading the metadata, but not
the JAR itself.  The behavior I am seeing when I run
"org.apache.felix:maven-bundle-plugin:deploy" is consistent with this as
well, the xml file is uploaded, but not the JAR.  Am I overlooking something
or is this functioning as intended?  If it is functioning as intended, what
is the scenario that you would want to upload the metadata but not the JAR?

Thanks,

Ryan

Re: Deploying a Bundle to a Remote OBR

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/1/23 Ryan Senior <se...@gmail.com>

> I've checked out the source for the maven-felix-bundle plugin and I'm
> having
> some difficulty pinpointing where in the code the JAR file is actually
> uploading to the remote OBR.  I've looked in both the deploy mojo and the
> deploy-file mojos.  I see the code that is uploading the metadata, but not
> the JAR itself.  The behavior I am seeing when I run
> "org.apache.felix:maven-bundle-plugin:deploy" is consistent with this as
> well, the xml file is uploaded, but not the JAR.  Am I overlooking
> something
> or is this functioning as intended?  If it is functioning as intended, what
> is the scenario that you would want to upload the metadata but not the JAR?
>

it's the same with the bundle:install / bundle:install-file goals
they update your local OBR repository file, but don't actually
install the bundle - that's done by the Maven install plugin

basically if you have a pom of packaging "bundle" and do:

  mvn install

that tells Maven to run through the build lifecycle up to the
install phase - and if you look at the "components.xml" in
the bundleplugin you'll see this includes:

  org.apache.maven.plugins:maven-install-plugin:install
  org.apache.felix:maven-bundle-plugin:install

if you use the following command on a bundle project:

  mvn deploy

Maven would also include the deploy phase, which does:

  org.apache.maven.plugins:maven-deploy-plugin:deploy
  org.apache.felix:maven-bundle-plugin:deploy

where the Maven deploy plugin does the deployment of
the bundle, and the bundleplugin updates the OBR file.

now the bundle:install-file / bundle:deploy-files goals are
for command line use (like other *-file goals in Maven)
but they also follow the recommended Maven approach
of not duplicating existing functionality (ie. in Maven you
compose plugins together to get the desired result)

so to install an unmanaged bundle file (ie. without a pom)
to your local repository and update the OBR you would do:

   mvn install:install-file bundle:install-file   {...settings...}

to deploy the same bundle and update the remote OBR:

   mvn deploy:deploy-file bundle:deploy-file   {...settings...}

both the bundle:install-file and bundle:deploy-file goals are
designed to work with the standard install:install-file and
deploy:deploy-file settings, so you typically don't have to
repeat yourself

as to why you'd want to update a remote OBR separately
to deploying the bundle - well, actually a number of users
do this. Some use a different mechanism to make JARs
available to customers (not "mvn deploy") but they want
an easy way to update the remote OBR  for bundles that
have already been published elsewhere...

HTH

Thanks,
>
> Ryan
>

-- 
Cheers, Stuart