maven user prompt works from windows cmd, not from cygwin - maven

I recently reinstalled cygwin from fresh, and am now seeing an issue with Maven builds.
A specific maven plugin I am attempting to use pops up an interactive prompt...
From the windows cmd, the user can enter their info:
What is the feature branch name? foo
From cygwin, it appears that maven keeps recieving some form of newline, because I see:
What is the feature branch name? What is the feature branch name?
What is the feature branch name? What is the feature branch name? etc...
Has anyone else seen this, know how to fix this?

Has anyone else seen this, know how to fix this?
Yes, and there are several developers who seem to have a fix for it. Look in Jira for the Maven and Mojo projects and search for cygwin. You'll see equivalent issues and a lot of them have been fixed.

Related

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

jenkins enable maven command line

I want to setup jenkins using the command-line only. I am successfully able to install plugins and configure jobs. So i've installed the maven-plugin using jenkins-cli but want to be able to configure it to say "Automatically install maven latest version" so that when the user triggers a build it will automatically go download maven and then use it just like it does using the GUI.
Any advice on how i can do this piece of configuration on the command-line (or scripted ideally) please?
This option is not and should never be available for the reason that it destroys the concept of reproducible builds.
Changing the maven version deliberately may break the build at some future time for no apparent reason and will definitely startle your users then.
Please avoid this situation.
Why not use maven wrapper instead, this way each project configures specifically which version of maven it needs and automatically downloads it.
https://github.com/takari/maven-wrapper
https://github.com/takari/maven-wrapper/blob/master/README.md

Getting Maven to Report Which File Has Local Modifications

I have a Jenkins job that builds a simple Maven project. If all I do is build, it works just fine. The problem arises when I try and do a release, dry run or regular. It consistently fails with the Cannot prepare the release because you have local modifications error. I have wiped out the workspace, but the problem persists. Is there any way I can get Maven to tell me which file it thinks has been modified? I would assume that by wiping out the local workspace and immediately running the dry run release that there wouldn't be any opportunity for anything to get modified.
Please note, I do not have access to the Jenkins server or the slave that is running the actual release build, so I can't use any tools there (like SVN) to determine what is supposedly modified.
You can use the Maven SCM plugin to do a diff.
https://maven.apache.org/scm/maven-scm-plugin/diff-mojo.html
Basically, integrate the maven plugin upstream of the failure, and see if anything has been changed. I imagine you might be able to see the output in the log, but if you cannot, you might be able to move your "real" maven pom.xml aside and replace it with one that generates a diff file and with the help of the maven build helper plugin, attaches that file as an additional aritfact (to a pom target).
It turned out the solution to my problem was to not use the "Local to the workspace" strategy for my private Maven repository in the Jenkins job configuration. By changing that to the "Local to the executor" strategy the problem went away. I'm still not sure why it was having the problem in the workspace, but this solution resolved it form me, and might work for others.

Missing Maven goals when using m2e from Eclipse(Juno)

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

Why does the Hudson Integration Game plugin does not work after update?

Recently I updated the cigame-plugin for Hudson to version 1.12. Now I recognized, that no build get points at the moment. The builds are SCM-triggered and the CI-game is activated for the project and the user. What is going wrong? How can I fix it?
EDIT: I have to correct, the update to the new version of the plugin isn't the problem. Looking through the build-history I can see, that after this update builds got a score. But at some point the builds are not longer scored. Nothing happened to hudson at this time, no restart, no reconfiguration etc. Simply SCM-changes came in and triggered builds.
EDIT 2: The ci-game-plugin counts a score for builds started manually, but not for builds started by changes in version-control. I have no idea why it behaves this way.
EDIT 3: Further investigation shows that I have this bug with the same stacktrace produced.
This is so specific to the current state of the Hudson plugin ecosystem, I suggest you go directly to the users mailing list with the question, where the plugin developers can help you directly.

Resources