background preloader

Maven

Facebook Twitter

Using the Maven Release plugin: Things to know. When should the code be tagged?

Using the Maven Release plugin: Things to know

How is the release/branch/tag process related to deployment? How should we branch during the release process? Should we branch early on in the release? Or, should we just continue on in trunk and only branch when we need to start parallel development? Who performs the release and from what machine? This is a sample of some of the questions I’ve been asked by customers over the past few years, and, believe it or not, my answers are always a little less than satisfying. What we call “The Release Process” is seldom simply a technology problem and more than often involves process, organizational structure, and definitions of responsibilities. The Maven Release plugin provides one model that solves a few of the technical problems involved in the release process. Prepare: build, test, release version update, commit, tag, next snapshot version update, commitPerform: export a release from SCM, run the deploy goal.

Create a Maven Archetype from an existing project. Maven archetypes are project templates that can quickly jump start new projects that are based on a set of core files.

Create a Maven Archetype from an existing project

Maven Archetype Plugin. Maven 3 Code Analysis and Reporting. MavenCodeCoverage. This document describes how to display test coverage for your Maven project in NetBeans, via the Cobertura Maven plugin.

MavenCodeCoverage

Installation and setup This document assumes NetBeans 7.0 or later. The test coverage functionality is provided by the Maven Test Coverage plugin, which is available for 7.0 on the dev update center and also the plugin portal. Start up the IDE, go to Tools | Plugins and search for "coverage". If NetBeans finds the plugin, install it by pressing the Install button and following the wizard. NetBeans 7.1 and later include the plugin by default, so you do not need to download anything. [#JAVANCSS-51] net.sourceforge.cobertura.javancss.parser.ParseException thrown when parsing class - jira.codehaus.org.

How do I generate a javadoc report for a site? Maven - Site Generation. No one wants advice, only collaboration. -- John Steinbeck Introduction Most software projects today are developed by more than one author.

Maven - Site Generation

If a project is successful, it will have more than one user. These may seem like trivial observations, but they both point to a single, critical need for every software project, that enables its development and user communities to thrive: a project website. Project-oriented websites often contain all sorts of material, from FAQs and new-user guides to design documents, code reports, issue tracking, and more. Guide to Configuring Plug-ins. The following is only to configure Build plugins in the <build> element.

Guide to Configuring Plug-ins

Using the <executions> Tag You can also configure a mojo using the <executions> tag. This is most commonly used for mojos that are intended to participate in some phases of the build lifecycle. Using MyQueryMojo as an example, you may have something that will look like: Setting Up a Maven Repository. 1.

Setting Up a Maven Repository

Introduction Maven is a popular build tool available for java developers. One of the benefits of maven is that helps to reduce the duplication of dependent software libraries (jars) required to build an application. The maven suggested approach is to store all the software libraries in a remote store called a repository. Maven synchronizes with the public repository at ibiblio.org This repository is slow, unreliable and does not have the latest versions of some libraries(jars) available elsewhere. Archiva - The Build Artifact Repository Manager. Archiva in a Team: Part 1. Exclusive offer: get 50% off this eBook here Apache Maven 2 Effective Implementation — Save 50% Build and Manage Applications with Maven, Continuum, and Archiva by Brett Porter Maria Odea Ching | September 2009 | Java Open Source This article by Maria Odea Ching and Brett Porter showcases the different techniques and ways for getting the best out of using an Archiva repository.

Archiva in a Team: Part 1

We will learn a little bit about access control in Archiva, how to configure and use a virtual repository, and a whole lot about maintenance. In preparation for the latter sections of this article, let's familiarize ourselves with the user roles and permissions available in Archiva. Redback - Ldap Integration. Redback has limited support for ldap has been added as an authentication source.

Redback - Ldap Integration

Limited support for ldap means: Read-Only User Managementxml and properties based configurationtested against open ldap on linux and apacheds 1.5.0/2.0.0 and OpenDj Setting up Ldap Configuration for ldap is actually a relatively simple procedure, a few components definitions need to be declared in an appropriate application.xml and then some configuration options must be set in the security.properties file.

The applicationContext.xml Additions These components should be defined in the applicable spring configuration files. OpenLDAP, Main Page. Unable to get Apache Archiva working with LDAP. Artifactory. Meet Artifactory One Minute Setup!

Artifactory

Watch the Screencast Meet Artifactory, the world’s most advanced repository manager. Releasing Projects Using Maven. Maven release plugin cheat sheet - Release Management. This page assumes that project poms are properly configured for performing a release and that the deployer's settings.xml file is also properly configured.

Maven release plugin cheat sheet - Release Management

General rules Release from *.x branch. Prerequisites Maven 2.0.10 minimum, Maven 2.2.* recommended. Review merges/commits Confirm that all merges scheduled for release have been merged and committed to the target *.x branch. Check out project. Creating a build pipeline using Maven, Jenkins, Subversion and Nexus. For a while now, we had been operating in the wild west when it comes to building our applications and deploying to production. Builds were typically done straight from the developer’s IDE and manually deployed to one of our app servers. We had a manual process in place, where the developer would do the following steps. Check all project code into Subversion and tagBuild the application.Archive the application binary to a network driveDeploy to productionUpdate our deployment wiki with the date and version number of the app that was just deployed.

The problem is that there were occasionally times where one of these steps were missed, and it always seemed to be at a time when we needed to either rollback to the previous version, or branch from the tag to do a bugfix. Sometimes the previous version had not been archived to the network, or the developer forgot to tag SVN. How to Build True Pipelines with Jenkins and Maven. The essence of creating a pipeline is breaking up a single build process in smaller steps, each having its own responsibility. In this way faster and more specific feedback can be returned.

Lets define a true pipeline as being a pipeline that is strictly associated with a single revision within a version control system. This makes sense as ideally we want the build server to return full and accurate feedback for each single revision. As new revisions can be committed any time it is natural that multiple pipelines actually get executed next to each other.

If needed it is even possible to allow concurrent executions of the same build step for different pipelines. 3.9. Running Jenkins Behind an Apache Server. If you are running Jenkins in a Unix environment, you may want to hide it behind an Apache HTTP server in order to harmonize the server URLs and simplify maintenance and access. This way, users can access the Jenkins server using a URL like rather than . One way to do this is to use the Apache mod_proxy and mod_proxy_ajp modules. These modules let you use implement proxying on your Apache server using the AJP13 (Apache JServer Protocol version 1.3). Using this module, Apache will transfer requests to particular URL patterns on your Apache server (running on port 80) directly to the Jenkins server running on a different port. So when a user opens a URL like , Apache will transparently forward traffic to your Jenkins server running on .Technically, this is known as “Reverse Proxying,” as the client has no knowledge that the server is doing any proxying, or where the proxied server is located.

Maven Release plugin - Frequently Asked Questions. How to prevent generate-sources phase executing twice. The Problem So, you've been using Maven to build your project. You require to generate some sources, so you've figured out how to attach a plugin goal to the generate-sources lifecycle phase. This looks like it works great for a while running mvn package .... When you decide to finally release your project using the maven-release-plugin, you notice that your source generation plugin executes twice, slowing your build and possibly even breaking it. You are now trying to figure out why your sources are being generated twice, or more specifically why the generate-sources lifecycle phase is being executed twice.

What exactly is a Maven Snapshot and why do we need it. Maven Deploy. Introduction The Deploy Plugin has two basic functions. In most project builds, the deploy phase of the build lifecycle is implemented using the deploy:deploy mojo. SoapUI Maven Test Automation. How to execute 2 SoapUI test projects during Maven's lifecycle. Web service testing with soapUI « Don't Panic! In my previous post regarding Spring-WS and Security I didn’t mention anything about testing the resulting SOAP service. SoapUI Mock integrated in Maven test. Integration of soapUI tests in maven build lifecycle. This article extends the basic example described in "Web service testing with soapUI". Sometimes "Missing operation for soapAction" JAX-WS Maven plugin - Maven 2 JAX-WS Maven plugin — Java.net. JAX-RPC client with Maven2. Inclusions and Exclusions of Tests. Inclusions By default, the Surefire Plugin will automatically include all test classes with the following wildcard patterns:

Configuring the Jetty Maven Plugin. Starting an H2 Database Server from Maven. H2 Features. Feature List Comparison to Other Database Engines H2 in Use Connection Modes Database URL Overview Connecting to an Embedded (Local) Database In-Memory Databases Database Files Encryption Database File Locking Opening a Database Only if it Already Exists Closing a Database Ignore Unknown Settings Changing Other Settings when Opening a Connection Custom File Access Mode Multiple Connections Database File Layout Logging and Recovery Compatibility Auto-Reconnect Automatic Mixed Mode Page Size Using the Trace Options Using Other Logging APIs Read Only Databases Read Only Databases in Zip or Jar File Computed Columns / Function Based Index Multi-Dimensional Indexes User-Defined Functions and Stored Procedures Pluggable or User-Defined Tables Triggers Compacting a Database Cache Settings Feature List Main Features.

An introduction to Maven 2. Maven is a popular open source build tool for enterprise Java projects, designed to take much of the hard work out of the build process. Maven uses a declarative approach, where the project structure and contents are described, rather then the task-based approach used in Ant or in traditional make files, for example. Profiles. What Are They For? Hudson Best Practices. Maven Profile Best Practices. POM Best Practices. Super POM. How to Migrate from Ant to Maven: Project Structure.

Integration Testing - Maven User. Maven Failsafe Plugin - failsafe:integration-test. Agile Engineering Techniques: Separating Maven Unit & Integration Tests.