Permalink
Browse files

Improves profiles management for building

The build now require a profile to be defined for each axis.
Updates README.md accordingly.
  • Loading branch information...
1 parent 3906775 commit 7b0fa2470c684bb32e8bf7a6930a6d8e8822efcf @skyluc skyluc committed Feb 28, 2013
Showing with 114 additions and 76 deletions.
  1. +24 −17 README.md
  2. +3 −1 build.sh
  3. +1 −1 org.scala-ide.play2/META-INF/MANIFEST.MF
  4. +86 −57 pom.xml
View
@@ -1,29 +1,36 @@
-scala-ide-plugin.g8
-===================
+# Scala IDE plugin for Play 2.x
-Giger8 template for Eclipse plugins based on the Scala IDE.
+This is an extension to Scala IDE to support Play 2.x routes and template files.
-This template produces 5 Eclipse plugins:
+For user documentation, check the [wiki](https://github.com/scala-ide/scala-ide-play2/wiki).
-* the plugin itself
-* the `plugin.tests` fragment
+## Project structure
+
+The project is composed of 5 Eclipse plugins:
+
+* the core plugin
+* the test plugin
* an Eclipse feature
* an Eclipse source feature
* an Eclipse update-site
-The projects can readily be imported inside Eclipse. Additionally, you have maven `pom` files
-based on Tycho, enabling command line builds.
+The projects can be imported inside Scala IDE. And they are fully configured to be compiled with maven and tycho.
-## Note:
+## Building
-There is no default profile. You need to specify a profile manually, choosing what version
-of the Scala IDE and Scala compiler you want to build against:
+The maven build is configured using a combination of 3 profiles:
-* `scala-ide-milestone-indigo-scala-2.9`
-* `scala-ide-milestone-juno-scala-2.9`
-* `scala-ide-milestone-indigo-scala-2.10`
-* `scala-ide-milestone-juno-scala-2.10`
+* An Eclipse platform profile:
+ * `eclipse-indigo`
+ * `eclipse-juno`
+* A Scala version profile:
+ * `scala-2.9.x`
+ * `scala-2.10.x`
+* A Scala IDE version profile:
+ * `scala-ide-nightly`
+ * `scala-ide-dev`
+ * `scala-ide-stable` (not available yet)
-Run maven like this:
+After choosing the flavor you wish to build, maven is run using:
- mvn -P scala-ide-milestone-juno-scala-2.10 clean install
+ mvn -Peclipse-juno -Pscala-2.10.x -Pscala-ide-dev clean package
View
@@ -1 +1,3 @@
-mvn -P scala-ide-milestone-juno-scala-2.10 clean install
+#!/bin/bash
+
+mvn -Peclipse-juno -Pscala-2.10.x -Pscala-ide-dev clean package
@@ -23,7 +23,7 @@ Require-Bundle:
org.eclipse.ui.ide,
org.scala-ide.scala.library,
org.scala-ide.scala.compiler,
- org.scala-ide.sdt.core;bundle-version="[2.1.0,2.2.0)",
+ org.scala-ide.sdt.core,
org.eclipse.core.resources,
scalariform,
org.eclipse.core.filesystem
View
143 pom.xml
@@ -31,93 +31,101 @@
<!-- fixed versions -->
<tycho.version>0.15.0</tycho.version>
<scala.plugin.version>3.1.0</scala.plugin.version>
+ <junit.version>4.10</junit.version>
<!-- tycho test related -->
<tycho.test.OSspecific></tycho.test.OSspecific>
<!-- Partial workaround against JDT Weaving deadlocks. See #1000317 and the original ticket on https://issuetracker.springsource.com/browse/STS-1445 -->
<tycho.test.weaving>-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dosgi.classloader.lock=classname</tycho.test.weaving>
<tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.headless ${tycho.test.weaving} ${tycho.test.OSspecific}</tycho.test.jvmArgs>
- <!-- dependencies repos -->
- <eclipse.codename>indigo</eclipse.codename>
- <repo.eclipse>${repo.eclipse.indigo}</repo.eclipse>
- <repo.ajdt>${repo.ajdt.indigo}</repo.ajdt>
+ <!-- properties which need to be defined -->
+ <!-- linked to Eclipse version -->
+ <eclipse.codename>Select an Eclipse profile !</eclipse.codename>
+ <repo.eclipse>Select an Eclipse profile !</repo.eclipse>
+ <repo.ajdt>Select an Eclipse profile !</repo.ajdt>
+ <weaving.hook.plugin.version>Select an Eclipse profile !</weaving.hook.plugin.version>
+ <ecosystem-eclipse-version>Select an Eclipse profile !</ecosystem-eclipse-version>
+
+ <!-- linked to Scala version -->
+ <scala.version>Select a Scala profile !</scala.version>
+ <version.suffix>Select a Scala profile !</version.suffix>
+ <scala.version.short>Select a Scala profile !</scala.version.short>
+ <!-- play version depend on Scala version. 2.9.x -> 2.0.x, 2.10.x -> 2.1.x !-->
+ <play.artifactId>Select a Scala profile !</play.artifactId>
+ <play.version>Select a Scala profile !</play.version>
+ <templates.artifactId>Select a Scala profile !</templates.artifactId>
+ <templates.version>Select a Scala profile !</templates.version>
+ <scala.io.core.artifactId>Select a Scala profile !</scala.io.core.artifactId>
+ <scala.io.core.version>Select a Scala profile !</scala.io.core.version>
+ <scala.io.file.artifactId>Select a Scala profile !</scala.io.file.artifactId>
+ <scala.io.file.version>Select a Scala profile !</scala.io.file.version>
+ <scala.arm.groupId>Select a Scala profile !</scala.arm.groupId>
+ <scala.arm.artifactId>Select a Scala profile !</scala.arm.artifactId>
+ <scala.arm.version>Select a Scala profile !</scala.arm.version>
+
+ <!-- linked to Scala IDE version -->
+ <repo.scala-ide>Select a Scala IDE profile !</repo.scala-ide>
- <!-- some default values, can be overwritten by profiles -->
- <scala.version>2.9.3-SNAPSHOT</scala.version>
- <version.suffix>2_09</version.suffix>
- <scala.version.short>2.9</scala.version.short>
+ <!-- other -->
<version.tag>local</version.tag>
- <weaving.hook.plugin.version>1.0.200.I20120427-0800</weaving.hook.plugin.version>
- <repo.scala-ide>${repo.scala-ide.root}/sdk/e37/scala29/dev/site</repo.scala-ide>
- <junit.version>4.10</junit.version>
- <play.artifactId>play_2.9.2</play.artifactId>
- <play.version>2.1-09142012</play.version>
- <templates.artifactId>templates_2.9.2</templates.artifactId>
- <templates.version>2.1-09142012</templates.version>
- <scala.io.core.artifactId>scala-io-core_2.9.2</scala.io.core.artifactId>
- <scala.io.core.version>0.4.1</scala.io.core.version>
- <scala.io.file.artifactId>scala-io-file_2.9.2</scala.io.file.artifactId>
- <scala.io.file.version>0.4.1</scala.io.file.version>
- <scala.arm.groupId>com.github.jsuereth.scala-arm</scala.arm.groupId>
- <scala.arm.artifactId>scala-arm_2.9.1</scala.arm.artifactId>
- <scala.arm.version>1.1</scala.arm.version>
</properties>
<profiles>
<profile>
- <!-- this is the default profile, for the latest Scala IDE build -->
- <!-- it is using the default values for the properties -->
- <!-- latest Scala IDE build, Eclipse Indigo, Scala 2.9 -->
- <id>scala-ide-milestone-indigo-scala-2.9</id>
+ <id>eclipse-indigo</id>
+ <properties>
+ <eclipse.codename>indigo</eclipse.codename>
+ <repo.eclipse>${repo.eclipse.indigo}</repo.eclipse>
+ <repo.ajdt>${repo.ajdt.indigo}</repo.ajdt>
+ <weaving.hook.plugin.version>1.0.200.I20120427-0800</weaving.hook.plugin.version>
+ <ecosystem-eclipse-version>e37</ecosystem-eclipse-version>
+ <nightly-eclipse-version>3.0.x</nightly-eclipse-version><!-- strange but right -->
+ </properties>
</profile>
+
<profile>
- <!-- latest Scala IDE build, Eclipse Juno, Scala 2.9 -->
- <id>scala-ide-milestone-juno-scala-2.9</id>
+ <id>eclipse-juno</id>
<properties>
<eclipse.codename>juno</eclipse.codename>
<repo.eclipse>${repo.eclipse.juno}</repo.eclipse>
<repo.ajdt>${repo.ajdt.juno}</repo.ajdt>
<weaving.hook.plugin.version>1.0.200.v20120524-1707</weaving.hook.plugin.version>
- <repo.scala-ide>${repo.scala-ide.root}/sdk/e38/scala29/dev/site</repo.scala-ide>
+ <ecosystem-eclipse-version>e38</ecosystem-eclipse-version>
+ <nightly-eclipse-version>juno</nightly-eclipse-version>
</properties>
</profile>
+
<profile>
- <!-- latest Scala IDE build, Eclipse Indigo, Scala 2.10 -->
- <id>scala-ide-milestone-indigo-scala-2.10</id>
+ <id>scala-2.9.x</id>
<properties>
- <eclipse.codename>juno</eclipse.codename>
- <repo.eclipse>${repo.eclipse.indigo}</repo.eclipse>
- <repo.ajdt>${repo.ajdt.indigo}</repo.ajdt>
- <scala.version>2.10.0</scala.version>
- <version.suffix>2_10</version.suffix>
- <scala.version.short>2.10</scala.version.short>
- <repo.scala-ide>${repo.scala-ide.root}/sdk/e37/scala210/dev/site</repo.scala-ide>
- <play.artifactId>play_2.10</play.artifactId>
- <play.version>2.1.0</play.version>
- <templates.artifactId>templates_2.10</templates.artifactId>
- <templates.version>2.1.0</templates.version>
- <scala.io.core.artifactId>scala-io-core_2.10</scala.io.core.artifactId>
- <scala.io.core.version>0.4.2</scala.io.core.version>
- <scala.io.file.artifactId>scala-io-file_2.10</scala.io.file.artifactId>
- <scala.io.file.version>0.4.2</scala.io.file.version>
- <scala.arm.groupId>com.jsuereth</scala.arm.groupId>
- <scala.arm.artifactId>scala-arm_2.10</scala.arm.artifactId>
- <scala.arm.version>1.3</scala.arm.version>
+ <scala.version>2.9.3-RC2</scala.version>
+ <version.suffix>2_09</version.suffix>
+ <scala.version.short>2.9</scala.version.short>
+ <ecosystem-scala-version>29</ecosystem-scala-version>
+
+ <play.artifactId>play_2.9.2</play.artifactId>
+ <play.version>2.1-09142012</play.version>
+ <templates.artifactId>templates_2.9.2</templates.artifactId>
+ <templates.version>2.1-09142012</templates.version>
+ <scala.io.core.artifactId>scala-io-core_2.9.2</scala.io.core.artifactId>
+ <scala.io.core.version>0.4.1</scala.io.core.version>
+ <scala.io.file.artifactId>scala-io-file_2.9.2</scala.io.file.artifactId>
+ <scala.io.file.version>0.4.1</scala.io.file.version>
+ <scala.arm.groupId>com.github.jsuereth.scala-arm</scala.arm.groupId>
+ <scala.arm.artifactId>scala-arm_2.9.1</scala.arm.artifactId>
+ <scala.arm.version>1.1</scala.arm.version>
</properties>
</profile>
+
<profile>
- <!-- latest Scala IDE build, Eclipse Juno, Scala 2.10 -->
- <id>scala-ide-milestone-juno-scala-2.10</id>
+ <id>scala-2.10.x</id>
<properties>
- <eclipse.codename>juno</eclipse.codename>
- <repo.eclipse>${repo.eclipse.juno}</repo.eclipse>
- <repo.ajdt>${repo.ajdt.juno}</repo.ajdt>
- <scala.version>2.10.0</scala.version>
+ <scala.version>2.10.1-RC2</scala.version>
<version.suffix>2_10</version.suffix>
<scala.version.short>2.10</scala.version.short>
- <weaving.hook.plugin.version>1.0.200.v20120524-1707</weaving.hook.plugin.version>
- <repo.scala-ide>${repo.scala-ide.root}/sdk/e38/scala210/dev/site</repo.scala-ide>
+ <ecosystem-scala-version>210</ecosystem-scala-version>
+
<play.artifactId>play_2.10</play.artifactId>
<play.version>2.1.0</play.version>
<templates.artifactId>templates_2.10</templates.artifactId>
@@ -132,6 +140,27 @@
</properties>
</profile>
+ <profile>
+ <id>scala-ide-nightly</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/nightly-scala-ide-${nightly-eclipse-version}-${ecosystem-scala-version}x</repo.scala-ide>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>scala-ide-dev</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/${ecosystem-eclipse-version}/scala${ecosystem-scala-version}/dev/site</repo.scala-ide>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>scala-ide-stable (not available yet)</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/${ecosystem-eclipse-version}/scala${ecosystem-scala-version}/stable/site</repo.scala-ide>
+ </properties>
+ </profile>
+
<profile>
<!-- some configuration for tests run by tycho on Mac OS -->
<id>macOs</id>

0 comments on commit 7b0fa24

Please sign in to comment.