You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by mraible <ma...@raibledesigns.com> on 2008/05/13 23:53:46 UTC

maven-bundle-plugin not writing OBR data when project is a WAR

I have a <packaging>war</packaging> project and I'm using the
maven-bundle-plugin to generate the MANIFEST.MF. Everything is working fine
and I can deploy my WAR in an OSGi container. I have <remoteOBR/> in the
<properties> section of my pom.xml.

However, when I run "mvn bundle:deploy", the repository.xml file in my OBR
is not updated. It looks like it's updating, but my artifact doesn't show up
in repository.xml.

Any ideas?

Thanks,

Matt
-- 
View this message in context: http://www.nabble.com/maven-bundle-plugin-not-writing-OBR-data-when-project-is-a-WAR-tp17219225p17219225.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


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


Re: maven-bundle-plugin not writing OBR data when project is a WAR

Posted by Stuart McCulloch <st...@jayway.net>.
2008/5/15 Stuart McCulloch <st...@jayway.net>:

> 2008/5/15 mraible <ma...@raibledesigns.com>:
>
>>
>> Yes. The war is uploaded as evidenced by the following log messages, but
>> repository.xml is not updated. I'm assuming I should be looking for the
>> artifactId in this file - and it doesn't show up.
>>
>> [INFO] [deploy:deploy]
>> altDeploymentRepository = null
>> [INFO] Retrieving previous build number from Snapshots
>> Uploading:
>>
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8.war
>> 5896K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8.war5896K>uploaded
>> [INFO] Retrieving previous metadata from Snapshots
>> [INFO] Uploading repository metadata for: 'snapshot
>> org.appfuse.jobs:jobs-settings:1.0.0-SNAPSHOT'
>> [INFO] Retrieving previous metadata from Snapshots
>> [INFO] Uploading repository metadata for: 'artifact
>> org.appfuse.jobs:jobs-settings'
>> [INFO] Uploading project information for jobs-settings
>> 1.0.0-20080515.133607-8
>> [INFO] Retrieving previous build number from Snapshots
>> Uploading:
>>
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-javadoc.jar
>> 59K uploaded
>> [INFO] Retrieving previous build number from Snapshots
>> Uploading:
>>
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar
>> 4K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar4K>uploaded
>> [INFO] Retrieving previous build number from Snapshots
>> Uploading:
>>
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-javadoc.jar
>> 59K uploaded
>> [INFO] Retrieving previous build number from Snapshots
>> Uploading:
>>
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar
>> 4K uploaded
>> [INFO] [bundle:deploy {execution: bundle-deploy}]
>> [INFO] LOCK
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
>> [INFO] Downloading repository.xml
>> [INFO] Parsing file:/tmp/121085860720029379.xml
>> [INFO] Writing OBR metadata
>> [INFO] Uploading repository.xml
>> [INFO] UNLOCK
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 1 minute 4 seconds
>> [INFO] Finished at: Thu May 15 07:36:49 MDT 2008
>> [INFO] Final Memory: 16M/508M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> If I manually run the following, the repository.xml file gets updated.
>>
>> mvn bundle:deploy-file -Dfile=target/jobs-settings.war -DpomFile=pom.xml
>> -Durl=http://binrepo.qa:8081/nexus/content/repositories/snapshots
>> -Dgroup=org.appfuse.jobs<http://binrepo.qa:8081/nexus/content/repositories/snapshots-Dgroup=org.appfuse.jobs>-DartifactId=jobs-settings -Dversion=1.0.0-SNAPSHOT
>> -Dpackaging=war
>>
>
> interesting, for some reason the bundleplugin is not seeing the WAR
> attached to the project during the standard Maven deploy phase - can
> you raise a JIRA issue against the bundleplugin to track this?
>

actually I just found the incorrect check in the install and deploy code:

   https://issues.apache.org/jira/browse/FELIX-560

and committed a fix to trunk - will deploy 1.4.2-SNAPSHOT later today

Thanks,
>>
>> Matt
>> --
>> View this message in context:
>> http://www.nabble.com/maven-bundle-plugin-not-writing-OBR-data-when-project-is-a-WAR-tp17219225p17253616.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>> --
> Cheers, Stuart


