Thanks,
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)
Of course not, I often need to call only the package phase.
- 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
I'll try in this way.
Our implementation rely on org.apache.maven.artifact.resolver.ArtifactResolver.resolve() Is there a reason why default implementation do not look up to from attached artifacts on project ?

Fast and functional solution was to generate these "resources artifacts" in a sub-module but I had a lot of execution issues, depending on the module from which the command was launched (sub-module, this module, parent module, root module, ...) and because of inherited plugins' configurations that I didn't succeed to unactivate. maven-nuxeo-plugin works like maven-assembly-plugin and need to be able accessing these resources as well locally since as downloaded artifacts from local or remote repository.
Or from already attached artifacts on the project, I like the idea :-)
- 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.
Sure, it will.
Reason is historical, because of an old maven bug (solved I guess?) and the need to be able running simple commands like "mvn nuxeo:anything ...".
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]






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

Reply via email to