You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Julian Wood (JIRA)" <ji...@codehaus.org> on 2006/05/18 19:24:40 UTC

[jira] Created: (MWAR-40) War plugin doesn't honour warSourceDirectory properly anymore

War plugin doesn't honour warSourceDirectory properly anymore
-------------------------------------------------------------

         Key: MWAR-40
         URL: http://jira.codehaus.org/browse/MWAR-40
     Project: Maven 2.x War Plugin
        Type: Bug

    Versions: 2.0.1    
 Environment: osx 10.4.6, java 1.4.2_06
    Reporter: Julian Wood


I have many released projects which won't build properly anymore because of this regression.

The problem is that if you filter resources to a special dir, and then make that special dir the warSourceDirectory, it doesn't use those filtered files. You just get the original, unfiltered files.

An example pom:

 <build>
    <resources>
      ...
      <resource>
        <targetPath>../filtered-webapp-resources</targetPath>
        <filtering>true</filtering>
        <directory>${basedir}/src/main/webapp</directory>
        <includes>
          <include>**/log4j.txt</include>
          <include>**/web.xml</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>war</goal>
            </goals>
            <configuration>
              <warSourceDirectory>${project.build.directory}/filtered-webapp-resources</warSourceDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

While ${project.build.directory}/filtered-webapp-resources has all the correctly filtered resource files, the war plugin seems to ignore its warSourceDirectory.

-- 
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-40) War plugin doesn't honour warSourceDirectory properly anymore

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-40?page=all ]

Brett Porter updated MWAR-40:
-----------------------------

        Version:     (was: 2.0.1)
                 2.0
    Fix Version: 2.0.1

> War plugin doesn't honour warSourceDirectory properly anymore
> -------------------------------------------------------------
>
>          Key: MWAR-40
>          URL: http://jira.codehaus.org/browse/MWAR-40
>      Project: Maven 2.x War Plugin
>         Type: Bug

>     Versions: 2.0
>  Environment: osx 10.4.6, java 1.4.2_06
>     Reporter: Julian Wood
>      Fix For: 2.0.1

>
>
> I have many released projects which won't build properly anymore because of this regression.
> The problem is that if you filter resources to a special dir, and then make that special dir the warSourceDirectory, it doesn't use those filtered files. You just get the original, unfiltered files.
> An example pom:
>  <build>
>     <resources>
>       ...
>       <resource>
>         <targetPath>../filtered-webapp-resources</targetPath>
>         <filtering>true</filtering>
>         <directory>${basedir}/src/main/webapp</directory>
>         <includes>
>           <include>**/log4j.txt</include>
>           <include>**/web.xml</include>
>         </includes>
>       </resource>
>     </resources>
>     <plugins>
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <executions>
>           <execution>
>             <goals>
>               <goal>war</goal>
>             </goals>
>             <configuration>
>               <warSourceDirectory>${project.build.directory}/filtered-webapp-resources</warSourceDirectory>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>     </plugins>
>   </build>
> While ${project.build.directory}/filtered-webapp-resources has all the correctly filtered resource files, the war plugin seems to ignore its warSourceDirectory.

-- 
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-40) War plugin doesn't honour warSourceDirectory properly anymore

Posted by "Edwin Punzalan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-40?page=comments#action_65846 ] 

Edwin Punzalan commented on MWAR-40:
------------------------------------

This took me a while... heheh

You should use this instead for your plugin configuration:

{code}
<plugins>
  <plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
    <warSourceDirectory>${project.build.directory}/filtered-webapp-resources</warSourceDirectory>
    </configuration>
  </plugin>
</plugins>
{code}

if you put it in goals, then the war plugin gets executed twice.... One with the correct warSourceDirectory and the other with the unmodified warSourceDirectory (which points to src/main/webapp) and would mostly overwrite the contents of the other since their outputDirectory is the same.

If you'll look at the output of your build, you'll see two executions of the war plugin,

[war:war]
    and
[war:war{execution: default}]


> War plugin doesn't honour warSourceDirectory properly anymore
> -------------------------------------------------------------
>
>          Key: MWAR-40
>          URL: http://jira.codehaus.org/browse/MWAR-40
>      Project: Maven 2.x War Plugin
>         Type: Bug

>     Versions: 2.0
>  Environment: osx 10.4.6, java 1.4.2_06
>     Reporter: Julian Wood
>     Assignee: Edwin Punzalan
>      Fix For: 2.0.1