-- 
Cheers, Stuart

Re: maven-bundle-plugin not writing OBR data when project is a WAR

Posted by Stuart McCulloch <st...@jayway.net>.
2008/5/15 mraible <ma...@raibledesigns.com>:

>
> Yes. The war is uploaded as evidenced by the following log messages, but
> repository.xml is not updated. I'm assuming I should be looking for the
> artifactId in this file - and it doesn't show up.
>
> [INFO] [deploy:deploy]
> altDeploymentRepository = null
> [INFO] Retrieving previous build number from Snapshots
> Uploading:
>
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8.war
> 5896K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8.war5896K>uploaded
> [INFO] Retrieving previous metadata from Snapshots
> [INFO] Uploading repository metadata for: 'snapshot
> org.appfuse.jobs:jobs-settings:1.0.0-SNAPSHOT'
> [INFO] Retrieving previous metadata from Snapshots
> [INFO] Uploading repository metadata for: 'artifact
> org.appfuse.jobs:jobs-settings'
> [INFO] Uploading project information for jobs-settings
> 1.0.0-20080515.133607-8
> [INFO] Retrieving previous build number from Snapshots
> Uploading:
>
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-javadoc.jar
> 59K uploaded
> [INFO] Retrieving previous build number from Snapshots
> Uploading:
>
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar
> 4K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar4K>uploaded
> [INFO] Retrieving previous build number from Snapshots
> Uploading:
>
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-javadoc.jar
> 59K uploaded
> [INFO] Retrieving previous build number from Snapshots
> Uploading:
>
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar
> 4K uploaded
> [INFO] [bundle:deploy {execution: bundle-deploy}]
> [INFO] LOCK
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
> [INFO] Downloading repository.xml
> [INFO] Parsing file:/tmp/121085860720029379.xml
> [INFO] Writing OBR metadata
> [INFO] Uploading repository.xml
> [INFO] UNLOCK
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 minute 4 seconds
> [INFO] Finished at: Thu May 15 07:36:49 MDT 2008
> [INFO] Final Memory: 16M/508M
> [INFO]
> ------------------------------------------------------------------------
>
> If I manually run the following, the repository.xml file gets updated.
>
> mvn bundle:deploy-file -Dfile=target/jobs-settings.war -DpomFile=pom.xml
> -Durl=http://binrepo.qa:8081/nexus/content/repositories/snapshots
> -Dgroup=org.appfuse.jobs<http://binrepo.qa:8081/nexus/content/repositories/snapshots-Dgroup=org.appfuse.jobs>-DartifactId=jobs-settings -Dversion=1.0.0-SNAPSHOT
> -Dpackaging=war
>

interesting, for some reason the bundleplugin is not seeing the WAR
attached to the project during the standard Maven deploy phase - can
you raise a JIRA issue against the bundleplugin to track this?


> Thanks,
>
> Matt
> --
> View this message in context:
> http://www.nabble.com/maven-bundle-plugin-not-writing-OBR-data-when-project-is-a-WAR-tp17219225p17253616.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

-- 
Cheers, Stuart

Re: maven-bundle-plugin not writing OBR data when project is a WAR

Posted by mraible <ma...@raibledesigns.com>.


