preslavrachev / maven-play-plugin

Automatically exported from code.google.com/p/maven-play-plugin
0 stars 0 forks source link

Support "application.conf" inclusions ("@include.xxx=another.conf") #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1.
application.conf:
@include.base=application_filtered.conf

application_filtered.conf:
http.port=2999
jpda.port=1999

2. play run
output(ok): 
Listening for transport dt_socket at address: 1999
......
15:16:16,468 INFO  ~ Listening for HTTP on port 2999 

3.maven play:run
output(dt_socket error): 
 [play] Listening for transport dt_socket at address: 8000
......
 [play] 15:18:41,599 INFO  ~ Listening for HTTP on port 2999 (Waiting a first request to start)

expect output:
dt_socket:1999

-------------------------------
maven-play-plugin : 1.0.0-beta6
os : windows 7
play : 1.2.5

-------------------------------
pom.xml : 

<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">

    <parent>
        <groupId>com.google.code.maven-play-plugin</groupId>
        <artifactId>play-app-default-parent</artifactId>
        <version>1.0.0-beta6</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>study</groupId>
    <artifactId>study.play.maven</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>play</packaging>

    <name>Play! Framework Maven Test Project</name>

    <build>
        <sourceDirectory>app</sourceDirectory>
        <testSourceDirectory>test</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>com.google.code.maven-play-plugin</groupId>
                <artifactId>play-maven-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>

Original issue reported on code.google.com by che...@gmail.com on 18 Oct 2013 at 7:24

GoogleCodeExporter commented 9 years ago
Plugin does not use Play.readConfiguration() method, it has it's own 
configuration reader which does not support includes. I will fix it ASAP.

Original comment by gslowiko...@gmail.com on 18 Oct 2013 at 2:44

GoogleCodeExporter commented 9 years ago
Something to read:

https://groups.google.com/forum/#!topic/play-framework/pHBwp1WGVwo
http://jimmenard.blogspot.com/2010/07/play-framework-configuration.html
http://play.lighthouseapp.com/projects/57987/tickets/1472-better-handling-of-inc
lude-in-python-parsing-of-applicationconf

From the first link: "This feature is not yet documented because it is not 
ready"

Original comment by gslowiko...@gmail.com on 18 Oct 2013 at 3:11

GoogleCodeExporter commented 9 years ago
Thank you, I have been converted to maven resource filter, no longer need to 
"@include"

Original comment by che...@gmail.com on 28 Oct 2013 at 2:18

GoogleCodeExporter commented 9 years ago
Python version of configuration parser ("PlayConfParser" class in 
"framework/pym/play/application.py" file) behaves very differently from the 
Java one ("play.Play.readConfiguration()" method). It does even not retain 
inclusions order.

I wanted to emulate this parser, but it did not make sense, so I copied Java 
version of the parser (with slightly modified exception handling):

http://code.google.com/p/maven-play-plugin/source/detail?r=11736

Original comment by gslowiko...@gmail.com on 27 Dec 2013 at 4:02

GoogleCodeExporter commented 9 years ago
New 1.0.0-beta7-SNAPSHOT deployed.

Original comment by gslowiko...@gmail.com on 27 Dec 2013 at 4:05