Hi Stuart,

thank you for your answer. I've run the  "mvn install -DremoteOBR 
org.apache.felix:maven-bundle-plugin:deploy" command and obtained a non-empty 
repository.xml file.

I had to make further changes to meet the expected behaviour, as I cannot 
deploy repository.xml on my corporate maven2 repository. So I am now using
mvn deploy -DremoteOBR -DaltDeploymentRepository=xxx , 
and this works OK. However, I have still some manual edition to do by hand :
I would like the repository.xml to reference an obr2html.xsl file . If I add 
the line (by hand) "<?xml-stylesheet..." to the created repository.xml, it's 
OK, but the next deploy erases the line.

Would be nice if this line was preserved.

Best regards,

Anne

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Stuart McCulloch
Envoyé : mardi 22 avril 2008 04:02
À : [email protected]
Objet : Re: Deploying a remote obr

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to