Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit a8cff6dc0ff3f053c5be5551bad185c870de8cea 2 parents b10be85 + 7e1b535
@tdonohue tdonohue authored
View
75 dspace/pom.xml
@@ -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,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
42 dspace/src/assemble/assembly.xml → dspace/src/main/assembly/assembly.xml
@@ -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
20 src/main/assembly/release.xml → dspace/src/main/assembly/release.xml
@@ -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>
View
9 src/main/assembly/src-release.xml → dspace/src/main/assembly/src-release.xml
@@ -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>
View
149 pom.xml
@@ -117,27 +117,7 @@
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/testEnvironment.xml</descriptor>
- </descriptors>
- <filters>
- <filter>src/main/filters/testEnvironment.properties</filter>
- </filters>
- </configuration>
- </execution>
- </executions>
- <inherited>false</inherited>
- </plugin>
- <plugin>
+ <plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
@@ -187,26 +167,67 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>
</plugins>
</build>
<profiles>
- <!--
+ <!-- This profile ensures that we ONLY generate the Unit Test Environment
+ if the testEnvironment.xml file is found. That way the Test Environment
+ is NOT built when running a 'mvn package' on a "binary" release. -->
+ <profile>
+ <id>generate-test-env</id>
+ <activation>
+ <file>
+ <exists>src/main/assembly/testEnvironment.xml</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <!-- This plugin builds the testEnvironment.zip package
+ based on the specifications in testEnvironment.xml -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/testEnvironment.xml</descriptor>
+ </descriptors>
+ <filters>
+ <filter>src/main/filters/testEnvironment.properties</filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+
+ <!--
These profiles activate the inclusion of various modules into
the DSpace Build process. They activate automatically if the
source module is in the local file system, correctly located
relative to this file.
-->
- <!--
- Builds central API for DSpace
+ <!--
+ Builds DSpace "Assembly & Configuration" project
-->
<profile>
<id>dspace</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace</module>
@@ -219,7 +240,9 @@
<profile>
<id>dspace-api</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-api/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-api</module>
@@ -232,7 +255,9 @@
<profile>
<id>dspace-services</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-services/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-services</module>
@@ -245,7 +270,9 @@
<profile>
<id>dspace-oai</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-oai/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-oai</module>
@@ -256,10 +283,11 @@
Builds JSPUI WAR for DSpace
-->
<profile>
-
<id>dspace-jspui</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-jspui/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-jspui</module>
@@ -273,7 +301,9 @@
<profile>
<id>dspace-sword</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-sword/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-sword</module>
@@ -286,7 +316,9 @@
<profile>
<id>dspace-swordv2</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-swordv2/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-swordv2</module>
@@ -299,7 +331,9 @@
<profile>
<id>dspace-xmlui</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-xmlui/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-xmlui</module>
@@ -312,7 +346,9 @@
<profile>
<id>dspace-lni</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <file>
+ <exists>dspace-lni/pom.xml</exists>
+ </file>
</activation>
<modules>
<module>dspace-lni</module>
@@ -342,49 +378,12 @@
</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 tests by default, but allow override
- on command line by setting property "-Dmaven.test.skip"-->
- <!-- Disabled by default, change activeByDefault to true to enable -->
+ <!-- Skip Unit Tests by default, but allow override on command line
+ by setting property "-Dmaven.test.skip=false" -->
<profile>
<id>skiptests</id>
<activation>
- <activeByDefault>false</activeByDefault>
+ <activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
Please sign in to comment.
Something went wrong with that request. Please try again.