If you want to do stuff like externalize plug-in configs etc i.e.
properties that are interpolated post initialization.

I tried that out with surefire and it worked for me.

e.g.

build.properties:

skip.my.tests=true

pom:

<project>
        [...]
        <build>
                <plugins>
                        [...]
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
 
<artifactId>properties-maven-plugin</artifactId>
                                <version>1.0-SNAPSHOT</version>
                                <executions>
                                        <execution>
                                        <phase>initialize</phase>
                                        <goals>
                                                        <goal>
        
read-project-properties
                                                        </goal>
                                        </goals>
                                <configuration>
                                                <files>
                                                <file>
        
${basedir}/build.properties
                                                        </file>
                                                </files>
                                </configuration>
                                 </execution>
                                </executions>
                        </plugin>
                        <plugin>
        
<groupId>org.apache.maven.plugins</groupId>
        
<artifactId>maven-surefire-plugin</artifactId>
                                <version>2.4.2</version>
                                <configuration>
        
<skipTests>${skip.my.tests}</skipTests>
                                </configuration>
                </plugin>
                        [...]
                </plugins>
        </build>
        [...]
</project>


-----Original Message-----
From: Stephen Connolly [mailto:[EMAIL PROTECTED] 
Sent: 10 December 2008 16:27
To: Maven Users List
Subject: Re: something like 'ant -propertyfile ...'

And beware... it will not do what you will want it to do!

If the properties you want to substitute are ones that need to be
resolved
before starting the lifecycle, then that plugin is of no use to you...

-Stephen

2008/12/10 Adam Leggett <[EMAIL PROTECTED]>

> I've never used it, but there is properties-maven-plugin in the mojo
> sandbox.
>
> http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/index.html
>
>
> You'll have to build it first I guess:
>
> https://svn.codehaus.org/mojo/trunk/sandbox/properties-maven-plugin/
>
> Adam
>
> -----Original Message-----
> From: Torsten Werner [mailto:[EMAIL PROTECTED]
> Sent: 10 December 2008 14:22
> To: Maven Users List
> Subject: something like 'ant -propertyfile ...'
>
> Hi,
>
> does maven support something like the command line option
> -propertyfile as in ant that allows overriding properties in a more
> compact way than multiple -Dkey=value options?
>
> Cheers,
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to