Stuart McCulloch-3 wrote:
> 
> 2008/5/15 mraible <ma...@raibledesigns.com>:
> 
>> Stuart McCulloch-3 wrote:
>> >
>> > 2008/5/14 mraible <ma...@raibledesigns.com>:
>> >
>> >>
>> >> I have a <packaging>war</packaging> project and I'm using the
>> >> maven-bundle-plugin to generate the MANIFEST.MF. Everything is working
>> >> fine
>> >> and I can deploy my WAR in an OSGi container. I have <remoteOBR/> in
>> the
>> >> <properties> section of my pom.xml.
>> >>
>> >> However, when I run "mvn bundle:deploy", the repository.xml file in my
>> >> OBR
>> >> is not updated. It looks like it's updating, but my artifact doesn't
>> show
>> >> up
>> >> in repository.xml.
>> >>
>> >
>> > If you're just running "mvn bundle:deploy" then you won't see any
>> > update because Maven doesn't have an attached artifact to use.
>> > (the artifact is attached during the install phase)
>> >
>> > You'll see the same issue running the core Maven deploy goal
>> > on its own (ie. "mvn deploy:deploy"). These life-cycle goals are
>> > meant to be run as part of a complete build life-cycle, which you
>> > get automatically as part of the "bundle" packaging*
>> >
>> > (* as long as remoteOBR is set, otherwise the phase is skipped)
>> >
>> > because you're using "war" packaging you don't have this phase
>> > attached to your build life-cycle, so you can either add it as follows:
>> >
>> >      <plugin>
>> >        <groupId>org.apache.felix</groupId>
>> >        <artifactId>maven-bundle-plugin</artifactId>
>> >        <version>1.4.1</version>
>> >        <executions>
>> >          <execution>
>> >            <id>bundle-deploy</id>
>> >            <goals>
>> >              <goal>deploy</goal>
>> >            </goals>
>> >            <configuration>
>> >              <!-- deploy settings -->
>> >            </configuration>
>> >          </execution>
>> >        </executions>
>> >      </plugin>
>> >
>> > or use "mvn install bundle:deploy" to attach the artifact before the
>> > deploy
>> >
>> > HTH
>> >
>> > PS. deploy-file, like all *-file goals, can be used outside the build
>> > life-cycle...
>> >
>> > --
>> > Cheers, Stuart
>> >
>> >
>>
>> I tried adding the following to my maven-bundle-plugin's configuration,
>> but
>> my artifactId still doesn't show up in my repository.xml.
>>
>>        <executions>
>>          <execution>
>>            <id>create-manifest</id>
>>            <phase>compile</phase>
>>            <goals>
>>              <goal>manifest</goal>
>>            </goals>
>>          </execution>
>>           <execution>
>>            <id>bundle-deploy</id>
>>            <goals>
>>              <goal>deploy</goal>
>>            </goals>
>>           </execution>
>>        </executions>
>>
>> Here's the output from running deploy:
>>
>> [INFO] Retrieving previous metadata from Snapshots
>> [INFO] Uploading repository metadata for: 'snapshot
>> org.appfuse.jobs:jobs-settings:1.0.0-SNAPSHOT'
>> [INFO] Retrieving previous metadata from Snapshots
>> [INFO] Uploading repository metadata for: 'artifact
>> org.appfuse.jobs:jobs-settings'
>> [INFO] Uploading project information for jobs-settings
>> 1.0.0-20080514.161326-7
>> [INFO] Retrieving previous build number from Snapshots
>> Uploading:
>>
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-javadoc.jar
>> 59K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-javadoc.jar59K>uploaded
>> [INFO] Retrieving previous build number from Snapshots
>> Uploading:
>>
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-sources.jar
>> 4K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-sources.jar4K>uploaded
>> [INFO] [bundle:deploy {execution: bundle-deploy}]
>> [INFO] LOCK
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
>> [INFO] Downloading repository.xml
>> [INFO] Parsing file:/tmp/121078168144013968.xml
>> [INFO] Writing OBR metadata
>> [INFO] Uploading repository.xml
>> [INFO] UNLOCK
>> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>>
> 
> I see Maven uploading sources and javadoc artifacts, but I don't see
> it uploading the main WAR artifact - do you get the same result with
> "mvn install deploy" ?
> 
> 

Yes. The war is uploaded as evidenced by the following log messages, but
repository.xml is not updated. I'm assuming I should be looking for the
artifactId in this file - and it doesn't show up.

