IntelliJ, Maven, JRebel (?), Tomcat and Continuous Integration. How To? - maven

I am new in Java and Continuous Integration. I want to setup a development environment using IntelliJ, Maven, GIT and JRebel (this was strongly recommended by a friend of mine). Tomcat Server is on AWS, not on my local Mac OS X machine. Is it possible to use GIT / JRebel and 'update' the remote project on the fly (after saving the files?). Which modules should I install on my Mac and which on Tomcat? Do I need Jenkins as well?

With JRebel Remoting, it is possible to push the changes to the remote applications, without having to configure any extra ports even. This is applicable if you would like to code something in the IDE, and then just push the changes to the remote application. But if you'd like to run the full test suite, then it is better to do via CI and then you will have quite different process - you will have to wait a bit longer until your changes become visible in the running app.

Related

How to get Jenkins repository server to host only stable builds?

I have Jenkins version 2.7.1 running on a Windows 7 machine. It is successfully pulling code from a subversion repository and running tests. I have the test jobs set up for the development branch of each project only.
We periodically make stable releases of the projects in jar files with version numbers. I would like to have Jenkins be the repository manager for those stable releases. These are made by hand - There is no Jenkins job making or testing stable releases. The projects do use Maven.
Each stable build is tagged in the subversion repository, so it could be made again on demand if needed.
I downloaded the Maven repository server hoping to make this fit the purpose. I read the documentation that's provided, but it's pretty terse. As I understand it and have it configured now, this appears to have a couple of issues:
If I go to jenkins-ip/plugin/repository/project, it has made directories there that expose the names of all of my projects, which seems undesirable. (Here jenkins-ip is the IP where I access Jenkins on my local network.)
On the other hand, there's nothing but empty directories under these projects, so they're currently useless.
These projects all correspond to the continuous testing of the development branch. There's no apparent way to get the stable builds into the hierarchy. (It doesn't seem efficient to create a job for each stable release...)
Is there anyway to get Jenkins (with this plugin or through another method) to be the repository manager just for the stable builds? I know that I can start a different repository manager like archiva, but it would be ideal to use Jenkins since it's already running and it seems to claim capability for this function now.
To use Maven repository server you have to build the project on Jenkins.
Then the plugin will expose all archived artifacts as maven repo.
Note you need to use a "Maven project" type for it to work (freestyle is not supported)
There are several plugins that will help you manage building from multiple tags, however not all of them work with "Maven project" type.
You could also try Jenkins pipeline (previously "Workflow") or the Job-DSL plugin.
A simplest solution would be to have a build parameter specify the tag name (then checkout e.g. ^/tags/projectname/${tagParam}), but you have to figure out how to trigger the job then.

Alfresco deployment doesn't work

I've created the simple example from here, then packaged it using mvn package, and made an effort to deploy the result amp file as described here. But after restarting Alfresco I didn't see any changes. There were no new variants of workflow to choose. The java -jar alfresco-mmt.jar list <WARFileLocation> executing showed that modules org.alfresco.integrations.google.docs and org.alfresco.vti are installed in the chosen war but not a word about my helloworld workflow
UPD: I looked deeper through the tutorial and found that to add an activiti to the share u first need to add some other activiti to the alfresco. it is told there:
Open a command-line window and switch to
$TUTORIAL_HOME/workflow-tutorial-repo. Run mvn integration-test
-Pamp-to-war -Dmodule.log.level=debug. Your repo tier project will be installed and started on Tomcat running on port 8080. Open a new
command-line window and switch to
$TUTORIAL_HOME/workflow-tutorial-share. Run mvn integration-test
-Pamp-to-war -Dmaven.tomcat.port=8081
why is it so? I can't just deploy the only one project to the share but need to make a progect for the Alfresco first?
By the command you wrote you start repo. Since share and repo running on the same server they should run on different ports, so for share you need to provide another port, which is done by additional parameter: -Dmaven.tomcat.port=8081
UPD
#NikitinMikhail The quote you've added describes how to start share.
Alfresco consists of two projects (according to the maven sdk you use) which are repo and share.
Alfresco Share provides a rich web-based collaboration environment for managing documents, wiki content, blogs and more. Share leverages the Alfresco repository to provide content services and utilises the Alfresco Surf Platform to provide the underlying presentation framework.
In other words share is just separate project which communicates with repo and provides better user interface than repo.

