You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by an...@orange-ftgroup.com on 2008/04/21 12:31:38 UTC

Deploying a remote obr

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

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. 

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. 

RE: Deploying a remote obr

Posted by an...@orange-ftgroup.com.
Hi Stuart,
I've raised an improvement request on jira.
Thanks,
Anne 

-----Message d'origine-----
De : mcculls@gmail.com [mailto:mcculls@gmail.com] De la part de Stuart McCulloch
Envoyé : mardi 22 avril 2008 11:27
À : users@felix.apache.org
Objet : Re: Deploying a remote obr

2008/4/22 <an...@orange-ftgroup.com>:

> 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.
>

Hi Anne, could you raise this as a new feature request on JIRA?

   http://issues.apache.org/jira/browse/FELIX/component/12311143

--
Cheers, Stuart


> Best regards,
>
> Anne
>
> -----Message d'origine-----
> De : mcculls@gmail.com [mailto:mcculls@gmail.com] De la part de Stuart
> McCulloch
> Envoyé : mardi 22 avril 2008 04:02
> À : users@felix.apache.org
> Objet : Re: Deploying a remote obr
>
> 2008/4/21 <an...@orange-ftgroup.com>:
>
> > 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: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>
> --
> Cheers, Stuart
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

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


RE: Deploying a remote obr

Posted by an...@orange-ftgroup.com.
Thank you Stuart, it works well now with the current 1.4.1-SNAPSHOT version.
Anne
-----Message d'origine-----
De : mcculls@gmail.com [mailto:mcculls@gmail.com] De la part de Stuart McCulloch
Envoyé : mardi 22 avril 2008 11:27
À : users@felix.apache.org
Objet : Re: Deploying a remote obr

2008/4/22 <an...@orange-ftgroup.com>:

> 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.
>

Hi Anne, could you raise this as a new feature request on JIRA?

   http://issues.apache.org/jira/browse/FELIX/component/12311143

--
Cheers, Stuart


> Best regards,
>
> Anne
>
> -----Message d'origine-----
> De : mcculls@gmail.com [mailto:mcculls@gmail.com] De la part de Stuart
> McCulloch
> Envoyé : mardi 22 avril 2008 04:02
> À : users@felix.apache.org
> Objet : Re: Deploying a remote obr
>
> 2008/4/21 <an...@orange-ftgroup.com>:
>
> > 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: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>
> --
> Cheers, Stuart
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

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


Re: Deploying a remote obr

Posted by Stuart McCulloch <st...@jayway.net>.
2008/4/22 <an...@orange-ftgroup.com>:

> 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.
>

Hi Anne, could you raise this as a new feature request on JIRA?

   http://issues.apache.org/jira/browse/FELIX/component/12311143

-- 
Cheers, Stuart


> Best regards,
>
> Anne
>
> -----Message d'origine-----
> De : mcculls@gmail.com [mailto:mcculls@gmail.com] De la part de Stuart
> McCulloch
> Envoyé : mardi 22 avril 2008 04:02
> À : users@felix.apache.org
> Objet : Re: Deploying a remote obr
>
> 2008/4/21 <an...@orange-ftgroup.com>:
>
> > 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: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>
> --
> Cheers, Stuart
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

RE: Deploying a remote obr

Posted by an...@orange-ftgroup.com.
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 : mcculls@gmail.com [mailto:mcculls@gmail.com] De la part de Stuart McCulloch
Envoyé : mardi 22 avril 2008 04:02
À : users@felix.apache.org
Objet : Re: Deploying a remote obr

2008/4/21 <an...@orange-ftgroup.com>:

> 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

--
Cheers, Stuart

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


Re: Deploying a remote obr

Posted by Stuart McCulloch <st...@jayway.net>.
2008/4/21 <an...@orange-ftgroup.com>:

> 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

-- 
Cheers, Stuart