2008/4/26 Patrick Shea <[EMAIL PROTECTED]>:

> I'm trying to use the obr:deploy-file goal but the plugin never upload my
> jar to the remote repository, it just updates the repository.xml
>

that's correct, it only updates the repository.xml - if you want to upload
the jar then
you need to use the standard deploy:deploy-file goal, which you can combine
on
the same command-line / build phase:

   mvn deploy:deploy-file bundle:deploy-file ...etc...

(otherwise we'd end up duplicating the whole deploy-file code in the
bundleplugin)

Note *-file goals are mainly meant for command-line use when you have
bundles
that are not managed by Maven, or you want full control over the bundle URL
that
goes in the repository.xml

if you use <packaging>bundle</packaging> then you will automatically get the
remote repository.xml updated when you use "mvn deploy" as long as you set
the remoteOBR setting, because the "bundle:deploy" goal is part of the
bundle
lifecycle...

from components.xml in the bundleplugin:

<!-- START SNIPPET: bundle-lifecycle -->
<phases>

<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
  <compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>

<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>

<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
  <test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
  <package>org.apache.felix:maven-bundle-plugin:bundle</package>
  <install>
    org.apache.maven.plugins:maven-install-plugin:install,
    org.apache.felix:maven-bundle-plugin:install
  </install>
  <deploy>
    org.apache.maven.plugins:maven-deploy-plugin:deploy,
    org.apache.felix:maven-bundle-plugin:deploy
  </deploy>
</phases>
<!-- END SNIPPET: bundle-lifecycle -->

also, if your repository.xml is located alongside your remote Maven
repository
but you don't use <packaging>bundle</packaging> then you can still use the
simpler "bundle:deploy" goal like so:

   mvn deploy bundle:deploy -DremoteOBR ....etc....

(you need to at least run install/deploy before bundle:deploy so Maven will
 attach the project artifact - otherwise we won't have its metadata
available)

Here's my config:
>
> <plugin>
>        <groupId>org.apache.felix</groupId>
>                <artifactId>maven-obr-plugin</artifactId>
>                <executions>
>                        <execution>
>                                <id>install</id>
>                                <phase>install</phase>
>                                <goals>
>                                        <goal>install-file</goal>
>                                </goals>
>                        </execution>
>                        <execution>
>                                <id>deploy</id>
>                                <phase>deploy</phase>
>                                <goals>
>                                        <goal>deploy-file</goal>
>                                </goals>
>                        </execution>
>                </executions>
>                <configuration>
>                        <groupId>${pom.groupId}</groupId>
>                        <artifactId>${pom.artifactId}</artifactId>
>                        <version>${pom.version}</version>
>                        <packaging>bundle</packaging>
> <repositoryId>${project.distributionManagementArtifactRepository.id
> }</repositoryId>
>
>  <url>${project.distributionManagementArtifactRepository.url}</url>
>                <file>${pom.artifactId}-${pom.version}.jar</file>
>        </configuration>
> </plugin>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Cheers, Stuart

Reply via email to