Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Importing existing Maven Web Apps/Services in Eclipse 4.2 (Juno)...

I spent 5 hours yesterday (while watching movies :-) install/reinstalling Eclipse and plugins like m2e-wtp with no luck, even leaving it all night.  This morning I enabled Eclipse -debug and -consoleLog, killed it and retried and it worked....ugh. 

I did notice there is a new update site listed related to m2e-wtp called "Site for %featureName".  Is that what others see?

On Sat, Sep 29, 2012 at 8:39 AM, Jeff <predatorvi@xxxxxxxxx> wrote:
I'm trying to install m2e-wtp by going to the Window->Preferences->Maven->Discovery option, selecting m2e-wtp and going through the wizard.  However, after confirming all dialogs, Eclipse seems stuck showing "Installing Software: (0%)" in the bottom right corner.  I am unable to close Eclipse and attempts to cancel the install just hang Eclipse.

I've uninstalled/cleaned all eclipse folders and installed fresh with the same result.  I've tried installing all WTP/Web/m2e/stuff first and tried installing m2e-wtp with only the "Maven Integration (m2e) and related..." packages installed.

The installer just hangs at 0%.

I'm installing/running on Windows 7 Enterprise (x64).  Installing to a secondary drive where there are no elevated permission requirements.

I let it sit all night...any thoughts?


On Fri, Sep 28, 2012 at 8:21 AM, Matthew Piggott <mpiggott@xxxxxxxxxxxx> wrote:
When you import a project (using m2e's import wizard, not the default Eclipse wizard) you should be shown a screen with parts of the build that m2e-core doesn't know how to handle.  At this point it should suggest you install connectors such as m2e-wtp, these help configure Eclipse for unknown Maven plugins (with later versions of m2e the plugins themselves can include metadata).

Make sure you didn't choose to ignore the maven plugins (such as war) and check your pom for error markers.
 
On 27 September 2012 20:21, Jeff <predatorvi@xxxxxxxxx> wrote:
Is there something that explains how to configure a clean installation of Eclipse (4.2/Juno) to enable Maven features to recognize, build, deploy and debug an existing maven web application or service?  I've looked through http://wiki.eclipse.org/M2E  and related pages but I couldn't find a complete explanation of the process.

I downloaded the latest 4.2.0 Juno J2EE installer (eclipse-jee-juno-installer-windows.exe) from Genuitec and installed the 64-bit version.

I then pulled all updates and have installed the following as listed in the "Software and Workspace Center" view:
  • TestNG (6.7.0)
  • Maven Integration (m2e) (2 related) (1.1.0)
  • Microsoft Visual Studio Team Foundation Server plug-in for Eclipse (11.0.0)
  • Eclipse EGit (2.1.0)
  • EGit Plug-in Import Support (2.1.0)
  • EGIT Mylyn (2.1.0)
  • EGIT Project Set Support (2.1.0)
  • Eclipse Java Web Development Core (3.4.1)
  • Eclipse Java Web Developer Tools (3.4.1)
  • Eclipse Java Web Developer Tools User Documentation (3.4.1)
  • Web Page Editor (2.3.8)
  • JAX-WS DOM Tools (1.0.200)
  • JAX-WS Tools (1.2.0)
  • m2e - Maven Integration for Eclipse (1.2.0)
  • m2e - slf4j over logback logging (Optional) (1.2.0)
  • Subclipse 1.8.x (5 related) (1.8.16)
  • Mylyn Versions Connector: Git (1.0.1)
  • _javascript_ Development Tools (1.4.1)
  • WST Web Core (3.4.1)
  • Eclipse Web Developer Tools (3.4.1)
  • WST Web User Documentation (3.3.0)
  • WST Web Services Core (3.4.0)
  • Web Services Tools (3.4.1)
  • WST Web Services User Documentation (3.4.1)
I deleted all existing source folders, then used the Microsoft Team Explorer Everywhere plugin to get latest application source.

Next, I go to Import->Maven->"Existing Maven Projects".  The project shows up, but doesn't appear to be recognized as a web application.  I right click, go to Debug As-> or Run As-> but there is no Run on server option.

I then go to <Project>->Properties->Project Facets->Convert to Faceted form... (should I really have to do this manually?) and select the following:
  • Dynamic Web Module (v2.5)
    • Click "Further configuration available..."
      • change content directory from "WebContent" to src/main/webapp (Maven 'convention' but not what m2e/Eclipse seems to want -- see below)
      • UNCHECK Generate web.xml deployment descriptor (Already exists in my project)
  • Change Java from v1.7 to v1.6
  • Click OK
Now I see a "JAX-WS Web Services" node in the project, even though it isn't a JAX-WS Web service (not sure if that means anything) but I can now initiate a "Run On Server" or "Debug On Server" from the menus...yay!

However, doing "Run as->Run On Server" and selecting my Tomcat 6 server seems to deploy, but nothing happens...boo!  It didn't even say it was starting the application even though it deployed according to tomcat.

After a few more hours of searching, someone listed an example with the "Content directory" as "target/<webappfolder>", presumably where the assembled web app is located after a build.

That seemed to work.  However, my Maven project builds the war and names the "target/<webappfolder>" with the Maven version as part of the folder name (e.g., WebApp-1.0.1-SNAPSHOT) so if I release and/or change the version, it breaks and I can't find a way to change this folder location once it is set!!!  Shouldn't the "content directory" be dynamic based on the POM?

Questions:
  1. Am I doing this right?
  2. Why doesn't m2e (or eclipse?) infer the src and/or target information it needs from the POM and content instead of me having to hold it's hand?
  3. Can I change the "content directory" after it is set the first time?  If so, how?
  4. Does it really have to be this hard to import an existing maven project?
Thanks!

-- 
I ♥ DropBox !! 


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users




--
I ♥ DropBox !! 




--
Jeff Vincent
predatorvi@xxxxxxxxx
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox !! 


Back to the top