I am not sure what to try, but I keep right clicking and selecting enable maven dependencies. That does nothing but it does give me all the new maven menu options.
So I then hit update dependencies, nothing happens, and then I hit update project configuration, still nothing.
The Maven folder does not even get created.
I am doing this at work, and the person who helped me said to try things in that order and it should work. Although he did have one extra step, which was that I needed to select 'enable nested modules', but I have been reading and found that this feature has been removed. Maybe that will help someone figure out why this is not working for me and provide an alternative to enabling nested modules?
True wisdom is in knowing you know nothing - Socrates
Right clicking on the project itself in the project explorer for eclipse. I probably should have mentioned this is the eclipse plugin for eclipse I am working with.
But is there a command line mvn command to update dependencies? I am connected to a work artefactory so I should be pulling the libraries in from that, but I am having no luck. I am able to do it on other random projects so I am definitely connected correctly to the artefactory. I am just un sure what to try. I don't expect I will find an answer here, because it is such a specific case I ave, and it could be so many problems. I am just swinging in the dark at this point because I have been at this for about 12 hours with no luck.
I did try a different maven plugin - Q4E. When I right clicked on the project and enabled dependency management it did seem to work, but my source folders all went away and the java classes were moved to some other folder (the errors were gone at this point, so it saw the jars I needed somewhere). Then when I right clicked on the folder that now held the java classes, and clicked build path -> make source folder, all my source folders were back but all with the errors again indicating no maven dependencies.
edit - When I run mvn install on this project it starts to download all the jars and such from my work artefactory:
So it is obviously connecting to my work's artefactory (I replaced my job's name with the word 'work' there to protect myself from any NDA's). I do not understand though why the Maven source folder is not getting created, and putting all these jars in there though ><
Maven cannot automatically determine dependencies. You have to define them yourself. There are 3 primary reasons:
1. One of Maven's strongest selling points is reduction of "jar hell" - Java's version of the infamous "DLL Hell". You can bulletproof a build by referencing a specific version of a jar, thereby eliminating possible problems where a future version of the same jar breaks something.
2. It is, alas, impossible to deduce an artifact's ID from the artifact itself. I would prefer that Maven would be consistent about using the upper-level package names as part of the artifact ID, but in fact, there's been a trend to do exactly the opposite, so that for a lot of artifacts end up as top-level items.
3. What would be the point of forcing a POM to include dependencies if the dependencies could have been automatically determined to begin with?
Customer surveys are for companies who didn't pay proper attention to begin with.
Thanks for the info, I actually just read all of the maven documentation at the sonatype site, got some good info but still have not resolved my issue.
When I run a mvn clean build I get build success, but I also get a lot of warnings:
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-jxr-plugin is missing.
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing.
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-pmd-plugin is missing.
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-changes-plugin is missing.
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-changelog-plugin is missing.
I read somewhere about a fix for this, but I do not believe this is causing my issues. I am just wanting to include all the info I can, but not all at once so as not to incur tldr's
Yeah. These are all Maven plugins that you're tapping either explicitly (in the POM) or implicitly (just by existing). For the ones in your POM, you just need to add a version ID to the plugin artifact reference. Used to be that was more of an option. Now it's more of a requirement.
Well, instead of opening the project as a new java project and trying to mavenize it, I went ahead and opened it as a new interconnected maven project (main piece + 3 modules) and that imported the dependencies just fine. It will work I guess, but I still want to know why I cannot seem to get it working the other way. Maybe this new bit of info will give someone an idea?
edit - by the way, I tried it on a co worker's pc who was fortunate enough t get the 0.9 version of M2Eclipse, and he had the 'enable nested modules' feature... and it worked just fine, so that is definitely the reason I cannot get it working, I need to make happen whatever that particular feature does.
subject: Enable dependency management is not working for me not even getting the maven folder created(eclipse