You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by adrien ruffie <ad...@hotmail.fr> on 2012/11/16 15:28:52 UTC

Exclude wb-resources into eclipse from maven

Hello all,

 

I have the following pom.xml:

 

<build>

<!--         <sourceDirectory>${basedir}/src/main/java</sourceDirectory> -->

 
<outputDirectory>${basedir}/${target.dir}/classes</outputDirectory>

             <plugins>

                    <plugin>

                           <groupId>org.apache.maven.plugins</groupId>

                           <artifactId>maven-compiler-plugin</artifactId>

                           <version>2.3.2</version>

                           <configuration>

                                  <source>1.6</source>

                                  <target>1.6</target>

                                  <encoding>UTF-8</encoding>

                           </configuration>

                    </plugin>

                   <plugin>

                          <groupId>org.apache.maven.plugins</groupId>

                          <artifactId>maven-eclipse-plugin</artifactId>

                          <version>2.9</version>

                          <configuration>

                                 <sourceExcludes>

                                       <sourceExclude>bin</sourceExclude>

 
<sourceExclude>deploy.jars</sourceExclude>

                                       <sourceExclude>lib</sourceExclude>

                                       <sourceExclude>res</sourceExclude>

                                       <sourceExclude>target</sourceExclude>

 
<sourceExclude>WebContent</sourceExclude>

                                 </sourceExcludes>

                                 <additionalProjectnatures>

 
<projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>

 
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnatu
re>

 
<projectnature>org.eclipse.wst.jsdt.core.jsNature</projectnature>

                            </additionalProjectnatures>

                            <buildcommands>

 
<buildcommand>org.eclipse.wst.jsdt.core.javascriptValidator</buildcommand>

 
<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>

 
<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcomman
d>

 
<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>

                            </buildcommands>

                            <projectnatures>

 
<projectnature>org.eclipse.jdt.core.javanature</projectnature>

 
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectna
ture>

                                  </projectnatures>

 
<projectNameTemplate>Head2</projectNameTemplate>

                                  <wtpContextName>Head2</wtpContextName>

                                 <wtpversion>2.0</wtpversion>

                                 <wtpmanifest>true</wtpmanifest>

                                 <wtpapplicationxml>true</wtpapplicationxml>

                          </configuration>

                   </plugin>

 

But when I import into Eclipse, I have the following:
.settings/org.eclipse.wst.common.component

 

<?xml version="1.0" encoding="UTF-8"?>

<project-modules id="moduleCoreId" project-version="1.5.0">

  <wb-module deploy-name="Head2">

    <property name="context-root" value="Head2"/>

    <property name="java-output-path"
value="/src/main/webapp/edealCRM/WEB-INF/classes"/>

        <wb-resource deploy-path="/" source-path="src/main/webapp/head"/>

        <wb-resource deploy-path="/" source-path="src/main/webapp/head "/>

        <wb-resource deploy-path="/WEB-INF/classes"
source-path="src/main/java"/>

        <wb-resource deploy-path="/WEB-INF/classes"
source-path="src/main/resources"/>

        <wb-resource deploy-path="/" source-path="."/>

    <dependent-module archiveName="commons-logging-1.1.1.jar"
deploy-path="/WEB-INF/lib"
handle="module:/classpath/var/M2_REPO/commons-logging/commons-logging/1.1.1/
commons-logging-1.1.1.jar">

      <dependency-type>uses</dependency-type>

    </dependent-module>

       . <Several all dependent module jar/

</project-modules>

 

Have in double: <wb-resource deploy-path="/"
source-path="src/main/webapp/head "/> how I can remove the double entry ?

And How I can remove  <wb-resource deploy-path="/" source-path="."/> entry ?

 

Thank and best regards,

 

Adrien Ruffié


RE: Exclude wb-resources into eclipse from maven

Posted by adrien ruffie <ad...@hotmail.fr>.
Thank but I don't edit by hand file in order to remove double entry ...
But now I do not have the duplicated entry, but when I try to launchmy webapp in Tomcat via Eclipse nothing happens as if the applicationwasn't deployed ... in attachment my pom.xml, log.xml (of mvn eclipse:clean eclipse:eclipsecommand) and my  org.eclipse.wst.common.component file generated with maven)
Any have know, why my webapp doesn't start/deploy when I launch my tomcat into eclipse ?

Adrien Ruffi�
Ing�nieur Production et R&D Technologique
SCJP 5, SCDJWS 5
31300 Toulouse France
0672128792



> Date: Sat, 17 Nov 2012 13:46:46 +1030
> Subject: Re: Exclude wb-resources into eclipse from maven
> From: baerrach@gmail.com
> To: users@maven.apache.org
> 
> Have you tried running with -X to see if the output is giving you any clues?
> 
> This could be a bug, but I dont use web stuff so can't tell.
> Alternatively, just edit the generated file by hand to remove the
> double entry before importing.
> 
> If you are super keen, grab the latest source, find the bug and submit
> patch via jira.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  

Re: Exclude wb-resources into eclipse from maven

Posted by Barrie Treloar <ba...@gmail.com>.
Have you tried running with -X to see if the output is giving you any clues?

This could be a bug, but I dont use web stuff so can't tell.
Alternatively, just edit the generated file by hand to remove the
double entry before importing.

If you are super keen, grab the latest source, find the bug and submit
patch via jira.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org