You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Todorov (JIRA)" <ji...@codehaus.org> on 2012/07/04 09:33:21 UTC

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Martin Todorov created MWAR-283:
-----------------------------------

             Summary: The war plugin copies resources defined as <webResources> over to src/main/webapp
                 Key: MWAR-283
                 URL: https://jira.codehaus.org/browse/MWAR-283
             Project: Maven 2.x WAR Plugin
          Issue Type: Bug
    Affects Versions: 2.2
         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
Maven home: /java/apache/maven-3.0.4
Java version: 1.7.0_05, vendor: Oracle Corporation
Java home: /java/jdk1.7.0_05/jre
Default locale: en_US, platform encoding: ISO-8859-1
OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"

            Reporter: Martin Todorov


I have the following setup:

{code}
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1</version>
        <configuration>
                <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
                <warSourceExcludes>assets</warSourceExcludes>

                <failOnMissingWebXml>false</failOnMissingWebXml>
                <webResources>
                        <resource>
                                <!-- this is relative to the pom.xml directory -->
                                <directory>${project.build.directory}/minified</directory>
                        </resource>
                </webResources>
        </configuration>
</plugin>
{code}

The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Posted by "Stephen Williams (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=306027#comment-306027 ] 

Stephen Williams commented on MWAR-283:
---------------------------------------

Any update on this?
                
> The war plugin copies resources defined as <webResources> over to src/main/webapp
> ---------------------------------------------------------------------------------
>
>                 Key: MWAR-283
>                 URL: https://jira.codehaus.org/browse/MWAR-283
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
> Maven home: /java/apache/maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: /java/jdk1.7.0_05/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"
>            Reporter: Martin Todorov
>
> I have the following setup:
> {code}
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>                 <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
>                 <warSourceExcludes>assets</warSourceExcludes>
>                 <failOnMissingWebXml>false</failOnMissingWebXml>
>                 <webResources>
>                         <resource>
>                                 <!-- this is relative to the pom.xml directory -->
>                                 <directory>${project.build.directory}/minified</directory>
>                         </resource>
>                 </webResources>
>         </configuration>
> </plugin>
> {code}
> The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Posted by "Stephen Williams (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302758#comment-302758 ] 

Stephen Williams commented on MWAR-283:
---------------------------------------

Also, it should copy them after the source is copied 
                
> The war plugin copies resources defined as <webResources> over to src/main/webapp
> ---------------------------------------------------------------------------------
>
>                 Key: MWAR-283
>                 URL: https://jira.codehaus.org/browse/MWAR-283
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
> Maven home: /java/apache/maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: /java/jdk1.7.0_05/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"
>            Reporter: Martin Todorov
>
> I have the following setup:
> {code}
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>                 <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
>                 <warSourceExcludes>assets</warSourceExcludes>
>                 <failOnMissingWebXml>false</failOnMissingWebXml>
>                 <webResources>
>                         <resource>
>                                 <!-- this is relative to the pom.xml directory -->
>                                 <directory>${project.build.directory}/minified</directory>
>                         </resource>
>                 </webResources>
>         </configuration>
> </plugin>
> {code}
> The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309729#comment-309729 ] 

Dennis Lundberg commented on MWAR-283:
--------------------------------------

Martin,

This is the expected behavior. You have configured {{webappDirectory}} to point to your source directory. {{webappDirectory}} is the *target*, as can be seen in the documentation
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#webappDirectory
                
> The war plugin copies resources defined as <webResources> over to src/main/webapp
> ---------------------------------------------------------------------------------
>
>                 Key: MWAR-283
>                 URL: https://jira.codehaus.org/browse/MWAR-283
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
> Maven home: /java/apache/maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: /java/jdk1.7.0_05/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"
>            Reporter: Martin Todorov
>
> I have the following setup:
> {code}
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>                 <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
>                 <warSourceExcludes>assets</warSourceExcludes>
>                 <failOnMissingWebXml>false</failOnMissingWebXml>
>                 <webResources>
>                         <resource>
>                                 <!-- this is relative to the pom.xml directory -->
>                                 <directory>${project.build.directory}/minified</directory>
>                         </resource>
>                 </webResources>
>         </configuration>
> </plugin>
> {code}
> The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MWAR-283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MWAR-283.
--------------------------------

    Resolution: Not A Bug
    
> The war plugin copies resources defined as <webResources> over to src/main/webapp
> ---------------------------------------------------------------------------------
>
>                 Key: MWAR-283
>                 URL: https://jira.codehaus.org/browse/MWAR-283
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
> Maven home: /java/apache/maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: /java/jdk1.7.0_05/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"
>            Reporter: Martin Todorov
>
> I have the following setup:
> {code}
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>                 <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
>                 <warSourceExcludes>assets</warSourceExcludes>
>                 <failOnMissingWebXml>false</failOnMissingWebXml>
>                 <webResources>
>                         <resource>
>                                 <!-- this is relative to the pom.xml directory -->
>                                 <directory>${project.build.directory}/minified</directory>
>                         </resource>
>                 </webResources>
>         </configuration>
> </plugin>
> {code}
> The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Posted by "Martin Todorov (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302723#comment-302723 ] 

Martin Todorov commented on MWAR-283:
-------------------------------------

I have also tried it with the 2.2 version of the plugin and it also fails.
                
> The war plugin copies resources defined as <webResources> over to src/main/webapp
> ---------------------------------------------------------------------------------
>
>                 Key: MWAR-283
>                 URL: https://jira.codehaus.org/browse/MWAR-283
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
> Maven home: /java/apache/maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: /java/jdk1.7.0_05/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"
>            Reporter: Martin Todorov
>
> I have the following setup:
> {code}
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>                 <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
>                 <warSourceExcludes>assets</warSourceExcludes>
>                 <failOnMissingWebXml>false</failOnMissingWebXml>
>                 <webResources>
>                         <resource>
>                                 <!-- this is relative to the pom.xml directory -->
>                                 <directory>${project.build.directory}/minified</directory>
>                         </resource>
>                 </webResources>
>         </configuration>
> </plugin>
> {code}
> The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Posted by "Stephen Williams (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309732#comment-309732 ] 

Stephen Williams edited comment on MWAR-283 at 9/25/12 6:06 PM:
----------------------------------------------------------------

oh
                
      was (Author: alta189):
    That is dumb. Resources are things you don't want in the actual source.
                  
> The war plugin copies resources defined as <webResources> over to src/main/webapp
> ---------------------------------------------------------------------------------
>
>                 Key: MWAR-283
>                 URL: https://jira.codehaus.org/browse/MWAR-283
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
> Maven home: /java/apache/maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: /java/jdk1.7.0_05/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"
>            Reporter: Martin Todorov
>
> I have the following setup:
> {code}
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>                 <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
>                 <warSourceExcludes>assets</warSourceExcludes>
>                 <failOnMissingWebXml>false</failOnMissingWebXml>
>                 <webResources>
>                         <resource>
>                                 <!-- this is relative to the pom.xml directory -->
>                                 <directory>${project.build.directory}/minified</directory>
>                         </resource>
>                 </webResources>
>         </configuration>
> </plugin>
> {code}
> The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-283) The war plugin copies resources defined as over to src/main/webapp

Posted by "Stephen Williams (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309732#comment-309732 ] 

Stephen Williams commented on MWAR-283:
---------------------------------------

That is dumb. Resources are things you don't want in the actual source.
                
> The war plugin copies resources defined as <webResources> over to src/main/webapp
> ---------------------------------------------------------------------------------
>
>                 Key: MWAR-283
>                 URL: https://jira.codehaus.org/browse/MWAR-283
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
> Maven home: /java/apache/maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: /java/jdk1.7.0_05/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux", version: "2.6.36.2", arch: "amd64", family: "unix"
>            Reporter: Martin Todorov
>
> I have the following setup:
> {code}
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1</version>
>         <configuration>
>                 <webappDirectory>${basedir}/src/main/webapp</webappDirectory>
>                 <warSourceExcludes>assets</warSourceExcludes>
>                 <failOnMissingWebXml>false</failOnMissingWebXml>
>                 <webResources>
>                         <resource>
>                                 <!-- this is relative to the pom.xml directory -->
>                                 <directory>${project.build.directory}/minified</directory>
>                         </resource>
>                 </webResources>
>         </configuration>
> </plugin>
> {code}
> The contents of the ${project.build.directory}/minified is being copied over to ${basedir}/src/main/webapp which is unexpected. The <webResources/> should not be copied, but -- rather -- simply be added to the final war.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira