Tests Mojo Parent

shared dependencies and plugins for the mojos

License

License

MIT
GroupId

GroupId

de.saumya.mojo
ArtifactId

ArtifactId

tests-parent-mojo
Last Version

Last Version

1.0.10
Release Date

Release Date

Type

Type

pom
Description

Description

Tests Mojo Parent
shared dependencies and plugins for the mojos

Download tests-parent-mojo

How to add to project

<!-- https://jarcasting.com/artifacts/de.saumya.mojo/tests-parent-mojo/ -->
<dependency>
    <groupId>de.saumya.mojo</groupId>
    <artifactId>tests-parent-mojo</artifactId>
    <version>1.0.10</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/de.saumya.mojo/tests-parent-mojo/
implementation 'de.saumya.mojo:tests-parent-mojo:1.0.10'
// https://jarcasting.com/artifacts/de.saumya.mojo/tests-parent-mojo/
implementation ("de.saumya.mojo:tests-parent-mojo:1.0.10")
'de.saumya.mojo:tests-parent-mojo:pom:1.0.10'
<dependency org="de.saumya.mojo" name="tests-parent-mojo" rev="1.0.10">
  <artifact name="tests-parent-mojo" type="pom" />
</dependency>
@Grapes(
@Grab(group='de.saumya.mojo', module='tests-parent-mojo', version='1.0.10')
)
libraryDependencies += "de.saumya.mojo" % "tests-parent-mojo" % "1.0.10"
[de.saumya.mojo/tests-parent-mojo "1.0.10"]

Dependencies

compile (5)

Group / Artifact Type Version
de.saumya.mojo : runit-maven-plugin maven-plugin 1.0.10
de.saumya.mojo : gem-maven-plugin jar 1.0.10
org.apache.maven : maven-plugin-api jar 3.0.3
org.apache.maven : maven-core jar 3.0.3
org.apache.maven : maven-artifact jar 3.0.3

test (1)

Group / Artifact Type Version
junit : junit jar 4.8.2

Project Modules

There are no modules declared in this project.

jruby maven plugins

Build Status

gem artifacts

there is maven repository with torquebox.org which delivers gem (only ruby and java platform) from rubygems.org as gem-artifacts. adding this repository to pom.xml (or settings.xml) enables maven to use gem-artifacts like this

<repositories>
  <repository>
    <id>rubygems-release</id>
    <url>http://rubygems-proxy.torquebox.org/releases</url>
  </repository>
</repositories>
. . .
<dependency>
  <groupId>rubygems</groupId>
  <artifactId>compass</artifactId>
  <version>0.12.2</version>
  <type>gem</type>
</dependency>

now maven will resolve the transient dependencies of the compass gem and downloads the artifact (includng the gem file) into the local repository.

the next question is how to use those artfacts:

installing gems into you project directory

just add the gem-maven-plugin in your pom and execute the 'initialize'. that will install the gem artfacts and its depdencencies into 'target/rubygems'

<build>
  <plugins>
    <plugin>
      <groupId>de.saumya.mojo</groupId>
      <artifactId>gem-maven-plugin</artifactId>
      <version>${jruby.plugins.version}</version>
      <executions>
        <execution>
          <goals>
            <goal>initialize</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

the will added as test-resource in way that you can use them with ScriptingContainer (from jruby) - see src/test/java/org/example/javasass/JavaSassTest.java from integration tests.

example: execute bin/compass from the compass gem

add the following to you pom

<plugin>
  <groupId>de.saumya.mojo</groupId>
  <artifactId>gem-maven-plugin</artifactId>
  <version>@project.parent.version@</version>
  <executions>
    <execution>
      <goals>
        <goal>exec</goal>
      </goals>
      <phase>compile</phase>
      <configuration>
        <execArgs>${project.build.directory}/rubygems/bin/compass compile ${basedir}/src/main/webapp/resources/sass</execArgs>
      </configuration>
    </execution>
  </executions>

this will execute compass from the compass gem during the compile phase. you can further isolate the gems by moving the dependency from root level into the plugin.

<plugin>
  <groupId>de.saumya.mojo</groupId>
  <artifactId>gem-maven-plugin</artifactId>
    <version>@project.parent.version@</version>
    <executions>
      <execution>
        <goals>
          <goal>exec</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
          <execArgs>${project.build.directory}/rubygems/bin/compass compile ${basedir}/src/main/webapp/resources/sass</execArgs>
        </configuration>
      </execution>
    </executions>
    <dependencies>
      <dependency>
        <groupId>rubygems</groupId>
        <artifactId>compass</artifactId>
        <version>0.12.2</version>
        <type>gem</type>
      </dependency>
    </dependencies>
  </plugin>

see also gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin

more examples

for more example look into the integration test of the various plugins

running the intergration tests

mvn clean install -Pintegration-test -Pall

contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

meta-fu

enjoy :)

de.saumya.mojo

The TorqueBox Project

Versions

Version
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-rc4
1.0.0-rc3
1.0.0-rc2
1.0.0-rc
1.0.0-beta
0.29.4
0.29.3
0.29.2
0.29.1
0.29.0
0.28.6
0.28.5
0.28.4
0.28.3
0.28.2
0.28.1
0.28.0
0.27.0