Posts

Showing posts with the label maven

Markdown format is enabling write once read everywhere ?

original hosted in google docs :  Markdown format is enabling write once read everywhere ?

MAVEN PLUGIN(S) SERIES - Housekeeping of dependencies

PROBLEM   After a continuos use of maven for project lifecycle management , usually, the local dependencies' repository growth, risks to go  out of control . SOLUTION There are some plugins that help us to do housekeeping on local dependencies' repository. Build Helper Maven Plugin    This plugin contains various small independent goals to assist with the Maven build lifecycle. Maven Dependency Plugin The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location. The goal  remove-project-artifact of builder-helper plugin, r emove project's artifacts from local repository and it's useful to keep only one copy of large local snapshot. The goal  purge-local-repository of maven-dependency plugin,  remove the project dependencies from the local repository. I suggest you to take a look at both of them in order to understand their...

PlantUML & Maven - Enrich your project's documentation

As read in previous post  " PlantUML a DSL for creating UML Diagram quick & easy ", plantUML is a text based Domain Specific Language (DSL) that helps who need to design UML diagrams, offering also a good integration in IDE like  Eclipse and Netbeans  Another its great feature is the integration with maven that allow us to put our plantUML files within our projects,  generating diagrams  during a project's lifecycle phase (e.g. during site generation), or upon a goal's execution The maven plantuml plugin  is very easy to use, below a typical usage example: Usage from Maven: <plugin> <groupId> com.github.jeluard </groupId> <artifactId> plantuml-maven-plugin </artifactId> <version> 7941 </version> <configuration> <sourceFiles> <directory> ${basedir} </directory> <includes> <include> src/main...

Confluence Reporting Maven plugin 3.4.3 - is out!

Today i've released a version 3.4.3 of the   Confluence Reporting Maven plugin  . This plugin is very useful to keep in synch documentation directly from IDE without need of context-switch Starting from this release there is the support of  " export page " feature either in PDF or DOC format The new goal is: > confluence-reporting:export  How to configure the plugin  To configure plugin within your pom please refer to : Project Wiki Maven Site Documentation Codehaus Site

MAVEN PLUGIN(S) SERIES - Generate a Visual Dependency Tree

Maven Dependency Plugin   org.apache.maven.plugins:maven-dependency-plugin:2.8:tree The Maven dependency:tree goal produces a helpful report  of all jars coming from in our projects. The default output is text but, sometimes, we would want something more visual. Here is what we have to do Generate graphml output Since the version 2.1 the Dependency plugin supports different output formats, one of them the GraphML , which is an XML-based file format for graphs. To achieve this is very simple it is enough .. cd in your project and run: > mvn dependency:tree -DoutputType=graphml -DoutputFile=dependency.graphml yEd a  GraphML tool In order to visualize GraphML, it is possible to use   yEd Graph Editor which is a cool free visualization tool written in Java. To visualize your dependency tree using yEd, follow the steps outlined below Open yEd  (It's also possible launch it using java web start ) Select:  Open Document > depend...

New Forge plugin helps use of maven-confluence-plugin

What does the Plugin Now is available a   JBoss Forge  plugin that helps setup use of maven-confluence-plugin within a maven project What's Forge JBoss Forge  is a powerful shell that is designed to increase java development productivity providing a set of tools to automatize and/or speed up common development's tasks Compliance  Currently the plugin is compliant with release 1.4.1 of Forge Documentation See the Getting Started for more infos

MAVEN PLUGIN(S) SERIES - Display effective POM

Maven Help Plugin   org.apache.maven.plugins:maven-help-plugin Often  we need to understand  the "effective POM" of our project. While eclipse provide this feature directly into "POM Editor view",  from command line it is possible using  maven-help-plugin  as show below: (Description from plugin's maven site) The  effective-pom  goal is used to make visible the POM that results from the application of interpolation, inheritance and active profiles. It provides a useful way of removing the guesswork about just what ends up in the POM that Maven uses to build your project. It will iterate over all projects in the current build session, printing the effective POM for each. You can execute this goal using the following command: # mvn help:effective-pom Note : you could also use the  output  parameter to redirect output to a file. Take a look to other useful goals provided by this plugin, in particular: Goal Descr...

MAVEN PLUGIN(S) SERIES - support zip packaging

Purpose of series ...  In my "day by day" experience as Java Architect, i'm involved in deep on processes concerning  Application Lifecycle Management    (ALM). We use  Apache Maven  as ingredient technology and we always dealing with need to find the best plugin (Mojo) that accomplish our requirements. So i've decided to share this experience providing a briefly description of most useful (or unusual) plugins discovered during my work. First One - ZIP Bundle Maven Plugin Description Typically a Maven user, to provide a zip as deliverable of his project, uses the famous  maven assembly plugin   The common approach is declare the packaging of the project as pom and invoke the assembly plugin, for zip creation and attachment it to the deploy phase. The  ZIP Bundle Maven Plugin , allow us to continue using assembly plugin and also to declare the packaging as zip instead of pom.   Usage The basic usage is shown below (f...

How to Use Aether in Maven Plugins

Form Relase 3.x Maven has introduced Aether Repository Api Technology. Below an interesting article for starting to play with it How to Use Aether in Maven Plugins

Maven Best Practices

In my continuous reading through the blogs i've found this very useful article regarding Maven. It start with the follow sentence: Love or hate it… he will stay for a moment. So let’s apply the best practices to our poms and maven builds. Below the Table Of Contents  Make the build reproducible - Always specify a version for Maven2 plugins - Minimize number of SNASPHOT dependencies - Use dependency management section - Beware of relocation in maven repo - After a dependency modification, double check the produced artifacts Use and abuse of modules - more “technical/layered” - more business oriented Make the build maintainable - Prefer default directory layout - Avoid duplication by moving common tags to parent pom - Always specify a version of dependencies in a parent pom - Use Properties Liberally - Minimize the number of Profiles Make the build portable - Don’t commit eclipse and maven artifacts - Don't modify pom/artifactsin your ...