Run on server option does not display in eclipse helios for spring-maven project - eclipse

I have imported maven project in eclipse and configured properly. Its a web application, however I can't see 'Run on Server' option on right click in 'Run As'. I have Eclipse Helios and maven, tomcat plugin installed. should it required any plug-in for this or we need to convert project. Other web applications are getting 'Run on Server' option.

check Project properties / Project Facets / Dynamic Web module.

You might find this helpful;
http://vijaypm.blogspot.com/2010/12/maven-eclipse-and-tomcat.html

I had similar issue, unable to run on a server due to project facet validation issue.
I'm using Eclipse "Juno Service Release 2".
And resolved the issue with the following steps:
Right click on the project (on Project Explorer)
Click on Properties
Click on Project Facets
Uncheck the unwanted Project Facet(s).
Eg., I have unchecked Oracle WebLogic Web App Extensions
(because, my server is Apache Tomcat 7)
Apply >> OK
Now, I am able to run my web app on Tomcat server.
Hope this will work your you too.
Thanks,
Maris

Related

Can't choose an existing server in a Dynamic Web Project a in Eclipse

My colleague just set up a Dynamic Web Project in Eclipse and he also configured the server. He shared the entire project on a git repository and I cloned it. When I try to run the html file I click on 'run on server' but then I'm not able to choose an existing server already configured. Eclipse force me to create a new server with default configuration. I am attaching a screenshot of Eclipse
https://www.youtube.com/watch?v=ipqTnzTPgj0
Help --> Install new software ---> install " eclipse repository - https://download.eclipse.org/releases/oxygen ".
Then install the package for -- Web,XML, Java EE and OSGi Enterprise Development.
Reboot your computer and eclipse. Then it will work. Good luck.
It works for me:
Properties -> Project Facets and do it like this
Right click on you project and go to properties. Go to Project Facets and on Dynamic Web Module click the little drop down menu and select 3.1. I initially had it at 4.0 and it was not supported in my version of Eclipse.

Eclipse does not show associate with SonarQube option while associating the project at first time

I have installed Sonar plug-in for eclipse Kepler.
Installed Sonar server and running it locally from localhost (localhost:9000)
Tested the Server connection in Eclipse from
Windows>Preferences>Sonar>Servers. Connection is successful.
For my Project, ran the Maven goal for sonar (sonar:sonar). Build is successful. I am able to browse the results in localhost. (localhost:9000)
My issue is with Associating the project to Sonar. When i right click on my project > Configure ,but it does not show associate with sonarqube option.
Help me associate my project to Sonar in eclipse. Please let me know what i am missing.
I was facing the same issue for one of my Java project and I figured out that no facets were selected.
When I selected java in facets, I got "associate with SonarQube" option.
Open project properties by rightClick on projects->Properties
Select Project Facets and check whether any option is selected or not. If not selected, select facet according to your project then you should be able to see "associate with SonarQube".
I did the below:
Project >> Properties >> SonarLint
and then click Bind this Eclipse project to a SonarQubeProject
Make sure the mapping is complete -> Eclipse Project to SonarQube project
Use Autobind selected projects button option
Finish

Eclipse: Can't run project on Tomcat server

I have installed the Tomcat plugin and it works if i create a New Dynamic Web Project, and import an existing basic maven webapp into it. I can run it with the option of running it "as server".
However, when i did an Import existing project, in Eclipse, of an existing basic maven app, I had to right-click on the Project, choose Configure and convert it to a Faceted project, then right-click on the Project, choose Properties, and choose Targeted runtimes, and choose Tomcat and JRE. However, i still cannot run the project, "as server". When i click Run, i just see Java Applet, Java Application and JUnit Test as the options with which to run the project. I don't see Server.
Looks like the answer is:
May be Dynamic Web Module in Project Facet is not selected
Go to :- Project > Properties > Project Facets > check Dynamic Web Module
Answer from Mohit Saluja for the following question: Eclipse Juno, maven project not able to run on server
Navigate to Project > Properties > Project Facets .
In the Runtimes Tab check the apache version which is installed in your lappy, and uncheck others .
Import the project as an existing maven project (you'll need m2e installed and either m2e-wtp or webby) and the maven configurators should set it up as a dynamic web project for you and get you ready to go. Then with m2e you can "run on server" or with webby you can "run as webby"

Eclipse Juno, maven project not able to run on server

I upgraded to Eclipse Juno(for Java EE developers). I installed Maven Integration for Eclipse through marketplace.
Just to test, I created a web app using maven-archetype-webapp. I cannot run on server(There's no menu Run On Server). The same happens with another maven project which runs fine using Eclipse Indigo. A tried deleting .settings, .classpath, .project then re-importing the project but nothing. I was hoping so much on Juno!
Does anyone know a real solution to this problem?
May be Dynamic Web Module in Project Facet is not selected
Go to :- Project > Properties > Project Facets > check Dynamic Web Module
How about installing the m2e-wtp plugin and trying? You would want to confirm that the maven project is of war packaging as well.
Run on server is not a maven feature, it's a "classic eclipse" feature.
In order to run a maven project on a server you must adopt a plug-in (e.g a Jetty plug-in for your webapp) and the run the proper maven goal (e.g jetty-run).
Said this, you can run a web project on a server with (right-click) > Run as > Run on server if you have the proper runtime environment configured.
Enabling "Dynamic Web Module" in Project Facets may not help here in maven projects.
Because maven projects are structured differently (target/sampleApp-1.0-SNAPSHOT.war) than the normal Dynamic Web Projects (WebContent/).
So, If you use Dynamic Web Module manually, then eclipse will try to use "WebContent" directory structure as deployment directory for Application Server which won't be the case in maven projects.
Solution is to use m2e-wtp plugin to do the deployment.
If you installed m2e-wtp plugin, it'll automatically detect your maven project type & it'll show you the "Run as Server" option in "Run as" menu in "Project".

Unable to deploy Maven WAR project to JBoss: The selection did not contain any resources that can be run on a server

I'm using JBoss 7.1 AS, Eclipse Indigo, Maven 3.0.3 on a Mac OSX Lion. I have successfully registered JBoss 7.1 as a local server within Eclipse. I installed the JBoss tools for Eclipse, right clicked my Maven project, selected "Mark as deployable", but then the problem arises. When I right click on "Run As" -> "Run on Server", I'm greeted with the error
The selection did not contain any resources that can be run on a server
Any ideas what additional steps I should take to make this bad boy deploy? Let me know what other information I should provide.
Sometimes this happens to me when I'm dealing with Maven projects too.
Try the following: In Package Explorer right-click on your project pom.xml then use "Maven > Update project". After that you should click on menu "Project > Clean...".
Now try to add/remove again.
By the way, you should't need to mark your entire project as deployable under normal conditions.