End of Life Announcement

User Guide

Info Macro

Inserting the macro in Confluence®

The minimum information you have to provide is the url to your release pom.xml (urlToReleasePomXml) file.

  • If your subversion repository (or any other sort of http-server) where your pom.xmls are stored is proteced by username and password you will have to provide credentials (httpUsername, httpPassword).
  • Note If the pom.xml files are not well formed the macro will not be able to render! see the chapter The right pom.xml format for the macro.

What does it look like

You can use this demo-project to render the macro. It will look like the screenshot beneath.

http://codeclou.io/test-maven-releaseinfo-macro/v1.6/public/example-release/1.5/pom.xml

You can download the full example-release-1.5.zip with all its modules.

The right pom.xml format for the macro

You have to use a flat multi module format.

You can download a full example here.

Format description

You need to have your pom.xml inside a subversion repository (or any other system) which provides http access.

The directory layout should be like this:

http://someserver/somedir/myapp-release/pom.xml                            //  ⇐ parent pom
http://someserver/somedir/myapp-release/myapp-frontend-release/pom.xml     //  ⇐ module #1
http://someserver/somedir/myapp-release/myapp-backend-release/pom.xml      //  ⇐ module #2
http://someserver/somedir/myapp-release/some-other-module-release/pom.xml  //  ⇐ module #3

your parent pom.xml should look like this (including the maven-dependency-plugin)

pom.xml
<project>
     ...
    <groupId>io.codeclou</groupId>
    <artifactId>myapp-release</artifactId>
    <packaging>pom</packaging>
    <name>MyApp Release</name>
    <version>1.5</version>

    <modules>
        <module>myapp-frontend-release</module>
        <module>myapp-backend-release</module>
        <module>some-other-module-release</module>
    </modules>
    ...
    <build>
        <defaultGoal>package</defaultGoal>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includeScope>runtime</includeScope>
                </configuration>
            </plugin>
        </plugins>
    </build>
    ...
</project>

A module pom.xml should have one or more dependencies

pom.xml
<project>

    <parent>
        <groupId>io.codeclou</groupId>
        <artifactId>myapp-release</artifactId>
        <version>1.5</version>
    </parent>

    <groupId>io.codeclou</groupId>
    <artifactId>myapp-backend-release</artifactId>
    <packaging>pom</packaging>
    <name>MyApp Release - MyApp-Backend</name>

    <description>Some random text on MyApp Backend</description>

    <dependencies>
        <dependency>
            <groupId>io.codeclou</groupId>
            <artifactId>myapp-backend</artifactId>
            <type>war</type>
            <version>1.5.8</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
</project>

A module pom.xml can also have properties which will also be displayed by the macro.

pom.xml
<project>
    ...
    <properties>
        <some.api.url>https://someserver/myapibase/</some.api.url>
    </properties>
    ...
</project>

Using maven to deliver your software (maven-dependency-plugin)

Let us assume you are on your target server where you want to install your release.

You have downloaded the pom.xml files of your release like this.

The directory layout should be like this:

./myapp-release/pom.xml                             // ⇐ parent pom
./myapp-release/myapp-frontend-release/pom.xml      // ⇐ module #1
./myapp-release/myapp-backend-release/pom.xml       // ⇐ module #2
./myapp-release/some-other-module-release/pom.xml   // ⇐ module #3

Now you can download your release using maven and the maven-dependency-plugin and the copy dependencies command

$
cd myapp-release
$
mvn dependency:copy-dependencies

The dependencies will be stored here by default:

./myapp-release/target/

Now you can use additional scripts to install your software

 

 

 

 

 

Diff Macro

Inserting the macro in Confluence®

The minimum information you have to provide is the url to your two release pom.xml files. (urlToFirstReleasePomXml, urlToSecondReleasePomXml)

If your subversion repository where your pom.xmls are stored is proteced by username and password you will have to provide credentials (httpUsername, httpPassword).

The two maven releases which are diffed must be full-releases not incremental releases! Otherwise the diff will always show too much difference between the releases.

Note
Make sure to paste the release pom.xml URL with the higher version into the second inputfield (urlToSecondReleasePomXml).

What does it look like

The two releases rendered by the diff macro look like this:

The diff is displayed exactly as you would expect it from e.g. a GitHub diff.

The pom.xml files of the two releases can be downloaded here: