mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
Add in the "-Denv" flag to allow users to specify a *.properties build file which is not in source control.
This provides developers with an option to create their own *.properties file instead of using build.properties.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -21,3 +21,7 @@ nbdist/
|
|||||||
nbactions.xml
|
nbactions.xml
|
||||||
nb-configuration.xml
|
nb-configuration.xml
|
||||||
META-INF/
|
META-INF/
|
||||||
|
|
||||||
|
## Ignore all *.properties file, EXCEPT build.properties (the default)
|
||||||
|
*.properties
|
||||||
|
!build.properties
|
43
pom.xml
43
pom.xml
@@ -23,7 +23,6 @@
|
|||||||
<!--Force UTF-8 encoding during build on all platforms-->
|
<!--Force UTF-8 encoding during build on all platforms-->
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<filters.file>build.properties</filters.file>
|
|
||||||
<lucene.version>3.5.0</lucene.version>
|
<lucene.version>3.5.0</lucene.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@@ -173,6 +172,38 @@
|
|||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
||||||
|
<!-- By default the main dspace.cfg file will be filtered during the build
|
||||||
|
using the "build.properties" file. This profile takes effect, unless
|
||||||
|
"-Denv" is passed in (see 'environment' profile below for more info). -->
|
||||||
|
<profile>
|
||||||
|
<id>default</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>!env</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<filters.file>build.properties</filters.file>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<!-- Users can pass in an environment flag "-Denv" to tell DSpace to use
|
||||||
|
a different properties file during its build process.
|
||||||
|
For example: "mvn package -Denv=test" would build DSpace using the
|
||||||
|
settings in "test.properties" instead of those in "build.properties" -->
|
||||||
|
<profile>
|
||||||
|
<id>environment</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<filters.file>${env}.properties</filters.file>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
|
||||||
<!-- This profile ensures that we ONLY generate the Unit Test Environment
|
<!-- This profile ensures that we ONLY generate the Unit Test Environment
|
||||||
if the testEnvironment.xml file is found. That way the 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. -->
|
is NOT built when running a 'mvn package' on a "binary" release. -->
|
||||||
@@ -383,10 +414,14 @@
|
|||||||
<profile>
|
<profile>
|
||||||
<id>skiptests</id>
|
<id>skiptests</id>
|
||||||
<activation>
|
<activation>
|
||||||
<activeByDefault>true</activeByDefault>
|
<!-- This profile should be active at all times, unless the user
|
||||||
</activation>
|
specifies a different value for "maven.test.skip" -->
|
||||||
|
<property>
|
||||||
|
<name>!maven.test.skip</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
<properties>
|
<properties>
|
||||||
<maven.test.skip>true</maven.test.skip>
|
<maven.test.skip>true</maven.test.skip>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
Reference in New Issue
Block a user