Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] [GMaven] How do I reference properties in a local
script?

Clifton

2008-08-05

Replies: Find Java Web Hosting

Author LoginPost Reply

Trying to use GMaven from a pom and I hit a snag. I have the following pom
configs for gmaven:
            <configuration>
              <source>${project.basedir}/compile.groovy</source>
              <properties>
               
<outputDir>${project.build.directory}/out</outputDir>
               
<midletName>${project.build.finalName}</midletName>
                <sourceDirs>
                  <sources>
                    <source>src</source>
                    <source>gensrc</source>
                  </sources>
                </sourceDirs>
              </properties>
            </configuration>

In my compile.groovy script I have:
Map config = [project: project, sourceDirs:properties.sourceDirs,
midletName:properties.midletName,
    outputDir:properties.outputDir]
println config

and all of the properties are printing null. I've tried accessing the
properties directly without the "properties." prefix and I get No such
Property exceptions. Help!

-----
Cliff
http://codeforfun.wordpress.com
http://www.nabble.com/file/u156847/Cliff-in-the-lab.png
--
Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.