Hello all,

I have a Maven project for a webapp with a custom directory structure. For 
instance :

·         I have not test folder

·         sources are located in a ‘sources’ folder

·         web resources are located in a ‘web-resources’ folder.
When I update the project configuration, it results in a broken eclipse 
configuration :

·         a ‘src/main/webapp’ folder is automatically created, though it is not 
referenced in the POM, and is added to the web deployment assembly

·         my web resource folder (appropriately defined in the pom) is not 
added to the web deployment assembly (it is removed if it was added manually)

·         my sources folder is also ignored in the web deployment assembly, and 
also removed if it was added manually

·         a ‘src/test/java’ entry is added in the project java build path, and 
eclipse complains the folder is missing (indeed). The entry reappears if it was 
manually deleted.

It seems to me that the m2e-wtp plugins ignores the pom.xml content and just 
follows the default maven project structure.
Is there any way to make it respect the correct project structure ? And avoid 
to override the correct eclipse project settings ?

I use eclipse indigo and m2e-wtp 0.16.
Here are the relevant parts of my pom.xml :

                <build>
                               <defaultGoal>install</defaultGoal>
                               
<finalName>libra-${project.artifactId}</finalName>
                               
<sourceDirectory>${basedir}/sources/</sourceDirectory>
                               
<outputDirectory>${basedir}/target/${project.build.finalName}/WEB-INF/classes</outputDirectory>
                               <directory>${basedir}/target/</directory>

                                <resources>
                                               <resource>
                                                               
<filtering>false</filtering>
                                                               
<directory>sources</directory>
                                                               <excludes>
                                                                              
<exclude>**/*.java</exclude>
                                                               </excludes>
                                               </resource>
                               </resources>

                               <plugins>
                                               <plugin>
                                                               
<groupId>org.apache.maven.plugins</groupId>
                                                               
<artifactId>maven-war-plugin</artifactId>
                                                               
<version>2.2</version>
                                                               <configuration>
                                                                              
<webResources>
                                                                                
              <resource>
                                                                                
                              <filtering>false</filtering>
                                                                                
                              <directory>web-resources</directory>
                                                                                
                              <includes>
                                                                                
                                             <include>**.*</include>
                                                                                
                              </includes>
                                                                                
              </resource>
                                                                              
</webResources>
                                                                              
<webXml>${basedir}/web-resources/WEB-INF/web.xml</webXml>
                                                                               
<webappDirectory>${basedir}/target/${project.build.finalName}</webappDirectory>
                                                                              
<packagingExcludes>WEB-INF/lib/servlet-api*.jar</packagingExcludes>
                                                               </configuration>
                                               </plugin>
                               </plugins>
                </build>

Thanks,

-          emmanuel



Emmanuel GUITON

Ingénieur Développement
Fixe : +33 1  70 92 84 16 • Standard : +33 1 41 91 77 77

215, Avenue Georges Clemenceau • 92024 Nanterre

[cid:[email protected]]<http://www.intrinsec.com/>


[cid:[email protected]]<http://www.intrinsec.com/>
 Cliquez ici pour obtenir la dernière étude Markess sur le 
Cloud<http://www.markess.fr/demandedocument.php?refdoc=798>

<<inline: [email protected]>>

<<inline: [email protected]>>

_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to