Recompile java classes without restarting jetty - maven-jetty-plugin

I am using the maven jetty plugin and starting the server from the console using:
mvn jetty:run
Is it possible to make jetty recompile my java classes whenever i change them in the file system?
It's kind of annoying to stop jetty, do mvn clean install and start jetty back again.

Fernando,
The best way to use this plugin is in conjunction with your IDE, which will normally do class recompiles in the background. If you configure your plugin with a non-zero <scanIntervalSeconds> parameter, the plugin will notice changed files and do an automatic redeploy.
Jan

Related

How to run an Act framework application without using intelliJ IDEA

I just started with Act Framework but I do not want to use intelliJ IDEA. How do I run my app on windows and on linux using CLI?
Start Act in development mode using
mvn clean compile exec:exec
and in the production mode with
mvn clean package
cd target/dist
unzip *
./start
I got this from a link in the gitter channel for Act

How to integrate Parasoft (JTest) in Hudson?

I normally use JTest Parasoft as a plugin in Eclipse.
But now, I need to integrate JTest in Hudson, at a way that in the Post-build, JTest should run its tests over a Maven project.
So my questions are :
How to integrate JTest in Hudson? I found a plugin CppTest by Parasoft and not JTest...
How to specify the tests which should be run on the project? For example, configure JTest to run "Find unused code" which is included in "Static Analysis"...?
Thank you a lot.
Jtest has fully functional command line interface so generally integration should not be a problem.
As for your questions:
1) there is a Jtest plugin for Maven, so you will be able to trigger your post-build action easily. It's thoroughly described on http://build.parasoft.com .
2) you can specify the Test Configuration of your choice by using -Dparasoft.config option (i.e.: mvn parasoft:jtest -Dparasoft.config="user://Unused Code").
You can find all the parameters which can be used with parasoft:jtest goal described here: http://build.parasoft.com/docs/maven-parasoft-plugin/jtest-mojo.html .
We have integrated Jenkins with Jtest (Linux)
Downloaded the Jtest installers and installed in Jenkins server (in slaves too if you have slaves attached)
Env variables for same has been set (JTEST_HOME)
And now without any entries for Jtest in Pom or build.xml files, we
can directly call the jtestcli commands either in invoke shell
section or use Jtest goals with maven too.
We need to make sure that we have maven-parasoft-plugin 3.12 and Jtest dependencies available in maven repo (for maven projects) and we should have parasoft-ant-3.12.jar available which we need to place in ant lib folder (for ant projects).

Hudson plugin installation

I am trying to install M2release plugin in Hudson.
I cannot install plugin using Hudson plugin update page due to lack of proxy settings. So i downloaded hpi file and used upload plugin option to deploy it.
Now Hudson home[directory] is showing the plugin inside plugin directory but i can't see the plugin in list of installed plugins on Hudson UI also plugin is not available on job configuration page. I hvae already bounced hudson server twice.
What am i missing here? Any additional steps are needed to install plugin manually?
Your steps seem fine.Since M2release plugin has moved to Jenkins now, so make sure you downloaded the compatible version with Hudson.

How to package hudson.war with extra plugins installed by default

I am wondering if it is possible to re-package the basic hudson.war with some extra plugins so they are installed by default for the end user. If so, what is the process to do this?
I've got a hudson.war which I start up, and then I manually install the plugins that are needed. Is there a way to reverse this process, and create a new hudson.war with the consequent files so that these plugins are installed by default?
Thank you,
-Denali
Theoretically, you could achieve this by adding your .hpi file into the WEB-INF/plugins folder of the hudson.war.
However, I don't think this is a clean approach. Have you considered automating it somehow by using the Hudson cli for instance?
Eg.
java -jar hudson-cli.jar -s http://<hudson_url> install-plugin <your-plugin>.hpi

How do I uninstall a plugin from Jenkins (Hudson)?

I have a few plugins in my Jenkins installation which I no longer need. I've already disabled the plugins (and my build still work), and I'd like to remove the plugins completely. What is the right process for completely removing a Jenkins (Hudson) plugin?
As mentioned by Jesse Glick in his answer, if you are using Jenkins 1.487 or higher, then there is a native way to uninstall plugins in the Jenkins UI. See JENKINS-3070 for details.
If you are using a version of Jenkins earlier than 1.487, then you can try manually uninstalling the plugin. As some people point out in the comments, this may not work on some platforms (in those cases, upgrade to at least 1.487 so that you can use the official uninstall feature).
To manually uninstall a plugin, stop Hudson/Jenkins, go to your HUDSON_HOME/plugins directory and remove both the .hpi file and the folder with the same name. So, if you were going to remove the CVS plugin, you would remove both the cvs.hpi file and the cvs directory.
After that, restart Hudson/Jenkins and the plugin won't be there anymore.
Jenkins 1.487 adds a UI for uninstalling plugins: JENKINS-3070
Deleting the <plugin>.hpi file and corresponding <plugin>-plugin directory will effectively remove the plugin.
However, if you have configured parameters that belong to the plugin within your jobs your Hudson or tomcat logs may contain *CannotResolveClassException: hudson.plugins ... * exceptions because it attempts to load the plugin. This can result in build failures even if build is successful.
To fix that,
go to the job configuration and save it again. This should get rid of the plugin reference
if not, go into the hudson home jobs directory and open the config.xml found under the folder named after the job and remove the reference to the plugin
restart hudson
Hudson Plugins explains that some core plugins ("Tier 1" plugins, as they are called) are shipped with Hudson itself, and I assume cannot be deleted therefore.
You can disable it using the Jenkins ยป Plugin Manager. Go to Installed tab and untick the plugins you want to uninstall and restart Jenkins. Though it does not unintall, at least keeps it away from appearing from configuration pages..