Eclispe/STS terminates the maven program without output in console - spring

I am using Eclipse/STS with Maven and also pointing eclipse/sts maven path to local direcotry for my artifacts repository. However, when I run or debug the maven project, it gets terminate without any output on console, also other team member are using same setup of maven in eclipse/sts but they do not face any such problem. When I run the project from command prompt it run fine without any problem.
Is there any solution for this, I have tried in eclipse and STS and facing same problem. I would appreciate your inputs.

I was using maven which is not compatible with STS/Eclipse due to which it was terminating the program immidiatly after running!!!

Related

FitNesse: Could not invoke constructor for SeleniumDriverSetup[0]

So, I've successfully completed the installation of IntelliJ using hsac-fitnesse-fixtures installation guide.
Next I've set up a project, added the IntelliJ Idea Fitnesse plugin, added a Maven configuration.
FitNesse runs correctly, ending with Starting FitNesse on port: 9090
Next I try to run a test on a test environment, but that fails.
The 1st failure is:
Could not invoke constructor for SeleniumDriverSetup[0]
The 2nd failure is:
The instance scriptTableActor.startDriverFor. does not exist
This is an HSAC environment.
I'm sorry I did not see you question earlier.
It appears I did not update the installation guide when making a change to how the wiki should be started from the IDE. I only updated the project's README.
Anyway the problems lies it the command used in the maven configuration the guide instructed you to make. The Maven command has to be compile dependency:copy-dependencies exec:exec and the guide missed the 'dependency:copy-dependencies' part. Using compile dependency:copy-dependencies exec:exec should fix your problem.

Maven - Jenkins issue

There are couple of issues I am facing in Jenkins integration . I run the scripts from local Eclipse and it works perfectly fine with Selenium Grid. I am trying to setup this whole thing in Jenkins and facing the following issues
1. cannot find symbol - Seeing this issue in Jenkins and searched about this in Stack Overflow . Verified the JDK version and my pom.xml version matches with the one installed in Jenkins.
2.I have three packages- One has the framework , second one has the main method and the third one has the code related to the application i am testing. I am converting my framework to a jar and uploading the entire thing to GIT . When i build the project jar using Maven install , its not including the framework jar which is causing the issue . I tried a lot of things suggested in Stack Overflow and it did not work. I am quite new to this kind of Maven stuff
3. I am not even able to run the scripts with the help of the runnable jar in my local because of issue# 2
Some of these have already been posted but i tried out those things and did not work for me or I might be missing something
In Maven you have a file called settings.xml which contains URL of the location from where you want to fetch all your dependencies like here JAR files in your case from GIT. It works from your eclipse because maven looks for dependencies in your .m2 folder which are there when you run it from eclipse. But, in order to build it from anywhere else you need to specify that URL in maven's settings.xml

How to have Buildship recognize existing projects in Eclipse Mars

I just converted my Maven project to a gradle project. It was a multi project structure:
master-project
pom.xml
---->project1
-------->pom.xml
---->project2
-------->pom.xml
---->project3
-------->pom.xml
I ran a gradle init on it and have this structure now:
master-project
build.gradle
---->project1
-------->build.gradle
---->project2
-------->build.gradle
---->project3
-------->build.gradle
Everything builds fine, and I have been able to get some things done with that I couldn't figure out how to do with Maven, so that's great. Next step was to integrate that into the IDE since the Maven Dependencies are gone since I have removed the pom.xml files.
However the project isn't recognized as a gradle project - and I am not sure how to change that?
In Eclipse Mars it's still recognized as a Maven build, not gradle....
Thanks in advance.
EDIT: I reimported the projects which enabled the plugin for Eclipse. Now I am having weird behavior.
The build works from the command line, however when attempting the same execution from within Eclipse, it fails trying to copy the file dependencies.
For example:
Couldn't copy dependency jakarta-regexp-1.4.jar
java.nio.file.NoSuchFileException: C:\Users\user.m2\repository\jakarta-regexp\jakarta-regexp\1.4\jakarta-regexp-1.4.jar -> build\jfx\app\lib\jakarta-regexp-1.4.jar
I haven't changed the repo from maven yet - just changed the build scripts. This is running from the master project. So I am confused as to why the script would work from the commandline but not from within eclipse.
EDIT 2: Turns out this behavior is also present when running from the command line when the --daemon flag is set. Is there anyway to run the tasks without the daemon in Buildship? Or perhaps a way to fix this issue when the --daemon flag is enabled?
Thanks.
The issue with the build was that there is a leak in the JDK when bundling the JRE with the native app. This only happens when running with the --daemon flag (which all IDEs user). Therefore until this is fixed you will need to run gradle --stop and then run the clean.
The plug in I am using is no longer running the native task when running with --daemon.

Maven. Creating a project offline fails so how do I begin?

First off I'm not on a separate system in order to post this question and have no way of connecting the other system to the internet. This machine I'm on is locked down so I am not able to install or do anything other than email and view the web for research.
Used Reference: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
Environment: Maven 2.2.1
Yes the Maven build functions fine for the existing project.
Situation:
I'm new to Maven and this project I'm on, the other developers are GONE. There is a .bat file that was used to run the project builds and that's all I know of Maven.
I am attempting to learn Maven on the other machine that has it installed I am using the Apache site mentioned above. The instructions tells me to create a project using the command
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false but, I get the
'BUILD FAILURE'
Error reading archetype catalog http://repo1.maven.org/maven2... (and other errors)
The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype=quickstart:1.0
So, question is what am I to do in order to create a dummy project so I can see WTF is going on with Maven when I'm in an environment that is not able to reach the 'maven.org' site?
If there are threads on learning Maven offline that someone can point me to that too would be of use. I'm not seeing anything though that helps me get started on this.
Thank you for looking and your time.
The problem seems that maven is looking for the architype on the central repository.
You can create your own pom.xml with an editor:
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

IntelliJ steps through the wrong lines when debugging remote Java application

I tried to remote debug a maven plugin for a liquibase project with Intellij. IDEA is highlighting the wrong source code line.
I manually built and installed the plugin in my local maven repository from sources in my Intellij project. Intellij version is 11.1.3 and maven version is 3.0.4 running on Ubuntu 12.04.
For debugging the maven plugin I used mvnDebug comand.
If someone has any ideas please give me some advice. I'm not too used to remote debugging (in fact this is the second time I've done this).
For me, whenever IntelliJ is highlighting the wrong line, it was always because the version of the JAR/classes being used to run the application differs from my source files - i.e. different version of the sources were used to build the JAR and/or classes.
You are going to have to be sure that you are working from the exact source that was used to build the classes you are debugging.
You can verify this by looking at the classpath being used to launch the application, locating the JAR file or classes directory that contains the classes you are debugging, and verifying that they were built from the sources you are inspecting.
Note that when you are debugging third-party libraries, you often can download the "sources" jar (see IntelliJ2-IDEA get Maven-2 to download source and documentation).
If you stumbled across this post, and sure that the source and JAR are the same code, then this could be your problem.
http://youtrack.jetbrains.com/issue/IDEA-8021
Instead of doing remote debugging you can run the plugin directly from IntelliJ.
Have the liquibase plugin project loaded in IntelliJ by just pointing at the pom.xml.
Choose Edit Configurations...
Press the + button to Add New Configuration.
Select Maven.
Enter the Working directory to the project you want to run the plugin on.
Enter the Command line. Could be process-sources, compile or liquibase:status depending on what you want to do.
Press OK
Set a breakpoint in the Liquibase Mojo.
Now you can start this configuration by pressing Shift+F9.
Maven will start and finally you will see that your plugin is waiting at the breakpoint!
Make sure that you have defined the plugin in the target pom.xml with correct version and also that you build the plugin before launching it. You can ensure that by enabling Make in the Before Launch pane.

Resources