Skip to content

Commit

Permalink
Showing 2 changed files with 36 additions and 26 deletions.
31 changes: 14 additions & 17 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -274,31 +274,28 @@
end
end

# TODO clean happens so often with me that this makes no sense. a copy
# always is as good. just keep it as it is for now.
copy_jruby_bash = [ :copy,
{ :sourceFile => '${jruby.basedir}/bin/jruby.bash',
:destinationFile => '${jruby.basedir}/bin/jruby' } ]
profile 'jruby.bash' do

activation do
file( :missing => '../bin/jruby' )
end

plugin :antrun do
execute_goals( 'run',
:id => 'copy',
:phase => 'initialize',
'tasks' => {
'exec' => {
'@executable' => '/bin/sh',
'@osfamily' => 'unix',
'arg' => {
'@line' => '-c \'cp "${jruby.basedir}/bin/jruby.bash" "${jruby.basedir}/bin/jruby"\''
}
},
'chmod' => {
'@file' => '${jruby.basedir}/bin/jruby',
'@perm' => '755'
}
} )
phase :initialize do
plugin 'com.coderplus.maven.plugins:copy-rename-maven-plugin' do
execute_goal( *copy_jruby_bash )
end
end
end

phase :clean do
plugin 'com.coderplus.maven.plugins:copy-rename-maven-plugin', '1.0.1' do
execute_goal( *copy_jruby_bash )
end
end

profile 'native' do
31 changes: 22 additions & 9 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -597,6 +597,23 @@ DO NOT MODIFIY - GENERATED CODE
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${jruby.basedir}/bin/jruby.bash</sourceFile>
<destinationFile>${jruby.basedir}/bin/jruby</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
@@ -874,21 +891,17 @@ DO NOT MODIFIY - GENERATED CODE
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
<goal>copy</goal>
</goals>
<configuration>
<tasks>
<exec executable="/bin/sh" osfamily="unix">
<arg line="-c 'cp &quot;${jruby.basedir}/bin/jruby.bash&quot; &quot;${jruby.basedir}/bin/jruby&quot;'" />
</exec>
<chmod file="${jruby.basedir}/bin/jruby" perm="755" />
</tasks>
<sourceFile>${jruby.basedir}/bin/jruby.bash</sourceFile>
<destinationFile>${jruby.basedir}/bin/jruby</destinationFile>
</configuration>
</execution>
</executions>

0 comments on commit 426f36e

Please sign in to comment.