Move the 'distributions' profile (which creates the zip/tarball distributions) to the [src]/dspace/pom.xml. Minor updates (including enhanced comments) to all three of our Assemblies (assembly.xml, release.xml and src-release.xml), to ensure they all work properly when run from [src]/dspace/src/main/assembly/. Also minor updates to 'dspace-parent' and 'dspace' POM files. All these changes now fix issues with 'mvn package -Pdistributions'.

This commit is contained in:
Tim Donohue
2012-10-31 12:34:06 -05:00
parent a05f0d0776
commit 7e1b535a73
5 changed files with 110 additions and 62 deletions

View File

@@ -19,13 +19,6 @@
<relativePath>..</relativePath>
</parent>
<!--
Builds Overlay Modules for DSpace
-->
<modules>
<module>modules</module>
</modules>
<build>
<filters>
<filter>${basedir}/../${filters.file}</filter>
@@ -62,19 +55,24 @@
</resources>
<plugins>
<!-- overall project assembly -->
<!-- Default project assembly. Calls 'assembly.xml', which
generates the DSpace build directory. -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<!-- Don't "attach" the assembly results to this project. As
this assembly builds a directory, setting this to "true"
(default value) will just result in a WARNING message.-->
<attach>false</attach>
<descriptors>
<descriptor>src/assemble/assembly.xml</descriptor>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>directory-single</goal>
<goal>single</goal>
</goals>
</execution>
</executions>
@@ -82,6 +80,63 @@
</plugins>
</build>
<profiles>
<!-- Default Profile. This builds all Overlay modules for DSpace -->
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!--
Builds Overlay Modules for DSpace
-->
<modules>
<module>modules</module>
</modules>
</profile>
<!--
Run this profile (e.g. 'mvn package -Pdistributions') to create
zip / tarball distributions to upload to SourceForge or similar.
When this profile is run, DSpace is NOT compiled as normal.
Instead, a zip/tarball is generated from the parent [dspace-src] directory.
-->
<profile>
<id>distributions</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<inherited>false</inherited>
<configuration>
<descriptors>
<descriptor>src/main/assembly/release.xml</descriptor>
<descriptor>src/main/assembly/src-release.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
<finalName>dspace-${project.version}</finalName>
</configuration>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<!-- This dependency ensures DSpace OAI JAR is added to [dspace]/lib/,
so that the 'dspace oai' launcher.xml command works. -->

View File

@@ -7,6 +7,11 @@
http://www.dspace.org/license/
-->
<!--
DSpace Directory Assembly
This assembly creates the 'target/dspace-[version]-build/' which can
then be installed via Apache Ant.
-->
<assembly xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
@@ -17,6 +22,7 @@
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<!-- Copy src/main/config/build.xml to resulting directory -->
<fileSet>
<directory>src/main/config</directory>
<outputDirectory>.</outputDirectory>
@@ -24,6 +30,19 @@
<include>build.xml</include>
</includes>
</fileSet>
<!-- Copy README and LICENSE files to resulting directory -->
<fileSet>
<directory>..</directory>
<outputDirectory>.</outputDirectory>
<includes>
<include>LICENSE*</include>
<include>README</include>
</includes>
<excludes>
<exclude>LICENSE_HEADER</exclude>
</excludes>
</fileSet>
<!-- Copy necessary subdirectories to resulting directory -->
<fileSet>
<outputDirectory>.</outputDirectory>
<includes>
@@ -32,18 +51,15 @@
<include>docs/**</include>
<include>etc/**</include>
<include>solr/**</include>
<include>build.xml</include>
<include>LICENSE*</include>
<include>CHANGES</include>
<include>KNOWN_BUGS</include>
<include>README</include>
</includes>
<!-- Exclude source code & configs (we'll copy configs below) -->
<excludes>
<exclude>src</exclude>
<exclude>config/dspace.cfg</exclude>
<exclude>config/modules/**</exclude>
</excludes>
</fileSet>
<!-- Copy over all module configs & filter them -->
<fileSet>
<outputDirectory>.</outputDirectory>
<includes>
@@ -53,6 +69,7 @@
</fileSet>
</fileSets>
<!-- Copy over the dspace.cfg & filter it -->
<files>
<file>
<source>config/dspace.cfg</source>
@@ -62,8 +79,8 @@
</files>
<!--
Still allow anyone to put a dependency into
dspace/pom.xml and have it go into lib
Still allow anyone to put a JAR dependency into
[src]/dspace/pom.xml and have it go into 'lib' directory
-->
<dependencySets>
<dependencySet>
@@ -77,13 +94,10 @@
<moduleSets>
<!--
take all jar modules in modules dir
and add them into lib
Take all jar modules in [src]/dspace/modules/ dir
and add them into 'lib' directory
-->
<moduleSet>
<excludes>
<exclude>*:war:*</exclude>
</excludes>
<includes>
<include>*:jar:*</include>
</includes>
@@ -103,8 +117,8 @@
</moduleSet>
<!--
take all war modules and explode them into
webapps
Take all war modules (in [src]/dspace/modules/) and explode them into
'webapps' directory
-->
<moduleSet>
<includes>

View File

@@ -8,6 +8,11 @@
http://www.dspace.org/license/
-->
<!--
DSpace "Binary" Release Package Assembly
This assembly creates the binary (no source code) 'zip/tarball' distribution
of DSpace which can be made available via SourceForge or similar.
-->
<assembly xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
@@ -21,7 +26,10 @@
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<!-- Select files from the parent directory (i.e. [dspace-src])-->
<directory>..</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<!-- Include the "[src]/dspace/" folder & main README/build files -->
<includes>
<include>dspace/**</include>
<include>LICENSE*</include>
@@ -30,9 +38,9 @@
<include>build.properties</include>
<include>pom.xml</include>
</includes>
<!-- Exclude any target directories or dot files -->
<excludes>
<exclude>**/target/**</exclude>
<exclude>make-release-package</exclude>
<exclude>.*</exclude>
</excludes>
</fileSet>

View File

@@ -8,6 +8,11 @@
http://www.dspace.org/license/
-->
<!--
DSpace "Source" Release Package Assembly
This assembly creates the full source code 'zip/tarball' distribution
of DSpace which can be made available via SourceForge or similar.
-->
<assembly xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
@@ -21,10 +26,12 @@
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<!-- Select files from the parent directory (i.e. [dspace-src])-->
<directory>..</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<!-- Include all files except target directories & dot files -->
<excludes>
<exclude>**/target/**</exclude>
<exclude>make-release-package</exclude>
<exclude>.*</exclude>
</excludes>
</fileSet>

36
pom.xml
View File

@@ -378,42 +378,6 @@
</modules>
</profile>
<!--
Run this profile (e.g. 'mvn package -Pdistributions') to create
zip / tarball distributions to upload to SourceForge or similar.
-->
<profile>
<id>distributions</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<inherited>false</inherited>
<configuration>
<descriptors>
<descriptor>src/main/assembly/release.xml</descriptor>
<descriptor>src/main/assembly/src-release.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
<finalName>dspace-${project.version}</finalName>
</configuration>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Skip Unit Tests by default, but allow override on command line
by setting property "-Dmaven.test.skip=false" -->
<profile>