[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from Snapshots
Uploading:
http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8.war
5896K uploaded
[INFO] Retrieving previous metadata from Snapshots
[INFO] Uploading repository metadata for: 'snapshot
org.appfuse.jobs:jobs-settings:1.0.0-SNAPSHOT'
[INFO] Retrieving previous metadata from Snapshots
[INFO] Uploading repository metadata for: 'artifact
org.appfuse.jobs:jobs-settings'
[INFO] Uploading project information for jobs-settings
1.0.0-20080515.133607-8
[INFO] Retrieving previous build number from Snapshots
Uploading:
http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-javadoc.jar
59K uploaded
[INFO] Retrieving previous build number from Snapshots
Uploading:
http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar
4K uploaded
[INFO] Retrieving previous build number from Snapshots
Uploading:
http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-javadoc.jar
59K uploaded
[INFO] Retrieving previous build number from Snapshots
Uploading:
http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080515.133607-8-sources.jar
4K uploaded
[INFO] [bundle:deploy {execution: bundle-deploy}]
[INFO] LOCK
http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
[INFO] Downloading repository.xml
[INFO] Parsing file:/tmp/121085860720029379.xml
[INFO] Writing OBR metadata
[INFO] Uploading repository.xml
[INFO] UNLOCK
http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 4 seconds
[INFO] Finished at: Thu May 15 07:36:49 MDT 2008
[INFO] Final Memory: 16M/508M
[INFO]
------------------------------------------------------------------------


Stuart McCulloch-3 wrote:
> 
> 
> once Maven is deploying the WAR artifact in the same build process
> then you should see it appear in the repository.xml (if Maven doesn't
> tell us about the artifact then we can't add anything to OBR)
> 
> the only other possibility is to use the deploy-file goal, and point it to
> the WAR file in the target directory, and the pom.xml in the project dir
> - but this is a last resort, as it should be possible to use bundle:deploy
> as long as you can get Maven to attach and deploy the WAR file.
> 
> 

If I manually run the following, the repository.xml file gets updated.

mvn bundle:deploy-file -Dfile=target/jobs-settings.war -DpomFile=pom.xml
-Durl=http://binrepo.qa:8081/nexus/content/repositories/snapshots
-Dgroup=org.appfuse.jobs -DartifactId=jobs-settings -Dversion=1.0.0-SNAPSHOT
-Dpackaging=war

Thanks,

Matt
-- 
View this message in context: http://www.nabble.com/maven-bundle-plugin-not-writing-OBR-data-when-project-is-a-WAR-tp17219225p17253616.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


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


Re: maven-bundle-plugin not writing OBR data when project is a WAR

Posted by Stuart McCulloch <st...@jayway.net>.
2008/5/15 mraible <ma...@raibledesigns.com>:

>
>
>
> Stuart McCulloch-3 wrote:
> >
> > 2008/5/14 mraible <ma...@raibledesigns.com>:
> >
> >>
> >> I have a <packaging>war</packaging> project and I'm using the
> >> maven-bundle-plugin to generate the MANIFEST.MF. Everything is working
> >> fine
> >> and I can deploy my WAR in an OSGi container. I have <remoteOBR/> in the
> >> <properties> section of my pom.xml.
> >>
> >> However, when I run "mvn bundle:deploy", the repository.xml file in my
> >> OBR
> >> is not updated. It looks like it's updating, but my artifact doesn't
> show
> >> up
> >> in repository.xml.
> >>
> >
> > If you're just running "mvn bundle:deploy" then you won't see any
> > update because Maven doesn't have an attached artifact to use.
> > (the artifact is attached during the install phase)
> >
> > You'll see the same issue running the core Maven deploy goal
> > on its own (ie. "mvn deploy:deploy"). These life-cycle goals are
> > meant to be run as part of a complete build life-cycle, which you
> > get automatically as part of the "bundle" packaging*
> >
> > (* as long as remoteOBR is set, otherwise the phase is skipped)
> >
> > because you're using "war" packaging you don't have this phase
> > attached to your build life-cycle, so you can either add it as follows:
> >
> >      <plugin>
> >        <groupId>org.apache.felix</groupId>
> >        <artifactId>maven-bundle-plugin</artifactId>
> >        <version>1.4.1</version>
> >        <executions>
> >          <execution>
> >            <id>bundle-deploy</id>
> >            <goals>
> >              <goal>deploy</goal>
> >            </goals>
> >            <configuration>
> >              <!-- deploy settings -->
> >            </configuration>
> >          </execution>
> >        </executions>
> >      </plugin>
> >
> > or use "mvn install bundle:deploy" to attach the artifact before the
> > deploy
> >
> > HTH
> >
> > PS. deploy-file, like all *-file goals, can be used outside the build
> > life-cycle...
> >
> > --
> > Cheers, Stuart
> >
> >
>
> I tried adding the following to my maven-bundle-plugin's configuration, but
> my artifactId still doesn't show up in my repository.xml.
>
>        <executions>
>          <execution>
>            <id>create-manifest</id>
>            <phase>compile</phase>
>            <goals>
>              <goal>manifest</goal>
>            </goals>
>          </execution>
>           <execution>
>            <id>bundle-deploy</id>
>            <goals>
>              <goal>deploy</goal>
>            </goals>
>           </execution>
>        </executions>
>
> Here's the output from running deploy:
>
> [INFO] Retrieving previous metadata from Snapshots
> [INFO] Uploading repository metadata for: 'snapshot
> org.appfuse.jobs:jobs-settings:1.0.0-SNAPSHOT'
> [INFO] Retrieving previous metadata from Snapshots
> [INFO] Uploading repository metadata for: 'artifact
> org.appfuse.jobs:jobs-settings'
> [INFO] Uploading project information for jobs-settings
> 1.0.0-20080514.161326-7
> [INFO] Retrieving previous build number from Snapshots
> Uploading:
>
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-javadoc.jar
> 59K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-javadoc.jar59K>uploaded
> [INFO] Retrieving previous build number from Snapshots
> Uploading:
>
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-sources.jar
> 4K<http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-sources.jar4K>uploaded
> [INFO] [bundle:deploy {execution: bundle-deploy}]
> [INFO] LOCK
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
> [INFO] Downloading repository.xml
> [INFO] Parsing file:/tmp/121078168144013968.xml
> [INFO] Writing OBR metadata
> [INFO] Uploading repository.xml
> [INFO] UNLOCK
> http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
>

I see Maven uploading sources and javadoc artifacts, but I don't see
it uploading the main WAR artifact - do you get the same result with
"mvn install deploy" ?

once Maven is deploying the WAR artifact in the same build process
then you should see it appear in the repository.xml (if Maven doesn't
tell us about the artifact then we can't add anything to OBR)

the only other possibility is to use the deploy-file goal, and point it to
the WAR file in the target directory, and the pom.xml in the project dir
- but this is a last resort, as it should be possible to use bundle:deploy
as long as you can get Maven to attach and deploy the WAR file.

Thanks,
>
> Matt
> --
> View this message in context:
> http://www.nabble.com/maven-bundle-plugin-not-writing-OBR-data-when-project-is-a-WAR-tp17219225p17235362.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart

Re: maven-bundle-plugin not writing OBR data when project is a WAR

Posted by mraible <ma...@raibledesigns.com>.


Stuart McCulloch-3 wrote:
> 
> 2008/5/14 mraible <ma...@raibledesigns.com>:
> 
>>
>> I have a <packaging>war</packaging> project and I'm using the
>> maven-bundle-plugin to generate the MANIFEST.MF. Everything is working
>> fine
>> and I can deploy my WAR in an OSGi container. I have <remoteOBR/> in the
>> <properties> section of my pom.xml.
>>
>> However, when I run "mvn bundle:deploy", the repository.xml file in my
>> OBR
>> is not updated. It looks like it's updating, but my artifact doesn't show
>> up
>> in repository.xml.
>>
> 
> If you're just running "mvn bundle:deploy" then you won't see any
> update because Maven doesn't have an attached artifact to use.
> (the artifact is attached during the install phase)
> 
> You'll see the same issue running the core Maven deploy goal
> on its own (ie. "mvn deploy:deploy"). These life-cycle goals are
> meant to be run as part of a complete build life-cycle, which you
> get automatically as part of the "bundle" packaging*
> 
> (* as long as remoteOBR is set, otherwise the phase is skipped)
> 
> because you're using "war" packaging you don't have this phase
> attached to your build life-cycle, so you can either add it as follows:
> 
>      <plugin>
>        <groupId>org.apache.felix</groupId>
>        <artifactId>maven-bundle-plugin</artifactId>
>        <version>1.4.1</version>
>        <executions>
>          <execution>
>            <id>bundle-deploy</id>
>            <goals>
>              <goal>deploy</goal>
>            </goals>
>            <configuration>
>              <!-- deploy settings -->
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
> 
> or use "mvn install bundle:deploy" to attach the artifact before the
> deploy
> 
> HTH
> 
> PS. deploy-file, like all *-file goals, can be used outside the build
> life-cycle...
> 
> -- 
> Cheers, Stuart
> 
> 

I tried adding the following to my maven-bundle-plugin's configuration, but
my artifactId still doesn't show up in my repository.xml.

        <executions>
          <execution>
            <id>create-manifest</id>
            <phase>compile</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
          <execution>
            <id>bundle-deploy</id>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>

Here's the output from running deploy:

[INFO] Retrieving previous metadata from Snapshots
[INFO] Uploading repository metadata for: 'snapshot
org.appfuse.jobs:jobs-settings:1.0.0-SNAPSHOT'
[INFO] Retrieving previous metadata from Snapshots
[INFO] Uploading repository metadata for: 'artifact
org.appfuse.jobs:jobs-settings'
[INFO] Uploading project information for jobs-settings
1.0.0-20080514.161326-7
[INFO] Retrieving previous build number from Snapshots
Uploading:
http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-javadoc.jar
59K uploaded
[INFO] Retrieving previous build number from Snapshots
Uploading:
http://binrepo.qa:8081/nexus/content/repositories/snapshots/org/appfuse/jobs/jobs-settings/1.0.0-SNAPSHOT/jobs-settings-1.0.0-20080514.161326-7-sources.jar
4K uploaded
[INFO] [bundle:deploy {execution: bundle-deploy}]
[INFO] LOCK
http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
[INFO] Downloading repository.xml
[INFO] Parsing file:/tmp/121078168144013968.xml
[INFO] Writing OBR metadata
[INFO] Uploading repository.xml
[INFO] UNLOCK
http://binrepo.qa:8081/nexus/content/repositories/snapshots/repository.xml
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL

Thanks,

Matt
-- 
View this message in context: http://www.nabble.com/maven-bundle-plugin-not-writing-OBR-data-when-project-is-a-WAR-tp17219225p17235362.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


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


Re: maven-bundle-plugin not writing OBR data when project is a WAR

Posted by Stuart McCulloch <st...@jayway.net>.
2008/5/14 mraible <ma...@raibledesigns.com>:

>
> I have a <packaging>war</packaging> project and I'm using the
> maven-bundle-plugin to generate the MANIFEST.MF. Everything is working
> fine
> and I can deploy my WAR in an OSGi container. I have <remoteOBR/> in the
> <properties> section of my pom.xml.
>
> However, when I run "mvn bundle:deploy", the repository.xml file in my OBR
> is not updated. It looks like it's updating, but my artifact doesn't show
> up
> in repository.xml.
>

If you're just running "mvn bundle:deploy" then you won't see any
update because Maven doesn't have an attached artifact to use.
(the artifact is attached during the install phase)

You'll see the same issue running the core Maven deploy goal
on its own (ie. "mvn deploy:deploy"). These life-cycle goals are
meant to be run as part of a complete build life-cycle, which you
get automatically as part of the "bundle" packaging*

(* as long as remoteOBR is set, otherwise the phase is skipped)

because you're using "war" packaging you don't have this phase
attached to your build life-cycle, so you can either add it as follows:

     <plugin>
       <groupId>org.apache.felix</groupId>
       <artifactId>maven-bundle-plugin</artifactId>
       <version>1.4.1</version>
       <executions>
         <execution>
           <id>bundle-deploy</id>
           <goals>
             <goal>deploy</goal>
           </goals>
           <configuration>
             <!-- deploy settings -->
           </configuration>
         </execution>
       </executions>
     </plugin>

or use "mvn install bundle:deploy" to attach the artifact before the deploy

HTH

PS. deploy-file, like all *-file goals, can be used outside the build
life-cycle...

Any ideas?
>
> Thanks,
>
> Matt
> --
> View this message in context:
> http://www.nabble.com/maven-bundle-plugin-not-writing-OBR-data-when-project-is-a-WAR-tp17219225p17219225.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart