You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Jungwirth (JIRA)" <ji...@codehaus.org> on 2007/01/27 00:58:44 UTC
[jira] Created: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
-------------------------------------------------------------------------------------------------
Key: MWAR-89
URL: http://jira.codehaus.org/browse/MWAR-89
Project: Maven 2.x War Plugin
Issue Type: Bug
Affects Versions: 2.0.2
Reporter: Paul Jungwirth
Priority: Minor
I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
<project>
...
<properties>
<something.url>http://anywhere.com/</something.url>
<another.property>whatever</another.property>
</properties>
...
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</builg>
</project>
Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
Thanks,
Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Marat Radchenko (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_105095 ]
Marat Radchenko commented on MWAR-89:
-------------------------------------
I've encountered this error too. It is easy to workaround but very annoying :(
To reproduce:
mvn archetype:create -DgroupId=sample.group.id -DartifactId=sample-artifact-id -DarchetypeArtifactId=maven-archetype-webapp && cd sample-artifact-id && echo 'test=${test.url}' > src/main/resources/test.properties
then manually add this to <build> into pom.xml:
{code:xml}
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>test.properties</include>
</includes>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
{code}
And then run
mvn war:exploded && cat target/sample-artifact-id/WEB-INF/test.properties
you'll see test=http://maven.apache.org which is absolutely incorrect.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Priority: Minor
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Paul Jungwirth (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_86110 ]
Paul Jungwirth commented on MWAR-89:
------------------------------------
Oops, I mistyped the title for this bug. It should read:
filtering ${something.url} ignores my property value and writes http://maven.apache.org/aardvark
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Priority: Minor
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90339 ]
Stephane Nicoll commented on MWAR-89:
-------------------------------------
does not make much sense to add src/main/resources as a webresource since it's already handled by the resources plugin. Anyway, I'll try to reproduce this one. If you have a test case that would help.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Priority: Minor
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_111144 ]
Stephane Nicoll commented on MWAR-89:
-------------------------------------
Jochen, your proposal sounds good to me. If you can provide a patch, it would be nice.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2, 2.1-alpha-1
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Priority: Minor
> Fix For: 2.1-alpha-2
>
> Attachments: example.zip
>
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88128 ]
Jochen Wiedmann commented on MWAR-89:
-------------------------------------
The reason for this bug is in the use of the "CompositeMap" for filtering. The "CompositeMap" is basically a special Map, which works like this:
- Query the Project in a "magic" way for the property. If something non-null is returned, that's the result value.
- Otherwise, query the projects properties and return the result.
The "magic" way is implemented by a utility class called ReflectionValueExtractor. The first thing this class does is removing any part of the property name until and including a dot. In other words, the lookup for "something.url" becomes a lookup for "url". That's of course a valid value. In other words, a possible workaround is to change your property name to "something_url" and everything should work fine.
I find the behaviour of ReflectionValueExtractor (or the use of it) quite questionable. Basically this means that ${whatever.foo} becomes ${project.foo}. In other words, the use of the dot (which is quite common if not recommended in property names) becomes almost imopssible.
I'd recommend to
- change the implementation of CompositeMap so that it accepts an array of Maps, rather than two Maps.
- Instantiate the CompositeMap with the following values, in that order:
project.getProperties()
ReflectionMap(project)
System.getProperties()
I am ready to provide a patch, should I know that my suggestion will be accepted.
my re
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Priority: Minor
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_111236 ]
Stephane Nicoll commented on MWAR-89:
-------------------------------------
excellent :) Will have a look to it tonight.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2, 2.1-alpha-1
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Fix For: 2.1-alpha-2
>
> Attachments: example.zip, MWAR-89.patch
>
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephane Nicoll updated MWAR-89:
--------------------------------
Priority: Major (was: Minor)
Affects Version/s: 2.1-alpha-1
Fix Version/s: 2.1-alpha-2
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2, 2.1-alpha-1
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Fix For: 2.1-alpha-2
>
> Attachments: example.zip
>
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Paul Jungwirth (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88136 ]
Paul Jungwirth commented on MWAR-89:
------------------------------------
Ah, thank you for explaining what's going on.
If I understand correctly, CompositeMap implements Map and takes two Maps for its constructor. In that case, if it's too hard to patch CompositeMap, you could just do this, right?:
CompositeMap m1, m2;
m1 = new CompositeMap(project.getProperties(), new ReflectionMap(project));
m2 = new CompositeMap(m1, System.getProperties());
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Priority: Minor
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Earl Marwil (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_110345 ]
Earl Marwil commented on MWAR-89:
---------------------------------
I encountered this bug while attempting to create profiles for development, testing, and production. The difference in these profiles is in specification of the database driver, url, and credentials. If I set up the filtering in the build element in the pom, the filtering works fine and my jdbc.properties file is situated in WEB-INF/classes. If instead, I want the jdbc.properties file in WEB-INF/conf, the same filter applied in the maven-war-plugin behaves as described in this issue, namely, the project.url gets substituted for ${jdbc.url} rather than the value specified for jdbc.url defined in my filter.
I am attaching a minimal project that reproduces these observations in my environment (Linux, Maven 2.0.7, Java 1.5.0_13, and maven-war-plugin-2.0.2.jar). I built with the command:
{noformat}
mvn clean compile war:exploded
{noformat}
I have found a couple of other potentially related issues, MWAR-96 and MRESOURCES-20. I wonder if there is some dependency misalignment in the plugins. So far I have been unsuccessful in building the maven-war-plugin from SVN since I keep getting failures on the tests.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Priority: Minor
> Attachments: example.zip
>
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Wiedmann updated MWAR-89:
--------------------------------
Attachment: MWAR-89.patch
Your wish is my command, Stephen. :-)
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2, 2.1-alpha-1
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Fix For: 2.1-alpha-2
>
> Attachments: example.zip, MWAR-89.patch
>
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90345 ]
Jochen Wiedmann commented on MWAR-89:
-------------------------------------
The problem is by no means related to using src/main/resources. I observe this in src/main/filtered-webapp.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Assigned To: Stephane Nicoll
> Priority: Minor
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88141 ]
Jochen Wiedmann commented on MWAR-89:
-------------------------------------
That looks like a very nice simplification. :-)
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Priority: Minor
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Earl Marwil (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Earl Marwil updated MWAR-89:
----------------------------
Attachment: example.zip
Example from previous post.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Priority: Minor
> Attachments: example.zip
>
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MWAR-89) filtering ${something.url} ignores my
property value and writes http://maven.apache.org/something
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephane Nicoll closed MWAR-89.
-------------------------------
Resolution: Fixed
Hey, applied :)
We really need to share the filtering functionality. It's a mess that is not the case yet.
> filtering ${something.url} ignores my property value and writes http://maven.apache.org/something
> -------------------------------------------------------------------------------------------------
>
> Key: MWAR-89
> URL: http://jira.codehaus.org/browse/MWAR-89
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2, 2.1-alpha-1
> Reporter: Paul Jungwirth
> Assignee: Stephane Nicoll
> Fix For: 2.1-alpha-2
>
> Attachments: example.zip, MWAR-89.patch
>
>
> I have a multimodule build, and one of the modules is a war. That module has an artifactId of "aardvark." This is aardvark's pom:
> <project>
> ...
> <properties>
> <something.url>http://anywhere.com/</something.url>
> <another.property>whatever</another.property>
> </properties>
> ...
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </builg>
> </project>
> Inside src/main/resources, I have a file that includes both ${something.url} and ${another.property}. But when I run maven, ${another.property} is filtered correctly, while ${something.url} becomes "http://maven.apache.org/aardvark." It ignores my value and writes a URL to apache.org instead, appending the artifactId. Weird, huh? This seems to happen with any property that ends in ".url." Is this supposed to be a feature? I've never seen it documented anywhere.
> Thanks,
> Paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira