Jacoco w/ Jetty + Selenium RC - maven

I come back here because I have some kind of problem. (I posted 2 or 3 questions before about a project I'm working on, this question is still related to this project)
So I have a smartGWT webapplication which I build using Maven. To unit test it, I had to use Selenium RC (to be able to use the user-extensions.js provided by smartClient), and as it must be compatible with the continuous integration, I had to deploy the webapp on a Jetty container. Now I only got one problem left :
How can I use Jacoco with Jetty to make Sonar recognize my tests and give me code coverage ?
Is there a property in the jetty-maven-plugin that allows me to run the jacoco-agent each time the application is deployed ?
Thanks in advance, one more time =)
(Sorry for my bad english)

It seems that your only option is the cargo plugin.
As described in the link to the duplicated question Jetty is executed in the same JVM as Maven.
So if JVM options are not possible you have to use the cargo plugin.

The maven-jetty-plugin has recently added support for running jetty in a separate JVM, ala cargo, so you might be in luck: http://jira.codehaus.org/browse/JETTY-991. Otherwise you can use cargo (that is what I do).

Related

IntelliJ SpringBoot dependency problems

I'm trying to follow several tutorials on how to use Spring Boot, however I keep running into issues where none of my dependencies are working properly. Below is an image displaying my problem.
I've tried making sure that I installed Maven correctly, however I imagine there is something that I'm doing wrong. I think that I have Maven in the proper Paths but, but I can't tell why it would still be providing the errors that it does. I've followed what it stated to do for Windows users, and have as follows.
Whenever I run mvn -version I am getting the following.
Can anyone help guide me in order to properly have Maven working on IntelliJ?
If you are using IntelliJ IDEA then I suggest using Spring Initializr which would create sample application with correctly configured maven setup is you choose Maven Project for Type:
http://blog.jetbrains.com/idea/2015/03/develop-spring-boot-applications-more-productively-with-intellij-idea-14-1/
Are you using Gradle or Maven to import required dependencies? If not, follow the guides here:
http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/
If you have them setup, try to click one of the error and then click the red light bulb icon, see what it suggests you to do.

How to setup the maven project to run the JMeter tests?

I am trying to setup the maven project to run the JMeter tests. Please let me know the way to setup the things to run the JMeter tests using Maven.
For me, most natural option is to use jmeter-maven-plugin:
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin
It has good wiki with plenty of configuration examples.
I documented it all here. This project describes how to do it with Gradle and also with Maven. Personally, I think the Gradle version is a little more stable but the Maven version allows for nice HTML reports.

Spring Test Without Maven

I want to do unit test on Spring Web Application using Spring Test. When I tried to learn in web got all the tutorials with maven. We are not using maven in our project. Is there any way to do this test without maven.
maven is a tool for build processes. You really don't have to use it.
What you need is to write tests with a testing framework, for exapmle junit
The dependencies you need (spring, junit) must be in your classpath. If you're not using maven then any other way you prefer.
You can use this question to run tests from command line if that's what you need.
To make it clear in other words - maven provides you with a build cycle that downloads your dependencies and put them in your classpath. This is something that you can do manually (configure your classpath and put needed jars in the classpath). The second thing maven gives you is the test life-cycle. But you don't have to use it and you can run unit-tests from command line according to the link I put in bullet 3 or running through the IDE. Most of eclipse and Intellij versions come with built-in support for running tests.

How should I set up a Maven/Groovy project in STS?

I have a project that uses some Java and some Groovy, and it's all built with Maven. We use the GMaven plugin to compile the Groovy. I've been using Eclipse and have got fed up with the "Plugin execution not covered by lifecycle" message that indicates Eclipse is incapable of doing what my command-line does (I've tried adding the ignore/execute config to fix it, but it never works properly), so I've switched to Spring Tool Suite, which claims to have full Groovy support. How should I set it all up? So far I've had exactly the same experience as with regular Eclipse, but given that SpringSource are responsible for Groovy, I figure there must be a way of doing it.
Have you read this thread?
http://forum.springsource.org/showthread.php?130130-Working-with-Mavenized-Grails-projects-in-GGTS-3-1-0-Updated-for-3-1-0-release/page2
For grails projects, you do not need to use gmaven or the groovy-eclipse-compiler. You must be using the 3.1.0 STS (which is not actually released yet, but you can get this
You also must be using Grails 2.1.1.
You can secretly get a 3.1.0 release build by going to this download page:
http://www.springsource.org/downloads/sts-ggts
Instead of clicking on the links, copy them and substitute 3.1.0 for 3.0.0.

Configure tomcat runtime using maven

Is it possible to configure a complete tomcat runtime within Eclipse using Maven/m2eclispe.
A maven goal to downloaded tomcat, create the server withing the eclipse environment and add the specified war files to the server ?
Or can some of these goals be implemented ?
You might want to take a look at this solution or check out the maven cargo plugin.
The first solution uses the sysdeo tomcat plugin, which I've personally used in the past, which worked quite well. It does not download tomcat though for you. You will have to do that manually.
Right now I'm working with the maven cargo plugin (not an eclipse plugin though), which will download a tomcat instance for your for development purposes.

Resources