Permalink
Browse files

Merge pull request #119 from tdonohue/DS-1343

Ds 1343 - Add parent pom.xml and build.propertiesfiles into the binary release
  • Loading branch information...
2 parents b10be85 + 7e1b535 commit a8cff6dc0ff3f053c5be5551bad185c870de8cea @tdonohue tdonohue committed Nov 1, 2012
View
@@ -18,13 +18,6 @@
<version>3.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
-
- <!--
- Builds Overlay Modules for DSpace
- -->
- <modules>
- <module>modules</module>
- </modules>
<build>
<filters>
@@ -62,26 +55,88 @@
</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>
</plugin>
</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. -->
@@ -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,13 +22,27 @@
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
+ <!-- Copy src/main/config/build.xml to resulting directory -->
<fileSet>
<directory>src/main/config</directory>
<outputDirectory>.</outputDirectory>
<includes>
<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>
@@ -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">
@@ -17,25 +22,28 @@
<format>tar.gz</format>
<format>tar.bz2</format>
</formats>
- <includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>${finalName}-release</baseDirectory>
+ <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>
+ <include>LICENSE*</include>
<include>NOTICE</include>
<include>README</include>
- <include>CHANGES</include>
- <include>KNOWN_BUGS</include>
+ <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>
</fileSets>
-</assembly>
+</assembly>
@@ -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>
Oops, something went wrong.

0 comments on commit a8cff6d

Please sign in to comment.