Stuart McCulloch-3 wrote:
>
> 2008/5/14 mraible <[EMAIL PROTECTED]>:
>
>>
>> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]