Automatic Updatemechanism for OSGi Bundles

I'm looking for an automatic update mechanism in my Equinox environment.
I am developing bundles which use remote Services. So I have multiple clients which communicates with each other.
Now I'm looking for a way which automatically installs the new Version of a Bundle when I deployed it in Eclipse.
At the moment I'm doing it the following way:
Increase Versionnumber
Deploy in eclipse
Start a script to sync the bundles to all my clients
On each client: Uninstall old version, install new version.
But I would like to have it like this, which would save me a lot of work:
Increase Versionnumber
Deploy in eclipse
Start a script
Each client automatically uninstalls the old version and installs and starts the new version.
I already tried Felix Fileinstaller which worked partly. The problem there was, that Fileinstaller didn't uninstalled the old version and did no autostart of the Bundle.
I also had the Problem that after a while there were many Bundleversions in my load directory and when I restart the environment each bundle in there is installed.
If you use Equinox you should take a look at p2. It's the provisioning mechanism used inside Eclipse for updating Eclipse and installing new Eclipse bundles. It also works in a headless server environment.
We use p2 in the Eclipse Gyrex project to perform the automatic installation. The process is as follows:
Apply versioning manually in Eclipse (increase version number)
Export bundles into p2 repository (either from Eclipse or using Tycho/Maven)
Deploy p2 repository to web server
Client install update automatically
Each client periodically checks a p2 repository for updates and installs any available updates. The p2 repository is made available on an internal web server.
There are alternative options available for OSGi. For example, OBR is the approach recommended by the OSGi alliance. Unfortunately, p2 doesn't support OBR yet. But if you are using Apache Felix, you should be able to use OBR for your purposes.

Where to observe application deployed by Jenkins?

Question from a first-time Jenkins user. So I hope you wouldn't mind if the question is too silly.
I have installed jenkins on a Ubuntu machine, and is accessible at localhost:8080. I have successfully configured it to work with Maven2 and Git as well. Next, I created a job/project (A Java/Spring application), and got it to build without error on Jenkins as well.
Now my question is, where do I see this application running? :)
Best Regards
James
To deploy : http://mojo.codehaus.org/tomcat-maven-plugin/plugin-info.html to do it with maven or https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin to do it with jenkins
You can see the console output in the running job if you click the running job and look for the link on the left hand side.
Building and deploying are two different things. Jenkins can do the latter for you too but you need to have it configured in your maven project. Typically this is accomplished (for tomcat) using the tomcat maven plugin

CI Servers for system simulation

My group work for a software of simulation for plane. To achieve a faster and easier validation and verification, we decided to introduce continuous integration. But I have no idea which CI servers should we choose.
Our contraintes:
- We need to compile in different machine with different platform( Linux, HP ) in local net and in client's net.
I mean, we need to call different functions in different machine in distance. Some of them will need a authorise
- We prefer a CI servers open source
- The sources are in different languages, C, C++, Java ...
- Support SVN, CVS, Clearcase
- Automated tests and reports
- The tests need different machines working together
I've seen teamcity, it seems well, but it's not open source.
Hudson is for you!
Edit to be more precise about your requirements:
Hudson run on a JVM (standalone service, using Jetty, or on a Tomcat server). Thus, the plateform is not a problem.
Hudson is open-source.
Hudson manages Java projects natively, but you can ask him to compile C, C++ or .Net projects.
Support SVN, CVS natively, and a plugin for Clearcase exist (here).
Automated tests and reports: You will need to implement them, of course, but Hudson will launch them for you. For Java projects, simply use Maven for that!
The tests need different machines working together: Hudson can be launched on several machines (one master, several slaves). Each slave can be hosted by any kinf of machine.
+1 for Hudson.
We are using Hudson together with SVN (version control) and Selenium RC (functional testing).
Very easy to set up, has tons of modules for integration, and very visible to all members of the team, especially if you're using the Hudson Build Monitor Firefox plugin.
I used Jenkins earlier, but now I prefer only TC due to it is great for a lot of purposes.
If you need to work with different platforms, it has great opportunity to install a few build agents with OS specified. Also you're able to install so-called Agent Clouds.
If you need to build your applications per branch — it will be done without any extra-scripting.
A lot of VCSs are supported.
Using Maven you're provided to build even Flex applications, even with running automated test (in case of Windows build agent installed).

Resources