Hi
Now "mvn clean && mvn package" fails:
[INFO] [assembly:assembly {execution: make-assembly}]
[INFO] Reading assembly descriptor: src/assembly/bin.xml
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE [INFO]
------------------------------------------------------------------------
[INFO] :
org.apache.maven.plugin.assembly.io.defaultassemblyrea...@7051630a
site did not exist in the target directory - please run
site:site before creating the assembly
Mojo configuration is invalid: site did not exist in
the target directory - please run site:site before
creating the assembly
If I understood Maven life cycles correctly, the default lifecycle
with compile and package is supposed to run without having to run the
site lifecycle in between....
The problematic line is:
<includeSiteDirectory>true</includeSiteDirectory>
But somehow that doesn't work out anyway:
You created a bin.xml that produces not a "bin" but the
apache-log4php-2.0.0-incubating-src.tar.gz
with all source files (except the package* and legacy CHANGELOG).
Then there is the pear-assembly.xml which does also packages the sources
but is no PEAR package because the package.xml is not generated anymore.
I would propose to have the following:
* src/assembly/src.xml
Creates log4php-2.0.0-incubating-src.zip/tgz with everything
that survives "mvn clean".
* src/assembly/bin.xml
Creates log4php-2.0.0-incubating.zip/tgz with just the
src/main/php/ directory, renamed to log4php/ together
with the CHANGELOGs + READMEs. It's for users who just want to
copy one directoy to their /usr/local/share/php/
* src/assembly/pear-package.xml
Creates log4php-2.0.0incubating.tgz (no zip necessary) that
contains src/main/php/, src/main/examples/, the toplevel
READMEs and a valid package.xml which has to be produced using
the pacakge-* scripts as ant task. The latter should be bound
to the maven "prepare-package" phase and stay in pom.xml.
What do you think?
bye,
-christian-
Am Fri, 23 Oct 2009 08:56:55 +0200
schrieb Christian Grobmeier <[email protected]>:
> Hi Christian
>
> its not necessary to add this one here. The file in question is
> src/assembly/bin.xml were it's already included.
> I have added the pear-assembly file, but can you help going through
> it? There is some execution missing, which we need to create in the
> pom :-)
>
> Cheers
>
> On Fri, Oct 23, 2009 at 12:28 AM, <[email protected]> wrote:
> > Author: chammers
> > Date: Thu Oct 22 22:28:53 2009
> > New Revision: 828879
> >
> > URL: http://svn.apache.org/viewvc?rev=828879&view=rev
> > Log:
> > Create .zip file with identical content as the PEAR .tgz.
> > Too bad that the PEAR version number may not (it's validated)
> > contain the -SNAPSHOT so the it has to be specified separately. I
> > could not find out how to elegantly use sed or a regex in the
> > pom.xml.
> >
> > Modified:
> > incubator/log4php/trunk/pom.xml
> >
> > Modified: incubator/log4php/trunk/pom.xml
> > URL:
> > http://svn.apache.org/viewvc/incubator/log4php/trunk/pom.xml?rev=828879&r1=828878&r2=828879&view=diff
> > ==============================================================================
> > --- incubator/log4php/trunk/pom.xml (original) +++
> > incubator/log4php/trunk/pom.xml Thu Oct 22 22:28:53 2009 @@ -117,6
> > +117,7 @@ <properties>
> > <surefire.reports>target/surefire-reports</surefire.reports>
> >
> > <coverage.report>target/site/coverage-report</coverage.report>
> > + <pear.version>2.0</pear.version>
> > </properties>
> >
> > <build>
> > @@ -190,6 +191,14 @@
> > <exec executable="pear"
> > dir="target/pear"> <arg line="package"/>
> > </exec>
> > + <!-- Create zip archive with
> > identical contents as the .tgz -->
> > + <!-- The version number of the
> > pear package does never contain -SNAPSHOT. -->
> > + <untar dest="target/zip">
> > + <gzipresource>
> > + <file
> > file="target/pear/log4php-${pear.version}.tgz"/>
> > + </gzipresource>
> > + </untar>
> > + <zip
> > destfile="target/pear/log4php-${pear.version}.zip"
> > basedir="target/zip/" /> </tasks> </configuration>
> > </execution>
> >
> >
> >