Maybe you can use a profile in your pom to modify the maven-compiler-plugin configuration? http://maven.apache.org/guides/introduction/introduction-to-profiles.html
/Anders On Tue, May 26, 2009 at 17:34, emerson cargnin <[email protected]> wrote: > Hi > > I need to set the jdk via command line, but having a way to use a default one. > > In maven one I used:maven.compile.source and maven.compile.target property > > In maven 2 I found at this page: > http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerArgument > > It tells: > source The -source argument for the Java compiler. > > * Type: java.lang.String > * Required: No > * Expression: ${maven.compiler.source} > > Does it mean that the maven.compiler.source can be used as a property > from the mvn command line? > I tried that , but it didn't work. > > I know I can also set in the compiler plugin via > > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <source>${my.property}</source> > <target>${my.property}</target> > </configuration> > </plugin> > </plugins> > > But then I would need to force everyone to add the property? > > emerson > > --------------------------------------------------------------------- > 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]
