how to install javax and apache plugins in eclipse? - eclipse

I'm new to java and trying to rebuild in eclipse 3.4.2 an old package that require javax (classes InternetAddress, Session and others) and org.apache.xpath.* (I don't know exactly why). I'm looking for update sites but google reports billions of pages. An explaination about how/where to find eclipse plugins without getting sick will be appreciated, thanks.

From what you describe, you don't need a plugin, you just need to add the required libraries to your build path. You won't find those in update sites.
Here's what you need to do:
Locate and download the required JARs. You can use a service like FindJar.com to search for those JARs. Apache JARs are usually available from apache.org.
Put the JARs in a folder called lib in your project.
Refresh the project in Eclipse (F5 or right-click and "Refresh"), the lib folder with the JARs should appear in your project explorer.
Add them to the build path - in the Eclipse project explorer, right-click the JARs and select "Add to build path"

Right click on project ---> Properties ---> Java Build Path ---> Add Library... ---> Server Runtime ---> Apache Tomcat ----> Finish.

Related

Using maven generated sources in Eclipse

I have an application made up of a number of maven projects. I work on it in Eclipse. Some of the projects use Maven plugins to generate stub classes for web services etc.
When i import the projects into a new workspace I have to issue a maven generate sources command followed by attach source folders to build path on each project. The application i work on has more than 5-6 projects which require these steps.
Is there a plugin I can install in Eclipse to pick up the generated sources, or even one that generates the sources and updates the build path to save the manual steps?
I'm pretty sure the m2e plugin takes care of this automatically. m2e is included in the primary Java and Java EE packages of recent Eclipse versions, so you probably already have it. If you right-click on your project, and there is a Maven submenu, then the project is already managed by m2e. Otherwise, right-click and choose Configure > Convert to Maven project.
Well, it depends on exact maven plugin you are using.
generate sources
Before I considered that m2e connector would be needed for any non common plugin, like generator. But I came recently on some plugins (1), that do it without special m2e connector.
attach source folders to build path
For this part check build-helper-maven-plugin and answer to M2E and having maven generated source folders as eclipse source folders

Setting up project is eclipse

I want to setup my work project in Eclipse, with following features:
1) Connect to SVN repository
2) It is a maven - multi module project
3) It is a spring project
If I import this project as Maven project I am not able to connect it to SVN repository.
If I check - out SVN repository, I am not able to set it up as Maven/Spring project.
And ideally I want to make it hot deployable, (as eclipse dynamic web project), so Development can be efficient.
How can I possibly do this.
I have setup eclipse Juno SR1 with Maven, STS, and SVN plugins.
What you can do is follow the below steps :-
Checkout from svn to your local drive.
As it is a mave nbuild project you will have the pom.xml file in the root of the project. Do a mvn eclipse:eclipse -Dwtpversion=2.0 on the project.
3.Open eclipse and go to File-->Import--> Existing projects into workspace.
This should do.
FYR see this
After the project is checked out into the Eclipse workspace, just remove the project by using the following action: -
right click at the project ---> delete ---> click ok
Please take a note, do not check the check box named "Delete project content on disk". We have just want to remove and re-import again.
All we need to do is re-importing by using the following action: -
File ---> Import ---> Maven ---> Existing Maven projects
This will help us to integrate the Maven with the SVN in Eclipse. We will see the revision information after the project name, folders, packages, classes, etc.
Anyhow to use Maven in the Eclipse, you should install the Maven Integration (m2e). Furthermore there is a useful plug-in to integrate the Eclipse WTP with the Maven as well. It is named Maven Integration for WTP.
I hope this may help.

How do I add jar files to imported project from SVN in Eclipse

Before posting this question, I did NOT see any reference to this topic. I just added the subversive plugin to my Eclipse Juno IDE and my question is after I imported a project from my SVN repository and now have the project setup in eclipse, how do I add JAR files to this project that the code needs to reference?
I do NOT see a configure build path on the project at all. I am new to subversive and could really use some help. I tried this in Netbeans 1.7.2 and it gives you the ability to add libraries to the project but I don't see it in Eclipse.
Any help/direction would be greatly appreciated. Regards.
Adding jars to a project build path doesn't have anything to do with SVN and subversive. You add the jar as you would do it without subversive: Project - Properties - Java Buid Path - Libraries - Add JARs/Add External JARs.

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".

How to add JDBC connectors jar files to a portable Eclipse installation?

Where should I put the JDBC JAR files in order to be able to user them from Eclipse and be able to keep Eclipse portable (in Dropbox).
Go to the folder in which tomcat is installed. Inside that go to the lib folder and put the jar file there.
You will also need to link this in eclipse.
Open eclipse IDE.
In the dynamic web design prespective, link the jar file by right clicking the project folder.