So, I just started working on a huge project, I was told to download and build Maven3 and clone project from Git repository.
My understanding is that Maven is supposed to import all libraries used in project, automatically.
Now, Maven builds project without errors, but when I opened project in Eclipse, bunch of libraries is missing, not all of them but like 1/4 - 1/3.
I'm pretty new to this, so maybe this question is stupid and i did something wrong or understand something wrong. But i would appreciate help.
EDIT
So the problem was that when i was importing project from Git, i chose Java Project, instead of Maven Project.
EDIT2
When I imported project as Maven Project I came upon another problem. Libraries were still not correctly imported. I found various solutions here but none helped. I finally found out that I'm dumb as f**k and I was chosing root directory as a root directory for whole repository while the correct pom was like 2 dirs inside it. So i was building from the wrong pom.. I blame the fact that yesterday I didn't know what Maven is.
If you already have downloaded the dependencies successfully from the MAVEN, you just need to update it with the project in Eclipse.
Use following option in Eclipse
Right Click Project > MAVEN > Update Project..
Related
I have this weird problem. It was working fine, but lately after some developers joined the project, all of a sudden Maven dependencies are listed both under Maven Dependencies folder as well as under the project. Please see pic. I've highlighted a sample dependency that's listed twice.
So far, it seems like the project compiles fine, etc etc. But it just annoys me to see that. Any ideas how to fix it?
Thank you.
This might happen when people insert external dependencies manually in the build path as follows:
Select Project > Right Click > Properties > Java Build Path > Add External JARs...
You can get rid of unwanted external libraries by removing them from the top level list (don't remove JRE System Library and Maven Dependencies). As these libraries are managed by Maven you don't need to include them into the project manually.
And the reason why you're seeing configuration changes of other developers is that when Eclipse .settings, .classpath and .project files are checked into the Repository. (Remove these entries from the repository if you have authorization to do so and you'll have a clean repository.)
I'm following this tutorial: http://spring.io/guides/tutorials/rest/ to get familiar with spring/REST. However, the git repo (git clone https://github.com/spring-guides/tut-rest.git) has many individual java projects each with their own gradle build. I'd like to edit the code in Eclipse, as that's the whole point, but this hasn't proved trivial.
So far, I've created a general project for the git repo, and then separate java projects for each of the folders from the repo, linking the source in my java projects to the source/test folders in the repo. This has worked great except that I don't have the spring jars in my dependencies for the java projects, I get a ton of errors as well as lose the nice autocomplete of function names, etc.
What is the correct way to fix this? It seems like there isn't a good way to install the jars for spring in each java project without using maven or some other build tool, which seems redundant and inefficient since I can build the source from the repo project. If this is the case, should I make a build for each separate project even though the idea for the tutorial is that they each come with gradle?
Thanks for your help, and please excuse the slight open endedness of it--I'm not sure I'm on the right track.
I want to install eclipse plugin Agilereview from following link:
https://github.com/AgileReview-Project/AgileReview-EclipsePlugin
I downloaded the zip and unzipped it. I added it in eclipse as project and many projects added into workspace. When I tried to select all those projects and export them as deploy-able plugins in eclipse repository, eclipse doesn't allow it and always show error like plugin file missing. A problem is the zip file include many folders and many of those folder has its own plugin.xml file. Therefore, I think this Agilereview plugin itself is a combination of many plugins. I am sure that plugin is okay and its my mistake to install it.
Can anyone tell me, what is the mistake I am doing while installation? I want to install this plugin manually since later I need to optimize it.
Each of the folders org.agilereview.xxx is a separate Eclipse project. So you should use 'Import > Existing Projects into Workspace' to import these projects.
Since there are pom.xml files it looks like you should use maven and tycho to build the code.
For building RCP applications and plugins like Agilereview, which itself is a combination of many projects, you can check out the following tutorial:
http://www.vogella.com/tutorials/EclipseTycho/article.html
Eclipsetycho provides support for building eclipse components.
Install the maven eclipse tool, which will make your work easy.
http://download.eclipse.org/technology/m2e/releases
This is a pretty complex process, so spend some time to learn from the tutorial.
I'm here to get some solutions.
I was about to set a development environment.
I downloaded Eclipse ,which is Kepler, and downloaded some projects from SVN.
There is the problem in Maven Dependencies of Java Build Path.
Maven dependencies has several jar files and some folders.
Some project gets correct but a project gets everything as jar although something shouldn't be a jar file.
I would like to make it as folder but I don't know how to do that.
I'm gonna appreciate if you guys give me the answer or any tip.
Thanks.
Self solution :
Eclipse - Window - preferences - Maven - User Settings - Update Settings button click
It solved the problem.
I'm expiriencing multiple compilation errors in my project, most of the code is in red, but the strange(or not) thing is that while building the project with maven everything is build successfully and the war is assemled as it should be.
The thing is that auto suggest is not working because code is not compiling. What can I do to fix this?
I'm using eclipse, sorry
UPDATE:
I've tried all suggestions below but none worked
If you are using Eclipse, try Project > clean.. your project.
I don't know why, but Eclipse sometimes just think your project was wrong but it's not. Clean it to entirely build it again.
If it's Eclipse do
Project > Clean
then right click at the parent-most project and do
Maven > Update Project Configuration
Maven > Update Dependencies
I guess you have m2eclipse installed, already.
Use a maven plugin in your IDE
plugin for eclipse
plugin for netbeans
Most likely you have to include external libraries/dependencies in your IDE. It seems when you're building with maven, those dependencies are solved for you.
Some IDE's support Maven projects, try to see if yours does.
You haven't specified what IDE you're using or what the errors are, which makes it pretty hard to give you advice. My guess is that you haven't configured your project (or whatever the equivalent IDE concept is) to tell it the libraries you're using... whereas the Maven build file already contains that information.
EDIT: Okay, so it can't find the right libraries. Options:
Use a Maven plugin and let it manage the project
Edit the project's build path and explicitly tell it which jar files to use.