You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Scholze <m_...@pixelpark.com> on 2006/11/02 12:06:26 UTC

assembly plugin together with the release plugin

After cutting a release, I would like to generate deployment packages
for different target systems (dev, test, live) with the assembly plugin.
My pom locks like:

...
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>deploy</phase>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/assembly-dev.xml</descriptor>
                <descriptor>src/main/assembly/assembly-test.xml</descriptor>
              </descriptors>
            </configuration>
            <goals>
              <goal>assembly</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
...

with mvn release:perform the assembly plugin starts after building the
release.

I got the output:

    [INFO] Preparing assembly:assembly
    [INFO]
---------------------------------------------------------------------
-------
    [INFO] Building Beispielrechner: berufedb-server
    [INFO]
---------------------------------------------------------------------
-------
    [WARNING] Removing: jar from forked lifecycle, to prevent recursive
invocati
on.
    [WARNING] Removing: jar from forked lifecycle, to prevent recursive
invocati
on.
    [WARNING] Removing: assembly from forked lifecycle, to prevent
recursive inv
ocation.
    [INFO] [resources:resources]
    [INFO] Using default encoding to copy filtered resources.
    [INFO] [compiler:compile]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [resources:testResources]
    [INFO] Using default encoding to copy filtered resources.
    [INFO] [compiler:testCompile]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [surefire:test]
    [INFO] Surefire report directory: P:\rechner\scm\trunk\berufedb-se
rver\target\checkout\target\surefire-reports

    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    Running com.pixelpark.beispielrechner.berufedb.AppTest
    Start
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
2.469 sec

    Results :
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

....

Why does the assembly plugin starts again the compile, test, ... Phase ?

What about the warnings: Removing: jar from forked lifecycle, to prevent
recursive inv ... ?

Michael



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


Re: assembly plugin together with the release plugin

Posted by firepol <it...@yahoo.it>.
Dear Micheal,

according to the assembly usage documentation, see chapter "Normal
Assemblies" on 
http://maven.apache.org/plugins/maven-assembly-plugin/usage.html

your pom should be modified as follows:

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
              <descriptors>
                <descriptor>src/main/assembly/assembly-dev.xml</descriptor>
                <descriptor>src/main/assembly/assembly-test.xml</descriptor>
              </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>deploy</phase>
            <goals>
              <goal>attached</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

The main error is "<goal>assembly</goal>"(wrong) instead of
"<goal>attached</goal>"(correct) (that is the explanation for the phases to
be run again).

By the way, if you set the phase to "deploy", maven should generate an
assembly each time you deploy a snapshot (instead of generating it only when
you tag a release).

I've personally tried in our company to put <phase>release</phase> (actually
we use now <phase>package</phase>) but after having launched the
"release:prepare release:perform" goal (from continuum) I noticed that the
assembly wasn't done.

Should I run the assembly goal just after having run the release:prepare, as
explained here
http://maven.apache.org/plugins/maven-release-plugin/examples/run-goals-before-commit.html
?


Michael Scholze wrote:
> 
> After cutting a release, I would like to generate deployment packages
> for different target systems (dev, test, live) with the assembly plugin.
> My pom locks like:
> 
> ...
>       <plugin>
>         <artifactId>maven-assembly-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>deploy</phase>
>             <configuration>
>               <descriptors>
>                
> <descriptor>src/main/assembly/assembly-dev.xml</descriptor>
>                
> <descriptor>src/main/assembly/assembly-test.xml</descriptor>
>               </descriptors>
>             </configuration>
>             <goals>
>               <goal>assembly</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> 


-- 
View this message in context: http://www.nabble.com/assembly-plugin-together-with-the-release-plugin-tf2559088s177.html#a11321128
Sent from the Maven - Users mailing list archive at Nabble.com.


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