Skip to content

Instantly share code, notes, and snippets.

@miura
Created November 8, 2012 13:00
Show Gist options
  • Select an option

  • Save miura/4038656 to your computer and use it in GitHub Desktop.

Select an option

Save miura/4038656 to your computer and use it in GitHub Desktop.
Maven-Scala with ImageJ
<?xml version="1.0" encoding="UTF-8"?>
<!-- >
This pom.xml is for running Scala Script with ImageJ.
run the script with the following command.
mvn scala:script
<-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>1.19</version>
</parent>
<groupId>de.embl.cmci</groupId>
<artifactId>testscript</artifactId>
<name>test-scala-ij-script</name>
<description></description>
<!--> repos: ImageJ release + scala tools <-->
<repositories>
<repository>
<id>imagej.releases</id>
<url>http://maven.imagej.net/content/repositories/releases</url>
</repository>
<repository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<!-- <url>http://scala-tools.org/repo-releases</url> -->
<url>http://oss.sonatype.org/content/groups/scala-tools</url>
</repository>
</repositories>
<!--> plugin repo: Maven - Scala <-->
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<!-- <url>http://scala-tools.org/repo-releases</url> -->
<url>http://oss.sonatype.org/content/groups/scala-tools</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
<version>${imagej1.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.9.2</version>
</dependency>
<!-- <dependency>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
</dependency> -->
</dependencies>
<!--> build environment<-->
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>script</goal>
</goals>
</execution>
</executions>
<!-- to set the exact version
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
-->
<!-- if you want write script here
<configuration>
<script>
println ("Hello from pom.xml")
</script>
</configuration>
-->
<!-- or set the script file name here
<configuration>
<scriptFile>helloscript.scala</scriptFile>
</configuration>
-->
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment