[mevenide-dev] [jira] Commented: (MEVENIDE-609) filtering of web resources crashes web application build in NetBeans

"Grzegorz Borkowski (JIRA)" <jira-yCVjj/[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.mevenide.devel
Message-ID <4648970.1203696149041.JavaMail.haus-jira@codehaus01.managed.contegix.com>
    [ http://jira.codehaus.org/browse/MEVENIDE-609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124680 ] 

Grzegorz Borkowski commented on MEVENIDE-609:
---------------------------------------------

Ok I know what you mean.
I did it, it works: build is successful. So the path in webResources is really related to pom.xml, not current dir. 

Maven version: 2.0.8
Java version: 1.6.0_03
OS name: "linux" version: "2.6.22-14-generic" arch: "i386" Family: "unix"


> filtering of web resources crashes web application build in NetBeans
> --------------------------------------------------------------------
>
>                 Key: MEVENIDE-609
>                 URL: http://jira.codehaus.org/browse/MEVENIDE-609
>             Project: mevenide
>          Issue Type: Bug
>          Components: mevenide-netbeans
>    Affects Versions: NB_3.0
>         Environment: Netbeans 6.0; both Windows and Linux
>            Reporter: Grzegorz Borkowski
>            Assignee: Milos Kleint
>            Priority: Critical
>             Fix For: NB_3.0
>
>
> Steps to reproduce:
> - create new Maven project bases on web application archetype
> - clean and build from IDE - should build ok
> - add filtering of web resources (e.g. for replacing project version in web pages), by adding following snippet in pom.xml:
> <project ...>
>   ...
>   <build>
>     <finalName>...</finalName>
>     <plugins>
>             <plugin>
>                 <artifactId>maven-war-plugin</artifactId>
>                 <configuration>
>                     <!-- replaces ${project.version} in web pages with real version during build -->
>                     <webResources>
>                         <resource>
>                             <directory>src/main/webapp</directory>
>                             <filtering>true</filtering>
>                         </resource>
>                     </webResources>
>                 </configuration>
>             </plugin>
>         </plugins>
>   </build>
> </project>
> - clean and build the project from IDE: build fails at war:war with following message: FATAL ERROR basedir src/main/webapp does not exist
> - do the same from command line, build succeeds, and filtering works.
> I don't understand what's wrong with IDE, why it fails. Perhaps it uses different base dir for building, than pom.xml directory. However, according to documentation http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html, the path to web resources is always relative to pom.xml, so base dir should not have any effect.
> I cannot find any workaround for this. Simply if  I want to have filtering of web pages, it will never build in NetBeans!

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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.