[2.0.x] play2-maven-plugin 1.2.0 release

910 views
Skip to first unread message

Clement Escoffier

unread,
Jul 1, 2012, 4:40:13 AM7/1/12
to play-framework
Hi, 

I'd like to announce the new play2-maven-plugin version (1.2.0). This version is available from Maven Central.

Changelog:
* Support of the latest Play Framework (2.0.2)
* Support of homebrew installation (for Mac)
* Support Maven directory structure (src/main…)
* Find the play executable from the system path

The documentation is available on http://cescoffier.github.com/maven-play2-plugin/maven/release/

Regards,

Clement

Nilanjan

unread,
Jul 2, 2012, 12:03:44 AM7/2/12
to play-fr...@googlegroups.com
Good stuff. Does it pick up changes automatically like Play/SBT does?

Nilanjan

Clement Escoffier

unread,
Jul 2, 2012, 8:26:00 AM7/2/12
to play-fr...@googlegroups.com
Hi,

For application composed by one project, yes it does.
For aggregated projects, we still have some work to do.

Regards,

Clement

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/IScdweI_eOgJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Nilanjan

unread,
Jul 2, 2012, 2:22:52 PM7/2/12
to play-fr...@googlegroups.com
Ok. great


On Monday, July 2, 2012 5:26:00 AM UTC-7, clement escoffier wrote:
Hi,

For application composed by one project, yes it does.
For aggregated projects, we still have some work to do.

Regards,

Clement
On 02.07.2012, at 06:03, Nilanjan wrote:

Good stuff. Does it pick up changes automatically like Play/SBT does?

Nilanjan

On Sunday, July 1, 2012 1:40:13 AM UTC-7, clement escoffier wrote:
Hi, 

I'd like to announce the new play2-maven-plugin version (1.2.0). This version is available from Maven Central.

Changelog:
* Support of the latest Play Framework (2.0.2)
* Support of homebrew installation (for Mac)
* Support Maven directory structure (src/main…)
* Find the play executable from the system path

The documentation is available on http://cescoffier.github.com/maven-play2-plugin/maven/release/

Regards,

Clement

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/IScdweI_eOgJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Federico Tolomei

unread,
Jul 6, 2012, 8:45:48 AM7/6/12
to play-fr...@googlegroups.com
+1

Thank you !

--
skype: effe.to

yyt0982

unread,
Jul 13, 2012, 7:06:38 AM7/13/12
to play-fr...@googlegroups.com
Do I need to integrate this module than I can use the libraries under maven ?
Is there some way to use maven librarie directly in play 2?
 
Thank you!
 

在 2012年7月1日星期日UTC+3上午11时40分13秒,clement escoffier写道:

jon hanson

unread,
Jul 17, 2012, 12:44:13 PM7/17/12
to play-fr...@googlegroups.com
Hi,

Following the instructions on the site for my play project, I have JAVA_HOME and PLAY2_HOME set, however when I try to mvn compile I get a "'java' is not recognized as an internal or external command,..." error. This is running on Windows XP and using 1.2.0 of the plugin, with Maven 2.2.1:

> mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_27
Java home: J:\java\jdk1.6.0_27\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

Here's the debug output from mvn:

[INFO] [play2:compile {execution: default-compile}]
[DEBUG] Get Play2 home from settings
[DEBUG] Using C:\jon\java\play-2.0.2\play.bat
[DEBUG] Environment built : {SpringVersion=3.0.5.RELEASE, project.version=1.0.0-SNAPSHOT, jetty.version=8.0.1.v20110908, [...], maven.javadoc.plugin.version=2.7}
'java' is not recognized as an internal or external command,
operable program or batch file.

If I just run 'java' in the same console it runs ok:

> java
Usage: java [-options] class [args...]
           (to execute a class)
[...]

Any ideas why it's failing to find java?

Jon

jon hanson

unread,
Jul 17, 2012, 12:56:39 PM7/17/12
to play-fr...@googlegroups.com
Further investigation reveals that when the play.bat script is invoked all of the env vars (including JAVA_HOME & PATH) have been removed and replaced by a bunch of Maven vars - if I add a 'set' to the play script I see this:

COMSPEC=C:\WINDOWS\system32\cmd.exe
maven.javadoc.plugin.version=2.7
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS
project.artifactId=my-project
project.build.sourceEncoding=UTF-8
project.groupId=test
project.version=1.0.0-SNAPSHOT
PROMPT=$P$G

Is this normal behaviour for a Maven plugin? How does this work for everyone else?!?

jon hanson

unread,
Jul 17, 2012, 1:00:51 PM7/17/12
to play-fr...@googlegroups.com
I'm guessing this is due to the getEnvironment() method in AbstractPlay2Mojo.java, which doesn't copy the existing env vars for the process. This seems like a bug as i can't see how it could work on Windows?

Jon
Message has been deleted
Message has been deleted

Clement Escoffier

unread,
Jul 28, 2012, 3:46:14 AM7/28/12
to play-fr...@googlegroups.com

On 24.07.2012, at 22:21, Michael Ahlers wrote:

Regarding IDE support as mentioned in the FAQ, specifically using Eclipse with Scala IDE, m2eclipse, and m2eclipse-scala. I'm trying to get this all to work with a sample Play! project using Scala. I can't seem to resolve compilation errors (in the editor) from statements like: views.html.index("Your new application is ready.").

Is it possible to make this plugin perform the compilation step that generates target/scala-2.9.1/main contents? If I clean the project (emptying target) then build (again, from the IDE), none of the Play! generated files appear there. I've tried adding executions to the play2-maven-plugin configuration.

But even when they are there (built from the command line), no approach I've tried (using build-helper-maven-plugin, and the addSource option for maven-scala-plugin) works for making that source path visible to Scala IDE.

I'm staying light on details to see if you've got any thoughts on how to make this setup work correctly. And please let me know if I should repost in another forum. Thanks in advance!

Hi,

Right now the compilation step is done during the 'compilation' phase of Maven (mvn compile). Maybe you can try to do the compilation during the generate-source phase, which is generally the one executed by IDEs. 

Regards,

Clement


(Rephrased my previous post.)

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/mIqNp5CDouMJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.

shahar kobrinsky

unread,
Aug 2, 2012, 4:08:12 AM8/2/12
to play-fr...@googlegroups.com
Thanks Clement!

Few questions though:

- i can't manage to get the conf directory changed. while doing what you suggested, the src/main/conf/application.conf is not loaded. should i direct to the specific file somehow (other then setting confDirectory as mentioned in the doc)?

- how do i start it in production?

Clement Escoffier

unread,
Aug 2, 2012, 2:50:10 PM8/2/12
to play-fr...@googlegroups.com
Hi,

On 2 août 2012, at 10:08, shahar kobrinsky wrote:

Thanks Clement!

Few questions though:

- i can't manage to get the conf directory changed. while doing what you suggested, the src/main/conf/application.conf is not loaded. should i direct to the specific file somehow (other then setting confDirectory as mentioned in the doc)?

Did you try what's said on http://cescoffier.github.com/maven-play2-plugin/maven/snapshot/structure.html. Don't forget to keep the main conf folder with an empty application.conf file. This is used a marker by play to check that it's a play application.


- how do i start it in production?

'mvn package' generate the distribution. Then, just unzip it wherever you want and start it using the 'start' command. There is no difference on this topic. 

Regards,

Clement




On Sunday, July 1, 2012 11:40:13 AM UTC+3, clement escoffier wrote:
Hi, 

I'd like to announce the new play2-maven-plugin version (1.2.0). This version is available from Maven Central.

Changelog:
* Support of the latest Play Framework (2.0.2)
* Support of homebrew installation (for Mac)
* Support Maven directory structure (src/main…)
* Find the play executable from the system path

The documentation is available on http://cescoffier.github.com/maven-play2-plugin/maven/release/

Regards,

Clement

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/hVOf-T5jxHgJ.

shahar kobrinsky

unread,
Aug 5, 2012, 3:55:19 AM8/5/12
to play-fr...@googlegroups.com

I followed the structure, and routes & assets work fine. Only the configurations are not loaded from the stated folder

Hi,

To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Clement Escoffier

