2008/4/21 <[EMAIL PROTECTED]>: > Hi everybody, > > I'm trying to use the deploy goal of maven-bundle-plugin, in order to > deploy a remote OBR. However, I must have made a mistake somewhere, > because I end with an empty repository. Here is what I do : > > I'm using the attached pom.xml file, trying to create a very simple > bundle that just uses org.osgi.framework . > > First I install locally the bundle using "mvn install" . This creates a > repository.xml file in my local repository, as expected. This local > repository.xml contains the description of the newly cerated bundle and > its dependencies. > > Then I try to remotally deploy the repository, using "remoteOBR". So I > type : > mvn -X -DremoteOBR -org.apache.felix:maven-bundle-plugin:deploy >
Hi Anne, this is kind of a Maven issue - running the bundle:deploy goal on it's own won't upload the bundle metadata because Maven doesn't attach the pre-existing built artifact to the project - so when we ask Maven for the bundle details all we get is null. if you run the install goal as part of the same invocation, ie: mvn install -DremoteOBR org.apache.felix:maven-bundle-plugin:deploy then you should see metadata uploaded to the remote OBR. the reason you never see this with the normal Maven deploy goal is because "deploy" is also a build phase, so when you run "mvn deploy" it runs all the preceding lifecycle phases, which includes "install". ( but if you ran "mvn deploy:deploy" you'd see the problem ) I'll add a warning/error to make this clearer when it happens. FYI, the bundle:deploy goal is meant for Maven projects that use "<packaging>bundle</packaging>" in their pom.xml and want the OBR to refer to the deployed artifact - in which case you would typically just use: mvn deploy -DremoteOBR which will run the deploy phase - for bundle projects this will upload the artifact to the remote site and update the OBR. (see the components.xml file for the full build lifecycle) if you want to deploy OBR metadata for a non-bundle project, or even bundles created outside of Maven then you should use the "bundle:deploy-file" goal. The build is "successfull", but what I get on my remote deployment site > is an empty repository.xml : > <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> > <repository lastmodified="20080404183502.145" name="MyRepository"/> > > Moreover, the "lastmodified" information does not correspond to the real > modification date. > this is probably from the first time you ran the command (ie. when it was first created) - if there's no change to the content then it won't change the lastmodified date. I must have done something wrong, but what ? I have tried with both > 1.4.0 and 1.4.1-SNAPSHOT versions of the plugin. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Cheers, Stuart

