|
Re: Control published files and folders in app classes folder in wtpwebapps [message #742610 is a reply to message #742539] |
Thu, 20 October 2011 16:49 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
It would appear that your project has a Java Source folder whose output
is mapped to the root of the project. This has the side effect of
making most everything in your project appear as build output to WTP,
causing to be included in the Web application. You should be able to
correct this on the Source tab of the Java Build Path page in the
project's Properties dialog.
I don't use maven or m2eclipse, so I can't say how well m2eclipse keeps
the Dynamic Web Project's configuration in sync with how it will build
the war. For this project, it appears some manual intervention is
required so that WTP will assemble the Web application with the same
resources that the maven build will.
Cheers,
Larry
On 10/20/2011 11:32 AM, Mahmoud Saleh wrote:
> hi, i am using eclipse helios 3.6.1 and WTP 3.2 with tomcat 7
> and i am using maven 2 as build tool, m2eclipse plugin
> when trying to run project on server, i get endless exceptions
> this is opposite to running my project from maven tomcat plugin,
> everything works very fine
>
> so i compared between the extracted war in target folder generated in my
> project (workspace/project/target/warFolder/classes)
>
> and the extracted war in (wtpwebapps/myapp/WEB-INF/classes)
>
> and here are the contents:
>
> 1- (workspace/project/target/warFolder/classes) contents:
>
> com
> messages
> MET-INF
> import.sql
> log4j.properties
>
> 2- (wtpwebapps/myapp/WEB-INF/classes)
>
> com
> messages
> MET-INF
> import.sql
> log4j.properties
>
> settings
> src
> target
> classpath
> project
> file.txt
> pom.xml
>
> BTW, the published project folder contain only one folder which is
> WEB-INF and it doesn't contain resources folder (styles-images-scripts)
> and doesn't contain the META_INF too.
> why it generates those additional unneeded folders?
> when i remove those additional folders and try to run project on server
> from eclipse it runs fine
>
> so question is how to control eclipse not to generate those folders, and
> why i get them in first place.
>
>
> UPDATE: POM file plugins
>
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.6</source>
> <target>1.6</target>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-dependency-plugin</artifactId>
> <executions>
> <execution>
> <id>install</id>
> <phase>install</phase>
> <goals>
> <goal>sources</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.5</version>
> <configuration>
> <encoding>UTF-8</encoding>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.tomcat.maven</groupId>
> <artifactId>tomcat7-maven-plugin</artifactId>
> <version>2.0-SNAPSHOT</version>
> <configuration>
> <path>/${project.build.finalName}</path>
> </configuration>
> </plugin>
> </plugins>
|
|
|
|
|
|
Re: Control published files and folders in app classes folder in wtpwebapps [message #753050 is a reply to message #742539] |
Wed, 26 October 2011 16:08 |
Mahmoud Saleh Messages: 23 Registered: September 2011 |
Junior Member |
|
|
one more question please:
what's the default (Web Deployment Assembly) packaging structure for Java EE Web Application project ?
following structure, is what i have right now, and works fine with me, do you have any comments or feedback about this structure ?
Source: /src/main/java Deploy Path: WEB-INF/classes
Source: /src/main/resources Deploy Path: WEB-INF/classes
Source: /src/main/webapp Deploy Path: /
Source: /src/test/java Deploy Path: WEB-INF/classes
Source: Maven Dependencies Deploy Path: WEB-INF/lib
BTW sometimes Maven Dependencies gets removed from the Web Deployment Assembly, specially when updating project configuration, any ideas why ?
[Updated on: Wed, 26 October 2011 16:17] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02213 seconds