[ 
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

        

Reply via email to