Last active
December 23, 2015 23:59
-
-
Save mkristian/6713449 to your computer and use it in GitHub Desktop.
Mavenfile to use warbler to create the war file and replaces the maven artifact with that. the pom.xml is equivalent to the Mavenfile which got genreated by ruby-maven/tesla.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packaging :war | |
phase :package do | |
plugin 'de.saumya.mojo:jruby-maven-plugin', '1.0.0-rc3' do | |
execute_goal( :jruby, | |
:id => 'pack-war with warbler', | |
:filename => 'warble', | |
:gemUseSystem => true ) | |
execute_goal( :jruby, | |
:id => 'move war to maven build dir', | |
:script => <<EOS | |
require 'fileutils' | |
FileUtils.mv '${project.artifactId}.war', '${project.build.directory}/${project.build.finalName}.war' | |
EOS | |
) | |
end | |
end | |
# the maven-war-plugin will fail since maven specific files are not there | |
plugin :war, :failOnMissingWebXml => false | |
# tesla or ruby-maven will dump an equivalent pom.xml | |
properties( 'tesla.dump.pom' => 'pom.xml' ) | |
# vim: syntax=Ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>dummy</groupId> | |
<artifactId>dhammapada</artifactId> | |
<version>0.0.0</version> | |
<packaging>war</packaging> | |
<name>dhammapada</name> | |
<properties> | |
<tesla.dump.pom>pom.xml</tesla.dump.pom> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>de.saumya.mojo</groupId> | |
<artifactId>jruby-maven-plugin</artifactId> | |
<version>1.0.0-rc3</version> | |
<executions> | |
<execution> | |
<id>pack-war</id> | |
<phase>package</phase> | |
<goals> | |
<goal>jruby</goal> | |
</goals> | |
<configuration> | |
<filename>warble</filename> | |
<gemUseSystem>true</gemUseSystem> | |
</configuration> | |
</execution> | |
<execution> | |
<id>move to build dir</id> | |
<phase>package</phase> | |
<goals> | |
<goal>jruby</goal> | |
</goals> | |
<configuration> | |
<script> | |
require 'fileutils' | |
FileUtils.mv '${project.artifactId}.war', '${project.build.directory}/${project.build.finalName}.war' | |
</script> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-war-plugin</artifactId> | |
<configuration> | |
<failOnMissingWebXml>false</failOnMissingWebXml> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment