You have 3 alternatives:
- put the nuxeo plugin in the install phase (though I assume since
it's also producing an installable artifact you don't want that)
- change the nuxeo plugin to look up the artifact from the already
attached artifacts on the project first before falling back to the
local repository
- manually install the first assembly in the package phase (which
would seem a bit counterintuitive)

The second is probably the best if it is an option.

BTW, the group ID for your nuxeo plugin should probably be something
other than o.a.m.plugins to avoid confusion.

Cheers,
Brett

2008/8/25 Julien CARSIQUE <[EMAIL PROTECTED]>:
> Hi,
>
> I need to build resources artifacts (I use maven-assembly-plugin) and use
> them (with our maven-nuxeo-plugin) from the same pom.xml
> The built resources artifacts do not need to be in the project dependency
> but have to be installed before the execution of the second plugin.
>
> Is it possible to make artifacts built from maven-assembly-plugin being
> installed before the execution of the following maven-nuxeo-plugin ?
>
> I have this error when running "mvn install":
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Nuxeo EP EAR
> [INFO]    task-segment: [clean, install]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory
> /Users/julien/Documents/workspace/nuxeo/nuxeo-platform/nuxeo-platform-ear/target
> ...
> [INFO] [assembly:attached {execution: make-resources}]
> [INFO] Reading assembly descriptor: src/main/assemble/resources/mono.xml
> ...
> [INFO] Building zip:
> /Users/julien/Documents/workspace/nuxeo/nuxeo-platform/nuxeo-platform-ear/target/nuxeo-platform-ear-5.1.6-SNAPSHOT-resources-mono.zip
> ...
> [INFO] [nuxeo:assembly {execution: assemble-ear}]
> [INFO] Loading assembly descriptor:
> /Users/julien/Documents/workspace/nuxeo/nuxeo-platform/nuxeo-platform-ear/src/main/assemble/nuxeo.xml
> ...
> org.apache.maven.plugin.MojoExecutionException: Unable to find artifact.
> ...
> Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException:
> Unable to download the artifact from any repository
>
> Try downloading the file manually from the project website.
>
> Then, install it using the command:
>   mvn install:install-file -DgroupId=org.nuxeo.ecm.platform
> -DartifactId=nuxeo-platform-ear -Dversion=5.1.6-SNAPSHOT
> -Dclassifier=resources-mono -Dpackaging=zip -Dfile=/path/to/file
>
> Alternatively, if you host your own repository you can deploy the file
> there:
>   mvn deploy:deploy-file -DgroupId=org.nuxeo.ecm.platform
> -DartifactId=nuxeo-platform-ear -Dversion=5.1.6-SNAPSHOT
> -Dclassifier=resources-mono -Dpackaging=zip -Dfile=/path/to/file -Durl=[url]
> -DrepositoryId=[id]
> ...
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to run assembly
>
>
> Here's an extract of my pom.xml:
>
>     <plugin>
>       <artifactId>maven-assembly-plugin</artifactId>
>       <configuration>
>         <descriptors>
>           <descriptor>src/main/assemble/resources/mono.xml</descriptor>
>               ...
>         </descriptors>
>       </configuration>
>       <executions>
>         <execution>
>           <id>make-resources</id>
>           <phase>package</phase>
>           <goals>
>             <goal>attached</goal>
>           </goals>
>         </execution>
>       </executions>
>     </plugin>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-nuxeo-plugin</artifactId>
>       <extensions>true</extensions>
>       <executions>
>         <execution>
>           <id>assemble-ear</id>
>           <phase>package</phase>
>           <goals>
>             <goal>assembly</goal>
>           </goals>
>           <configuration>
>               ...
>          </configuration>
>         </execution>
>       </executions>
>     </plugin>
>
>
> Thanks,
>
> --
> Julien CARSIQUE, Nuxeo (Paris, France)
> www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
> Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
> [EMAIL PROTECTED] | Tel: +33 1 40 33 79 87
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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

Reply via email to