You have to add databaseServer as a property in your plugin. What kind of mojo is it? Have you had a look at better builds with maven?
"Olivier Catteau" <[EMAIL PROTECTED]> skrev 31.07.2006 15:58:01: > Hi, > I would like to be able to configure my plugin with properties that are > stored in the settings.xml. > Here is a piece of my settings.xml : > > <settings> > ... > <profiles> > <profile> > <id>database-developer</id> > <activation> > <property> > <name>!database</name> > </property> > </activation> > <properties> > <databaseServer>ad_daf1</databaseServer> > <databasePort>34105</databasePort> > </properties> > </profile> > </profiles> > ... > </settings> > > > Here is a pom to test my plugin : > > <project> > <name>POM For test</name> > <build> > <plugins> > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <phase>compile</phase> > <configuration> > <tasks> > <echo>databaseServer : > ${databaseServer}</echo> > </tasks> > > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > <plugin> > <groupId>...</groupId> > <artifactId>...</artifactId> > <configuration> > <databaseServer>${databaseServer}</databaseServer> > <databasePort>${databasePort}</databasePort> > </configuration> > </plugin> > </plugins> > </build> > </project> > > If I execute my plugin, the ant task resolve the property ${databaseServer}. > But, in my mojo, I inject these properties and ${databaseServer} isn't > resolved, so my attribute databaseServer equals "${databaseServer}". > How can I do to resolve these properties in my mojo ? Do I need to > explicitely use something like the plexus ExpressionEvaluator to resolve > them (a piece of code may help me) ? > > Thanks > > Olivier