After installing the Spring Tool Suite, I tried to create a maven project and this is what I get in an instant:
So waddap Maven/STS creators? How do I make your product work?
To any noobs like me who got overwhelmed by this error, here's what I did:
Go to your .m2/repository, where I think Maven stores its configurations files, then wipe it clean, delete all files, delete the 'repository' folder even.
I then closed the STS IDE and restarted it. You can see in 'Progress tab' that Maven is downloading new files.
Saw the same 5 errors, right clicked and clicked 'Quick Fix'. That's it.
This post was helpful too.
Related
While trying to build https://github.com/mozilla/rhino, I'm getting Unable to find method on org.codehaus.groovy.runtime.StringGroovyMethods.
so the build fails, and I'm unable to test Rhino built from source code, which is the goal.
Steps Taken
From the opening screen in IntelliJ, I check out the project:
I get this error Unable to find method ''java.lang.String org.codehaus.groovy.runtime.StringGroovyMethods.capitalize(java.lang.String)'' right away, which I have not been able to fix:
There are two suggestions in the above Re-download dependencies and sync project and Stop Gradle build processes. I have tried both with no improvement.
When I look at the build.gradle file, I see another suggestion ...configure Gradle wrapper to use distribution with sources.... This also does not get past the missing Groovy method problem.
I have looked on S.O. for similar issues and tried various things under File > Settings > Build, Execution, Deployment, but I realized I'm over my head since, conceptually, I'm not sure what I need and where that would go in the settings.
The command line items from the readme work as expected, but going back to File > Build still fails (added after tim_yates comment).
What changes are required to the IDE or to the build definitions to allow Mozilla Rhino to build properly?
I installed the latest (2022.1) version of IntelliJ IDEA Community Edition. During the install, it asked if you wanted this IDE to be associated with Groovy file types, and I answered in the affirmative.
On this new install, the Unable to find method on org.codehaus.groovy.runtime.StringGroovyMethodserror did not appear, so the problem was solved by upgrading the IDE (and also that required updating GIT).
I am new to maven and I wanted to try it out and I decided to choose Intellij IDEA IDE for this task.
I tried to follow few video tutorial to create simple spring project with maven. But I happen to notice that, while creating dependency on pom.xml file I could not get auto complete for packages that are present on .m2 directory inside my user home directory.
But I can see two item in autocomplete dropdown, one being the self project and other maven-clean-plugin for artifactId
I could not come up with any solution for this. May be this will not affect my development, but I got stuck with this issue and wanted to know what really happened.
I am more than happy to clear myself further if what I am asking is unclear :)
When auto-completing maven dependencies, IDEA uses an index it generates to know what dependencies are available. Go into Settings (Ctrl+Alt+S / ⌘,) > Build, Execution, Deployment > Build Tools > Maven > Repositories. Your local repository should be listed. Select it and click Update for IDEA to update the index on it. It will take a bit of time. The progress will show on the center-right of the bottom status bar of the main IDEA window. If you use a repository manager, like Sonatype's Nexus, you should add it in the "Artifactory or Nexus Service URLs" section in the lower pane. Maven central will also likely be shown. You should update its index as well.
Click the Help button on that settings dialog for more information.
Whenever I try to run mvn clean install on my code, maven runs and start downloading jars, after downloading some jars It give an error i.e. Not able to open xxxxx.jar
On first though i changed that particular jar , but this error is coming for more jars, then i tried to take my friends repository.
And then it works fine for the jars already available in my friends repository. But whenever it have to download new jars from central repository same error occurs.
I tried 100 of time deleting .m2 folder and create it again but no luck.
I also tried switching maven installations or version from different friend and maven official websites but still No Luck
I am fed up of this. Trying from last week.
Please Help
Just a quick suggestion from the top of my head:
You could take a look at the .jar-Files that get downloaded using a text editor or even better some hex-editor. Depending on the network from that you are accessing the repository there might be some kind of proxy-server that intercepts the jar-download-requests and sends back some html-page - at least it might do so in our company-network.
If the text-editor just shows some strange characters try opening the jar-file with some zip-tool (eg. 7zip) and see if that shows some error.
After about 4 tries I've managed to use git to checkout apache's Hadoop source code, issue a
mvn eclipse:eclipse
command and then import all of the projects into eclipse. So far this has been the most successful I have been. I am ALMOST there. I attempted to build and clean all projects and everything was going well. Now I only have 3 errors to get rid of. I would be EXTREMELY appreciate if anyone could help me with this. I have been trying to get this to work for about 2 days or so. Anyway, in Eclipse I have about 20 Hadoop projects. There are only two that have errors. One is called "hadoop-streaming" and the other is "hadoop-tools-dist."
The error says the following:
Project 'hadoop-streaming' is missing required source folder: 'C:/Users/User/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf'
The other errors are mainly related to this one. That's what Eclipse says anyway. I tried to copy the folder to where it was needed but that didn't clear up the error. Does anyone know how to fix this? If you need anything from me just ask.
I don't know how the Hadoop project looks like, but I suppose that it is using maven. So instead of using the
mvn eclipse:eclipse
I would suggest using the import functionality of eclipse -> import maven projects (even though sometimes works harder than one might expect). Related to your issue, this kind of error occurred to me whenever there was some kind of folder that is not added as source folder in eclipse (generated folders for source etc.). So, I would advise checking that the folder you mentioned is already there and if it is added as a source folder. If not, just mark it accordingly (source folder). Clean the project (Project > Clean...) and if need update the maven project(Right click on the parent project > Maven > Update project ...)
Good luck!
In eclipse:
right click on the hadoop-streaming program
select Properties
On the left side of the bar,click Java Build Path button,then select source lable page
delete the path that went wrong
click Link Source
select the linked directory as (your hadoop-src root path)/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf
click Next button, inclusion patterns add capacity-scheduler.xml,exclusion patters add **/*.java
I am having a problem with selecting Maven goals after a clean install of Eclipse (Juno) and m2Eclipse on a Windows 7 machine. M2Eclipse was installed via the Eclipse marketplace.
I've generated a very simple application via the Eclipse wizards. I have selected the Run as.../Maven build... option from the context menu then clicked on
Select to obtain a list of goals. However, the list is empty.
I then followed the instructions in this post which described my problem exactly:
Empty maven goals list
Unfortunately this does not work for me: the list is still empty.
If anyone has any ideas as to what else I can check I'd be obliged.
Many thanks
That's normal behavior ... just type in the goals you want to run. EX., clean package
According to the m2e developers, it is supposedly a feature that wasn't implemented fully. A lot of users are suggesting the button just be removed. I would just ignore it and enter them manually, pretending the button doesn't exist.
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=344997