Skip to content

Commit

Permalink
[build] omit the Properties Maven Plugin if there is no build.propert…
Browse files Browse the repository at this point in the history
…ies [skip ci]
  • Loading branch information
mkristian committed Dec 16, 2014
1 parent 23690ec commit 20b95a5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 30 deletions.
25 changes: 16 additions & 9 deletions core/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,6 @@
} )
end

plugin 'org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2' do
execute_goals( 'read-project-properties',
:id => 'properties',
:phase => 'initialize',
'files' => [ '${jruby.basedir}/default.build.properties',
'${jruby.basedir}/build.properties' ],
'quiet' => 'true' )
end

plugin 'org.codehaus.mojo:buildnumber-maven-plugin:1.2' do
execute_goals( 'create',
:id => 'jruby-revision',
Expand Down Expand Up @@ -350,6 +341,22 @@

end

profile 'build.properties' do

activation do
file( :exits => '../build.properties' )
end

plugin 'org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2' do
execute_goals( 'read-project-properties',
:id => 'properties',
:phase => 'initialize',
'files' => [ '${jruby.basedir}/build.properties' ],
'quiet' => 'true' )
end

end

profile 'tzdata' do

activation do
Expand Down
51 changes: 30 additions & 21 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,27 +343,6 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<id>properties</id>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${jruby.basedir}/default.build.properties</file>
<file>${jruby.basedir}/build.properties</file>
</files>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
Expand Down Expand Up @@ -1122,6 +1101,36 @@
<maven.test.skip>false</maven.test.skip>
</properties>
</profile>
<profile>
<id>build.properties</id>
<activation>
<file />
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<id>properties</id>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${jruby.basedir}/build.properties</file>
</files>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>tzdata</id>
<activation>
Expand Down

0 comments on commit 20b95a5

Please sign in to comment.