You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Roshan A. Punnoose" <rp...@proteus-technologies.com> on 2007/10/24 18:27:05 UTC
Maven profile properties
I am trying to get my profiles to use the properties specified by the
POM. Is this possible? I have a POM that looks like:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
...
<properties>
<script>scripts/myScript.js</script>
<engine>ruby</engine>
</properties>
<profiles>
<profile>
<id>javascriptEngine</id>
<activation>
<property>
<name>engine</name>
<value>javascript</value>
</property>
</activation>
</profile>
<profile>
<id>jrubyEngine</id>
<activation>
<property>
<name>engine</name>
<value>ruby</value>
</property>
</activation>
...
For some reason the jrubyEngine profile does not get activated. (I can
tell by which dependencies get copied) Do I have to use this syntax:
${project.properties.engine}?
Roshan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Maven profile properties
Posted by "Roshan A. Punnoose" <rp...@proteus-technologies.com>.
Hi,
I want to create document templates and use Maven to fill in the
properties in the template during a task. For example:
Template.txt:
Dir=${basedir}
systemPath = ${systemPath}
Then run a maven command to output the the text document to a directory
and fill in these tokens. Sort of like filterTokens in Ant.
Roshan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Maven profile properties
Posted by "Roshan A. Punnoose" <rp...@proteus-technologies.com>.
>From reading the documentation it looks like the
profile/activation/property only looks at system properties. Is it
possible to use a project property?
Roshan
-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com]
Sent: Wednesday, October 24, 2007 12:27 PM
To: Maven Users List
Subject: Maven profile properties
I am trying to get my profiles to use the properties specified by the
POM. Is this possible? I have a POM that looks like:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
...
<properties>
<script>scripts/myScript.js</script>
<engine>ruby</engine>
</properties>
<profiles>
<profile>
<id>javascriptEngine</id>
<activation>
<property>
<name>engine</name>
<value>javascript</value>
</property>
</activation>
</profile>
<profile>
<id>jrubyEngine</id>
<activation>
<property>
<name>engine</name>
<value>ruby</value>
</property>
</activation>
...
For some reason the jrubyEngine profile does not get activated. (I can
tell by which dependencies get copied) Do I have to use this syntax:
${project.properties.engine}?
Roshan
---------------------------------------------------------------------
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