Missing Maven goals when using m2e from Eclipse(Juno) - maven

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

Related

Unable to find Groovy method when building Rhino with Intellij IDEA

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

"Run Anything" action doesn't work for maven commands

While the "Run anything" works fine for other commands It does nothing for the maven ones, literally, It does nothing! For instance, I want to run a mvn clean install using "Run anything" action:
Hitting enter does not show the Run tool window, nor does it show an error message. Again, It does nothing. Note that other commands are working fine.
I am used to running maven commands using this strategy. Can someone help me fix this issue?
I was not able to reproduce the described problem in IntelliJ IDEA 2019.3.4 release and in 2020.1 RC versions.
If the issue persists for you in these versions, please share idea.log file, there must be some exception logged which may help to understand why it doesn't work for you. Most likely, updating the IDE and running with the default settings/plugins per this document will solve the issue.
Also make sure you have a valid Maven project with the JDK and Maven properly configured in the IDE settings.

SonarQube Eclipse Plugin manual download

I want to download SonarQube Eclipse plugin and install on Eclipse IDE manually.(I know it can be download through MarketPlace of Eclipse IDE, but I need to do manually.) Anyone knows where it is possible? Any official site available ?
1.) Go to Help > Eclipse Marketplace... and search for "SonarQube". If you are not finding SonarQube. Follow next steps
Go to Help > Install New Software... This should display the Install dialog box. Paste the Update Site URL (http://downloads.sonarsource.com/eclipse/eclipse/) into the field Work with and press Enter. This should display the list of available plugins and components.
2.) Check the component you wish to install (see Features details).
3.) Click Next. Eclipse will then check to see if there is any issue which would prevent a successful installation.
4.) Click Finish to begin the installation process.
5.) Once the installation process is finished, Eclipse will ask if you want to restart the IDE. It is strongly recommended that you restart the IDE.
Download from Bintray => https://bintray.com/sonarsource/SonarLint-for-Eclipse/releases/_latestVersion
The link is given at Sonarlint for Eclipse Homepage
In my experience SonarLint is not equivalent to SonarQube. When not bound to SonarQube it reports many errors we don't care about. Bound to our SonarQube it reported, for example, about 10 errors compared to 303 on our SonarQube. See this comment

Intellij does not displays repos on auto complete drop down

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.

How do I clear teamcity's maven dependency repository/cache

I have a teamcity server and I have maven dependencies which have changed but who's versions have not changed. From what I can tell this is causing my build to fail because teamcity is not updating these dependencies.
So I need to know how to clear out teamcity's maven dependency cache for my project. I looked through the documentation and didn't find anything significant.
Thanks!
Rather than trying to manually clear the local Maven repository on the server running Teamcity, it may be easier to force an update of the Maven dependencies in the Teamcity settings.
To do this, edit the settings for the Teamcity project (in the Teamcity frontend select the project and then select the 'Settings' tab). Next click the 'Edit Configuration Settings' link (top right) and then click the 'Build Steps' link on the right hand side. In here, edit the step responsible for compiling the code. On this form, in the 'Goals' field, add the argument -U (that's an uppercase 'U').
Save the settings and kick off a new build. That extra argument will force Maven to go and update its dependencies.
Going forward, if the dependencies are changing but their versions are not, you may be better to have their versions set as SNAPSHOT. See What exactly is a Maven Snapshot and why do we need it?
Found mine at /opt/buildagent/system/jetbrains.maven.runner/maven.repo.local.
I found mine in /opt/TeamCity/buildAgent/system/sbt_ivy/cache/, But if you can SSH to your machine, just run sudo find / -name "sbt_ivy" and you'll see the address of ivy in your machine (if you use SBT as I do)
You can actually go to Version Control Settings and there is a checkbox "Delete all files in the checkout directory before the build".

Resources