unread,
Aug 6, 2012, 4:14:10 AM8/6/12
to play-fr...@googlegroups.com
Hi, which version of play are you using ? 
Could you open a bug on the Github Issue Tracker ?

Regards,

Clement

To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/7Qrsjljn6CkJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.

Marc CARRÉ

unread,
Aug 6, 2012, 11:13:24 AM8/6/12
to play-fr...@googlegroups.com
Hi,

Thank you very much for writing and maintaining this VERY useful plugin!

However, I have the same issue than "jon hanson" when I run "mvn clean install".
Play version is 2.0.3, play2-maven-plugin version is 1.2.0.

On Windows XP, having PLAY2_HOME defined and in PATH, and having JAVA_HOME defined and %JAVA_HOME%\bin in PATH:

[INFO] --- play2-maven-plugin:1.2.0:clean (default-clean) @ my-project ---
'java' is not recognized as an internal or external command,
operable program or batch file.

On Linux, having PLAY2_HOME defined and in PATH, and having JAVA_HOME defined and $JAVA_HOME/bin in PATH:

[INFO] [play2:compile {execution: default-compile}]
/path/to/play/framework/build: line 11: java: command not found
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR

Anything I am doing incorrectly?
Any workaround? Any bug fix planned?

Thanks in advance!

Cheers,

M.


On Sunday, 1 July 2012 09:40:13 UTC+1, clement escoffier wrote:

Clement Escoffier

unread,
Aug 7, 2012, 6:00:00 AM8/7/12
to play-fr...@googlegroups.com
Hi,

Could you try with java in the path ? It seems to be related to 'play' and not to the maven plugin.

Regards,

Clement

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/iYRoc74cnyoJ.

shahar kobrinsky

unread,
Aug 8, 2012, 9:19:02 AM8/8/12
to play-fr...@googlegroups.com
Thanks, opened a bug for it. Using play 2.0.2. 

any change the plugin would create a start script same as 'play dist'?
Hi,

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

shahar kobrinsky

unread,
Aug 8, 2012, 9:29:24 AM8/8/12
to play-fr...@googlegroups.com
never mind.. found it

Clement Escoffier

unread,
Aug 15, 2012, 2:52:10 PM8/15/12
to play-fr...@googlegroups.com
Hi,

Seems like there is something going wrong when calling 'play test'. Could you try to launch 'play test' and tell me if it succeeds and if not what kind of error do you get (because it should have been reported in the log).

Regards,

Clement

On 14 août 2012, at 08:10, HM <h.mount...@gmail.com> wrote:

get the following error when I do "mvn clean install"

execute-tests: java.lang.reflect.InvocationTargetException

[ERROR] Failed to execute goal de.akquinet.innovation.play2:play2-maven-plugin:1.2.0:test (default-test) on project XXX: Error during compilation: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.akquinet.innovation.play2:play2-maven-plugin:1.2.0:test (default-test) on project XXX: Error during compilation
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error during compilation
    at de.akquinet.innovation.play.maven.Play2TestMojo.execute(Play2TestMojo.java:88)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
    at de.akquinet.innovation.play.maven.Play2TestMojo.execute(Play2TestMojo.java:83)
    ... 21 more

Ubuntu 12.04 LTS
java version 1.7.0_03
play 2.0.2
maven 3.0.4

pom.xml

...
   <repositories>
        <repository>
            <id>typesafe</id>
            <url>http://repo.typesafe.com/typesafe/releases/</url>
        </repository>
    </repositories>

    <build>
        <!-- Play source directory -->
        <sourceDirectory>app</sourceDirectory>
        <testSourceDirectory>test</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>de.akquinet.innovation.play2</groupId>
                <artifactId>play2-maven-plugin</artifactId>
                <version>1.2.0</version>
                <extensions>true</extensions>
            </plugin>
        </plugins>

    </build>
    <dependencies>
 
        <!-- Play Framework Dependencies -->
        <dependency>
            <groupId>play</groupId>
            <artifactId>play_2.9.1</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>play</groupId>
            <artifactId>play-test_2.9.1</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>
...

appreciated!



On Sunday, July 1, 2012 1:40:13 AM UTC-7, clement escoffier wrote:
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/w3UOdcl7wtsJ.
Reply all
Reply to author
Forward
0 new messages