You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Yang, Gang CTR USA" <ga...@us.army.mil> on 2009/09/30 16:09:09 UTC

String manipulation in POM?

Hi,

Is there a way to manipulate strings, such as extract portion of a
property content, in POM?

Thanks,
Gang

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: String manipulation in POM?

Posted by "Edelson, Justin" <Ju...@mtvstaff.com>.
Not directly. But you can use the gmaven plugin for this type of thing.
Something like this:
            <plugin>
                <groupId>org.codehaus.groovy.maven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.0-rc-5</version>
                <executions>
                    <execution>
                        <id>setup-groovy</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>
                                project.properties["newproperty"] =
project.artifactId.substring(1);
                            </source>
                        </configuration>
                    </execution>
                </executions>
            </plugin> 

Justin

-----Original Message-----
From: Yang, Gang CTR USA [mailto:gang.yang@us.army.mil] 
Sent: Wednesday, September 30, 2009 10:09 AM
To: users@maven.apache.org
Subject: String manipulation in POM?

Hi,

Is there a way to manipulate strings, such as extract portion of a
property content, in POM?

Thanks,
Gang

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org