>
>
> I have many released projects which won't build properly anymore because of this regression.
> The problem is that if you filter resources to a special dir, and then make that special dir the warSourceDirectory, it doesn't use those filtered files. You just get the original, unfiltered files.
> An example pom:
>  <build>
>     <resources>
>       ...
>       <resource>
>         <targetPath>../filtered-webapp-resources</targetPath>
>         <filtering>true</filtering>
>         <directory>${basedir}/src/main/webapp</directory>
>         <includes>
>           <include>**/log4j.txt</include>
>           <include>**/web.xml</include>
>         </includes>
>       </resource>
>     </resources>
>     <plugins>
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <executions>
>           <execution>
>             <goals>
>               <goal>war</goal>
>             </goals>
>             <configuration>
>               <warSourceDirectory>${project.build.directory}/filtered-webapp-resources</warSourceDirectory>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>     </plugins>
>   </build>
> While ${project.build.directory}/filtered-webapp-resources has all the correctly filtered resource files, the war plugin seems to ignore its warSourceDirectory.

-- 
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-40) War plugin doesn't honour warSourceDirectory properly anymore

Posted by "Edwin Punzalan (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-40?page=all ]
     
Edwin Punzalan closed MWAR-40:
------------------------------

    Resolution: Cannot Reproduce

> War plugin doesn't honour warSourceDirectory properly anymore
> -------------------------------------------------------------
>
>          Key: MWAR-40
>          URL: http://jira.codehaus.org/browse/MWAR-40
>      Project: Maven 2.x War Plugin
>         Type: Bug

>     Versions: 2.0
>  Environment: osx 10.4.6, java 1.4.2_06
>     Reporter: Julian Wood
>     Assignee: Edwin Punzalan
>      Fix For: 2.0.1

>
>
> I have many released projects which won't build properly anymore because of this regression.
> The problem is that if you filter resources to a special dir, and then make that special dir the warSourceDirectory, it doesn't use those filtered files. You just get the original, unfiltered files.
> An example pom:
>  <build>
>     <resources>
>       ...
>       <resource>
>         <targetPath>../filtered-webapp-resources</targetPath>
>         <filtering>true</filtering>
>         <directory>${basedir}/src/main/webapp</directory>
>         <includes>
>           <include>**/log4j.txt</include>
>           <include>**/web.xml</include>
>         </includes>
>       </resource>
>     </resources>
>     <plugins>
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <executions>
>           <execution>
>             <goals>
>               <goal>war</goal>
>             </goals>
>             <configuration>
>               <warSourceDirectory>${project.build.directory}/filtered-webapp-resources</warSourceDirectory>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>     </plugins>
>   </build>
> While ${project.build.directory}/filtered-webapp-resources has all the correctly filtered resource files, the war plugin seems to ignore its warSourceDirectory.

-- 
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-40) War plugin doesn't honour warSourceDirectory properly anymore

Posted by "Edwin Punzalan (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-40?page=all ]

Edwin Punzalan updated MWAR-40:
-------------------------------

    Fix Version:     (was: 2.0.1)

> War plugin doesn't honour warSourceDirectory properly anymore
> -------------------------------------------------------------
>
>          Key: MWAR-40
>          URL: http://jira.codehaus.org/browse/MWAR-40
>      Project: Maven 2.x War Plugin
>         Type: Bug

>     Versions: 2.0
>  Environment: osx 10.4.6, java 1.4.2_06
>     Reporter: Julian Wood
>     Assignee: Edwin Punzalan

>
>
> I have many released projects which won't build properly anymore because of this regression.
> The problem is that if you filter resources to a special dir, and then make that special dir the warSourceDirectory, it doesn't use those filtered files. You just get the original, unfiltered files.
> An example pom:
>  <build>
>     <resources>
>       ...
>       <resource>
>         <targetPath>../filtered-webapp-resources</targetPath>
>         <filtering>true</filtering>
>         <directory>${basedir}/src/main/webapp</directory>
>         <includes>
>           <include>**/log4j.txt</include>
>           <include>**/web.xml</include>
>         </includes>
>       </resource>
>     </resources>
>     <plugins>
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <executions>
>           <execution>
>             <goals>
>               <goal>war</goal>
>             </goals>
>             <configuration>
>               <warSourceDirectory>${project.build.directory}/filtered-webapp-resources</warSourceDirectory>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>     </plugins>
>   </build>
> While ${project.build.directory}/filtered-webapp-resources has all the correctly filtered resource files, the war plugin seems to ignore its warSourceDirectory.

-- 
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