You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mike Dee <md...@cardeatech.com> on 2010/08/21 18:38:36 UTC

Wicket + Eclipse + Tomcat

Get started with Wicket (again) and banging my head on Eclipse and Tomcat. 
What is a typical way to setup a project (in Eclipse) so that it is easy to
test and develop (locally) in Tomcat?

Here is what I've been trying.  Install Eclipse with Tomcat integration. 
Works fine.  I can build an Eclipse Dynamic Web App.  Can write servlets and
JSPs, and debugging and developing is easy via Eclipse's Run As Server
command.

Ideally, I'd like to manually setup an Eclipse project to work with Wicket. 
But, I don't know how to get the project structure right and have the class
and HTML files copied into the resultant WAR.  So, I use Maven to create a
new web app:

mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp
-DarchetypeArtifactId=maven-archetype-webapp

and then generate Eclipse project files

mvn eclipse:eclipse

Then I import the project into Eclipse.  Problem is that the project appears
to be a Java project and not a webapp.  There is no Run As Server command.

Head hurts from the banging.  What am I doing wrong?

Mike
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2333641.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: Wicket + Eclipse + Tomcat

Posted by John Krasnay <jo...@krasnay.ca>.
On 10-08-22 08:04 PM, James Carman wrote:
> Do you have the maven plugin installed in Eclipse?  I know I needed
> that to get it to understand the mavenized web structure.  I'm not an
> Eclipse expert, but I seem to remember having to have that.

You don't need the Maven plug-in in Eclipse, and if you do have it 
installed you shouldn't need the mvn eclipse:eclipse step.

jk

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


Re: Wicket + Eclipse + Tomcat

Posted by James Carman <ja...@carmanconsulting.com>.
Do you have the maven plugin installed in Eclipse?  I know I needed
that to get it to understand the mavenized web structure.  I'm not an
Eclipse expert, but I seem to remember having to have that.

On Sun, Aug 22, 2010 at 6:25 PM, Mike Dee <md...@cardeatech.com> wrote:
>
> By "eclipse with Tomcat integration", I mean the J2EE version of Eclipse.  I
> then install Tomcat and create a "server" in Eclipse that can connect to
> Tomcat.  The "Run As Server" option is then available for "Dynamic Web
> Project" when right-clicking on the project.
>
> Here is the POM generated by Maven using the commands I listed above.
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>com.mycompany.app</groupId>
>  <artifactId>my-webapp</artifactId>
>  <packaging>war</packaging>
>  <version>1.0-SNAPSHOT</version>
>  <name>my-webapp Maven Webapp</name>
>  <url>http://maven.apache.org</url>
>  <dependencies>
>    <dependency>
>      <groupId>junit</groupId>
>      <artifactId>junit</artifactId>
>      <version>3.8.1</version>
>      <scope>test</scope>
>    </dependency>
>  </dependencies>
>  <build>
>    <finalName>my-webapp</finalName>
>  </build>
> </project>
>
> It is missing some stuff that your POM has.  Not sure if that is
> significant, although the WTP entries seem like they would be.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2334439.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Wicket + Eclipse + Tomcat

Posted by Mike Dee <md...@cardeatech.com>.
By "eclipse with Tomcat integration", I mean the J2EE version of Eclipse.  I
then install Tomcat and create a "server" in Eclipse that can connect to
Tomcat.  The "Run As Server" option is then available for "Dynamic Web
Project" when right-clicking on the project.

Here is the POM generated by Maven using the commands I listed above.

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-webapp</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>my-webapp Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <finalName>my-webapp</finalName>
  </build>
</project>
 
It is missing some stuff that your POM has.  Not sure if that is
significant, although the WTP entries seem like they would be.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2334439.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: Wicket + Eclipse + Tomcat

Posted by Michael O'Cleirigh <mi...@rivulet.ca>.
Hello,

If you are ok with using Jetty then I think the jetty:run plugin is the 
best way.

With the m2eclipse plugin 
(http://m2eclipse.sonatype.org/installing-m2eclipse.html) you are able 
to launch war artifacts directly in debug mode.

Most dynamic stack replacements work and all that is needed typically is 
a page refresh (to instantiate the new class) versus having to redeploy 
the entire app.

I've tried to get WTP to work with maven projects with little success 
but the m2eclipse and jetty:run has worked well for me for several years.

If you have a project available with a pom.xml in it you can right click 
and 'enable maven dependency management' which will active the m2eclipse 
features for it.

Regards,

Mike


> Hi, the problem is that maven project layout is totally different as what
> Eclipse Web Project layout expect, therefore there are not compatible.
>
> If you want to use Wicket+Maven+Eclipse Debug , i suggest you to used the
> Wicket QuickStart as starting point or use the maven archetype:generate to
> select the wicket archetype.
>
> After doing so, do a mvn eclipse:eclipse and import it to your workspace,
> then look inside the src/test package  a class name Start.java and do a
> "Debug as"  that class that actually  start an embedded jetty and you will
> be able to debug the application.
>
> if you want to use tomcat instead of jetty use the command mvn tomcat:run
> and set it up to listen for Remote Debugging.
>
> Check out this link for more detail:
> http://blog.kadirpekel.com/2009/11/09/debugging-through-maven-tomcat-plugin-by-eclipse/
>
>
> On Sat, Aug 21, 2010 at 1:38 PM, Mike Dee [via Apache Wicket]<
> ml-node+2333641-1697040112-65838@n4.nabble.com<ml...@n4.nabble.com>
>    
>> wrote:
>>      
>    
>> Get started with Wicket (again) and banging my head on Eclipse and Tomcat.
>>   What is a typical way to setup a project (in Eclipse) so that it is easy to
>> test and develop (locally) in Tomcat?
>>
>> Here is what I've been trying.  Install Eclipse with Tomcat integration.
>>   Works fine.  I can build an Eclipse Dynamic Web App.  Can write servlets
>> and JSPs, and debugging and developing is easy via Eclipse's Run As Server
>> command.
>>
>> Ideally, I'd like to manually setup an Eclipse project to work with Wicket.
>>   But, I don't know how to get the project structure right and have the class
>> and HTML files copied into the resultant WAR.  So, I use Maven to create a
>> new web app:
>>
>> mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp
>> -DarchetypeArtifactId=maven-archetype-webapp
>>
>> and then generate Eclipse project files
>>
>> mvn eclipse:eclipse
>>
>> Then I import the project into Eclipse.  Problem is that the project
>> appears to be a Java project and not a webapp.  There is no Run As Server
>> command.
>>
>> Head hurts from the banging.  What am I doing wrong?
>>
>> Mike
>>
>> ------------------------------
>>   View message @
>> http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2333641.html
>> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>>
>>
>>
>>      
>
>    


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


Re: Wicket + Eclipse + Tomcat

Posted by jcgarciam <jc...@gmail.com>.
Hi, the problem is that maven project layout is totally different as what
Eclipse Web Project layout expect, therefore there are not compatible.

If you want to use Wicket+Maven+Eclipse Debug , i suggest you to used the
Wicket QuickStart as starting point or use the maven archetype:generate to
select the wicket archetype.

After doing so, do a mvn eclipse:eclipse and import it to your workspace,
then look inside the src/test package  a class name Start.java and do a
"Debug as"  that class that actually  start an embedded jetty and you will
be able to debug the application.

if you want to use tomcat instead of jetty use the command mvn tomcat:run
and set it up to listen for Remote Debugging.

Check out this link for more detail:
http://blog.kadirpekel.com/2009/11/09/debugging-through-maven-tomcat-plugin-by-eclipse/


On Sat, Aug 21, 2010 at 1:38 PM, Mike Dee [via Apache Wicket] <
ml-node+2333641-1697040112-65838@n4.nabble.com<ml...@n4.nabble.com>
> wrote:

> Get started with Wicket (again) and banging my head on Eclipse and Tomcat.
>  What is a typical way to setup a project (in Eclipse) so that it is easy to
> test and develop (locally) in Tomcat?
>
> Here is what I've been trying.  Install Eclipse with Tomcat integration.
>  Works fine.  I can build an Eclipse Dynamic Web App.  Can write servlets
> and JSPs, and debugging and developing is easy via Eclipse's Run As Server
> command.
>
> Ideally, I'd like to manually setup an Eclipse project to work with Wicket.
>  But, I don't know how to get the project structure right and have the class
> and HTML files copied into the resultant WAR.  So, I use Maven to create a
> new web app:
>
> mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp
> -DarchetypeArtifactId=maven-archetype-webapp
>
> and then generate Eclipse project files
>
> mvn eclipse:eclipse
>
> Then I import the project into Eclipse.  Problem is that the project
> appears to be a Java project and not a webapp.  There is no Run As Server
> command.
>
> Head hurts from the banging.  What am I doing wrong?
>
> Mike
>
> ------------------------------
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2333641.html
> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>
>


-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2333689.html
Sent from the Wicket - User mailing list archive at Nabble.com.

SV: Wicket + Eclipse + Tomcat

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> In the case of automating or scripting builds, is there ever a worry
> about
> keeping the Eclipse and Maven builds consistent?  I would imagine that
> one
> could develop and debug in Eclipse.  But when it comes time to do an
> official build (with Maven), the results could be a little different.

Depends on the setup. For instance, we have run into issues where the Eclipse project somehow managed to be set up with src/main/webapp/WEB-INF/classes as project output, so that Eclipse builds put classes there. However, then Maven picked up stuff from there overriding target/classes (if you had edited in Eclipse but not built automatically) even though the Maven plugin docs said it by default ignored WEB-INF/classes... the fix was to direct Eclipse to build to target/classes as well.

- Tor Iver


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


Re: Wicket + Eclipse + Tomcat

Posted by Mike Dee <md...@cardeatech.com>.
The article (in prior message) mentioned that it is easier to go from an
Eclipse project to a Maven project (POM).  That is the first time I've heard
of that.  Almost everyone seems to create a Maven Eclipse archetype
(eclipse:eclipse) and then import that into Eclipse.  I wonder if the
article makes a valid point though?  It would be nice (for me, at least) to
work in Eclipse and make project changes there and then export to a POM. 
Otherwise when an Eclipse project is changed, I may forget to make the
corresponding change in Maven.

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335072.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: Wicket + Eclipse + Tomcat

Posted by James Carman <ja...@carmanconsulting.com>.
That's why you make sure that Eclipse understands your maven pom.xml
files with the plugin.

On Mon, Aug 23, 2010 at 8:41 AM, Mike Dee <md...@cardeatech.com> wrote:
>
> Good point.
>
> In the case of automating or scripting builds, is there ever a worry about
> keeping the Eclipse and Maven builds consistent?  I would imagine that one
> could develop and debug in Eclipse.  But when it comes time to do an
> official build (with Maven), the results could be a little different.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335041.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Wicket + Eclipse + Tomcat

Posted by James Carman <ja...@carmanconsulting.com>.
On Mon, Aug 23, 2010 at 9:05 AM, T Ames <ta...@gmail.com> wrote:
> I should really look into using jetty someday, but our production
> servers are all Tomcat so that is what I have stuck with so far.
>

If you use the quickstart, you can easily use Jetty.  All you have to
do is run Start.java as a Java application.

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


Re: Wicket + Eclipse + Tomcat

Posted by T Ames <ta...@gmail.com>.
Hmmm.  I would try a clean install of Eclipse (I am using 3.6.0) , the
m2eclipse plugin that goes with that version and a fresh workspace.
Create a Maven Project and then select a wicket archetype or the maven
web archetype.  I have used both archetypes and they "should" create
web projects upon completion.

On Mon, Aug 23, 2010 at 9:55 AM, Mike Dee <md...@cardeatech.com> wrote:
>
> That is the same setup I have.  Tomcat and Eclipse are on the same machine.
> The problem is that when creating the project through Maven and importing to
> Eclipse, something goes wrong.  The end result is that a Java project is
> created - not a web app (Dynamic Web Project).  Java projects can not be
> added to the Tomcat list of apps.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335146.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Wicket + Eclipse + Tomcat

Posted by Mike Dee <md...@cardeatech.com>.
That is the same setup I have.  Tomcat and Eclipse are on the same machine. 
The problem is that when creating the project through Maven and importing to
Eclipse, something goes wrong.  The end result is that a Java project is
created - not a web app (Dynamic Web Project).  Java projects can not be
added to the Tomcat list of apps.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335146.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: Wicket + Eclipse + Tomcat

Posted by T Ames <ta...@gmail.com>.
I have never used that option when developing with Tomcat and the
m2eclipse plugin. I have my development Tomcat loaded on the same
machine as Eclipse, so the dynamic updates to Tomcat just happen when
I change a class.  You see this down in the Servers tab. It will say
[Started, Synchronized] or [Started, Restart]. If Restart shows, then
I click the restart on the Server tab.

Are you adding the project to the Server?  In the Server tab, right
click your Tomcat server and do and Add and Remove.

On Mon, Aug 23, 2010 at 9:40 AM, Mike Dee <md...@cardeatech.com> wrote:
>
> When I tried the m2eclipse plugin, it created a (WTP) java project.  Since it
> wasn't a webapp (aka Dynamic Web Project in WTP lingo), it had no "Run As
> Server" command.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335123.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Wicket + Eclipse + Tomcat

Posted by Mike Dee <md...@cardeatech.com>.
When I tried the m2eclipse plugin, it created a (WTP) java project.  Since it
wasn't a webapp (aka Dynamic Web Project in WTP lingo), it had no "Run As
Server" command.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335123.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: Wicket + Eclipse + Tomcat

Posted by T Ames <ta...@gmail.com>.
In Eclipse I use the m2eclipse plugin.  It works pretty good and I
rarely use the command line.  To start a Wicket project, I create a
Maven project which is part of the m2eclipse plug in.  I then bring in
the org.apache.wicket quickstart archetype.  This creates a web
project. I then modify the pom.xml to remove the jetty stuff and add
is some of my own.

To build the war, I used to use the Export -> War which worked fine,
but I then added some extra copy and clean-up procedures in my pom.xml
so now I just use Run As -> Maven Package (part of m2eclipse plugin)


I should really look into using jetty someday, but our production
servers are all Tomcat so that is what I have stuck with so far.


On Mon, Aug 23, 2010 at 8:41 AM, Mike Dee <md...@cardeatech.com> wrote:
>
> Good point.
>
> In the case of automating or scripting builds, is there ever a worry about
> keeping the Eclipse and Maven builds consistent?  I would imagine that one
> could develop and debug in Eclipse.  But when it comes time to do an
> official build (with Maven), the results could be a little different.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335041.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Wicket + Eclipse + Tomcat

Posted by Mike Dee <md...@cardeatech.com>.
Good point.  

In the case of automating or scripting builds, is there ever a worry about
keeping the Eclipse and Maven builds consistent?  I would imagine that one
could develop and debug in Eclipse.  But when it comes time to do an
official build (with Maven), the results could be a little different.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335041.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: Wicket + Eclipse + Tomcat

Posted by James Carman <ja...@carmanconsulting.com>.
On Mon, Aug 23, 2010 at 12:05 AM, Mike Dee <md...@cardeatech.com> wrote:
> In actuality, I'm failing to see the value in Maven.  I love the ease of use
> of Eclipse.  It takes care of the build and dependencies and integrates
> nicely with Tomcat for dev and debug.  I've spent a lot of time learning
> about Maven.  I must be missing something because I don't see how it is very
> useful.
> --

Try using Eclipse in an automated build system.

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


Re: Wicket + Eclipse + Tomcat

Posted by Mike Dee <md...@cardeatech.com>.
I have found something that is useful.  It addresses a way to build a dynamic
web project with a Wicket (and Maven) directory/project structure.  This
article describes how to manually setup the structure with the associated
WTP settings needed.

http://www.devx.com/Java/Article/36785/1954

Now I have to see if I can put java and HTML files in the source directories
and have them copied to the target.

In actuality, I'm failing to see the value in Maven.  I love the ease of use
of Eclipse.  It takes care of the build and dependencies and integrates
nicely with Tomcat for dev and debug.  I've spent a lot of time learning
about Maven.  I must be missing something because I don't see how it is very
useful.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2334605.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: Wicket + Eclipse + Tomcat

Posted by John Krasnay <jo...@krasnay.ca>.
On 10-08-21 12:38 PM, Mike Dee wrote:
> Here is what I've been trying.  Install Eclipse with Tomcat integration.
>

> mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp
> -DarchetypeArtifactId=maven-archetype-webapp
>
> and then generate Eclipse project files
>
> mvn eclipse:eclipse
>

This is very similar to how I'm working, so there must be something 
wrong. First, what do you mean by "Eclipse with Tomcat Integration"? I 
use the Eclipse JEE version that comes with the Web Tooling Platform 
(WTP), which understands the web-app nature of your project.

Next, look in your pom.xml. You should see something like this...

       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-eclipse-plugin</artifactId>
         <configuration>
           <downloadSources>true</downloadSources>
           <downloadJavadocs>true</downloadJavadocs>
           <wtpContextName>/myapp</wtpContextName>
           <wtpversion>1.5</wtpversion>
         </configuration>
       </plugin>

It's the wtpContextName and wtpversion elements that identify the 
project as a web app, and allow mvn eclipse:eclipse to generate the 
right project structure. Does your pom.xml look OK?

jk

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