Skip to content

Commit

Permalink
Showing 2 changed files with 68 additions and 59 deletions.
54 changes: 26 additions & 28 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -287,43 +287,41 @@
end
end

unless ENV['JRUBY_NO_ANT']

jruby_bin_config = [ 'run', { :id => 'copy',
'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'
}
} } ]
copy_goal = [:exec, :executable => '/bin/sh', :arguments => ['-c', 'cp ${jruby.basedir}/bin/jruby.bash ${jruby.basedir}/bin/jruby']]

profile :clean do
activation do
# hack to get the os triggeer into the model
os = org.apache.maven.model.ActivationOS.new
os.family = 'unix'
@current.os = os
end

phase :clean do
plugin :antrun do
execute_goals( *jruby_bin_config )
plugin 'org.codehaus.mojo:exec-maven-plugin' do
execute_goals( *copy_goal )
end
end
end

profile 'jruby.bash' do
profile 'jruby.bash' do

activation do
file( :missing => '../bin/jruby' )
end
activation do
file( :missing => '../bin/jruby' )
end
activation do
# hack to get the os triggeer into the model
os = org.apache.maven.model.ActivationOS.new
os.family = 'unix'
@current.os = os
end

phase :initialize do
plugin :antrun do
execute_goals( *jruby_bin_config )
end
phase :initialize do
plugin 'org.codehaus.mojo:exec-maven-plugin' do
execute_goals *copy_goal
end

end

end

jni_config = [ 'unpack', { :id => 'unzip native',
73 changes: 42 additions & 31 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -625,26 +625,6 @@ DO NOT MODIFIY - GENERATED CODE
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>clean</phase>
<goals>
<goal>run</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>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
@@ -938,30 +918,61 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
</profile>
<profile>
<id>clean</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>/bin/sh</executable>
<arguments>
<argument>-c</argument>
<argument>cp ${jruby.basedir}/bin/jruby.bash ${jruby.basedir}/bin/jruby</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jruby.bash</id>
<activation>
<file>
<missing>../bin/jruby</missing>
</file>
<os>
<family>unix</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>run</goal>
<goal>exec</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>
<executable>/bin/sh</executable>
<arguments>
<argument>-c</argument>
<argument>cp ${jruby.basedir}/bin/jruby.bash ${jruby.basedir}/bin/jruby</argument>
</arguments>
</configuration>
</execution>
</executions>

0 comments on commit 170c9ae

Please sign in to comment.