Change default copyright notice in Javadoc page footer - maven-javadoc-plugin

I am generating Javadoc pages for my project using the Maven Javadoc plugin, with mostly default settings.
I have noticed that each generated page has the following footer text:
Copyright © 2020. All rights reserved.
How can I change this text to something of my choice?

Use the bottom element in the plugin config. Like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<bottom>
Copyright © 2018–2020 The ACME Project. Licensed under GPL 3.0.
</bottom>
</configuration>
</plugin>
If you want to use HTML in your footer, you need to specify it as CDATA:
<![CDATA[Copyright © 2018–2020 The ACME Project. Licensed under GPL 3.0.]]>

Related

Maven - Deploy Cobertura Report to Confluence Wiki

I'm using the plugin called maven-confluence-reporting-plugin in order to deploy my documentation directly on a Confluence Wiki. This is working well and it has been correctly mapped/linked with the default site phase. Basically I followed these instruction.
Now I would like to integrate a Cobertura report, and also have it on Confluence, or at least I want to have a link to the Cobertura report available from Confluence.
Did anyone already do this ?
Basically, at the moment I can :
Either create a standard Maven site with the Cobertura report integrated.
Either deploy my site on Confluence, but without Cobertura report.
And I would like :
The Cobertura report to be available from Confluence.
I currently have this in my pom.xml :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-confluence-reporting-plugin</artifactId>
<version>3.3.0-beta3</version>
<reportSets>
<reportSet>
<id>confluence</id>
<configuration>
<endPoint>http://localhost:8090/rpc/xmlrpc</endPoint>
<spaceKey>REP</spaceKey>
<parentPageTitle>Home</parentPageTitle>
<title>myFirstTest</title>
<labels>
<label>test</label>
<label>confluence</label>
</labels>
<templateWiki>${basedir}/src/site/confluence/template.confluence</templateWiki>
<wikiFilesExt>.confluence</wikiFilesExt>
<serverId>confluence</serverId>
<properties>
<prop>the_text_value</prop><!-- SIMPLE TEXT -->
<prop1>classpath:plugin-report.properties</prop1><!-- FROM CLASSPATH -->
<prop2>file://${basedir}/confluence.html</prop2><!-- FROM FILE
SYSTEM -->
</properties>
</configuration>
<reports>
<report>confluence-summary</report>
</reports>
</reportSet>
</reportSets>
</plugin>
I don't see how I can add the Cobertura plugin in the above.
First I suggest you to follow the documentation here because from 4.x the plugin can be used without need to joint it to the site phase (I have to update codehaus docs)
Second, keep in mind, that plugin deploy to confluence, pages already in wiki format so i think that the better way for you is
Generate and deploy cobertura report
Put inside your wiki page link to such site
Deploy to confluence using goal confluence-reporting:deploy

How to write a customize xslt reports using with maven in testng

Instead of generating reports in default pie charts, i want to customize the reports in own style
example : Bar charts , or any other type of representation
I'm using this code in pom.xml
Any one suggest me the way to customize using Xslt in POM.xml
<reporting>
<plugins>
<!-- TestNG-xslt related configuration. -->
<plugin>
<groupId>org.reportyng</groupId>
<artifactId>reporty-ng</artifactId>
<version>1.2</version>
<configuration>
<!-- Output directory for the testng xslt report -->
<outputdir>/target/testng-xslt-report/index.html</outputdir>
<sorttestcaselinks>true</sorttestcaselinks>
<testdetailsfilter>FAIL,SKIP,PASS,CONF,BY_CLASS</testdetailsfilter>
<showruntimetotals>true</showruntimetotals>
<cssFile>myCustomStyle.css</cssFile>
</configuration>
</plugin>
</plugins>
</reporting>
Instead of customizing reportNG you may simply develop your own custom html result files.then you may have any structure you want.
All you have to do is to write your own custom reporter class and keep logging the information in it while your test methods are running and after completion simply save and close the file in your project folder.
Although you will be writing more code but you will have more flexibility in its design.

Maven "versions" plugin - how to exclude alpha/beta versions from response?

I have an issue concerning the plugin versions.
When it generates a report with the goal:
mvn versions:display-dependency-updates
It suggest is a lot of libraries that with beta or alpha versions.
org.hibernate:hibernate-validator ......... 4.2.0.Final -> 4.3.0.Beta1
The issue is that event if the goal of this plugin is to show the very latest versions of each dependency, I don't want to use beta/alpha versions for production code. But I don't want to search manually the last stable version neither.
I've tried the 'comparisonMethod' option: numeric, maven, etc. No success whatsoever.
Any ideas for the plugin 'versions' to show the latests available versions of dependencies, but without including beta/alpha?
You can configure the versions plugin like this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<rulesUri>someUrl</rulesUri>
</configuration>
</plugin>
someUrl can also be a file URL. The syntax of the rules file is given in http://www.mojohaus.org/versions-maven-plugin/version-rules.html, it may contain something like this:
<ruleset comparisonMethod="maven"
xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
<ignoreVersions>
<ignoreVersion type="regex">.*-beta.</ignoreVersion>
<ignoreVersion type="regex">.*_ALPHA</ignoreVersion>
</ignoreVersions>
</ruleset>

maven 3 javadoc plugin doesn't take the excludepackagename config

I'm trying to exclude a bunch of packages from a javadoc site.
Unfortunately this plugin seems to live its own life and when it was configured as a report plugin it failed with access denied when moving files, so it was changed to be a normal plugin and then configured to run with the site goal (aggregated). By doing that we have the javadoc generated and it's published under the site as it should be.
But it seems that the configuration parameters for the plugin doesn't take effect at all. I've tried to move the <excludePackageNames> element around - both being a general config and to be a specific config for the aggregate goal - and I even added an exclusion for our entire code base and all files was still generated.
What I'm trying to do is to simply remove a couple of packages that shouldn't be in the javadoc. Anyone who got this plugin and the config to play nicely, to exclude packages?
This is the config I use right now, the javadoc is created but all packages, including the excluded, is generated.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<configuration>
<excludePackageNames>my.company.packages.*</excludePackageNames>
</configuration>
<executions>
<!-- Hook up the Javadoc generation on the site phase -->
<execution>
<id>aggregate</id>
<goals>
<goal>aggregate</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
Any ideas, pretty please?
I solved identical problem by adding the sourcepath parameter to the configuration:
<configuration>
<sourcepath>${project.basedir}/src/main/java</sourcepath>
<excludePackageNames>my.company.packages.*</excludePackageNames>
</configuration>
The configuration above will exclude all packages below my.company.packages but not my.company.packages itself. To exclude also my.company.packages use <excludePackageNames>my.company.packages</excludePackageNames> instead.

mvn release:perform automatically specify scm tag that includes release version

I would like to setup my maven release to run in batch mode, but I'm not a fan of the default scm tag ${artifactId}-${releaseVersion}. Instead, I'd like to simply tag it with ${releaseVersion}; however, I'm unclear if such a property exists (ie. without the -SNAPSHOT suffix).
I'd like the configuration to resemble the code below. Is such a default tagging possible with the maven-release-plugin?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
<configuration>
<tag>${releaseVersion}</tag>
</configuration>
</plugin>
I just got this to work when using Hudson to do my release. I noted that Hudson (with the Maven Release Plugin) is initiating the command with a property like -Dproject.rel.com.example:my-artifact-id=1.0.1. Using the following plugin configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tag>REL-${project.rel.com.example:my-artifact-id}</tag>
</configuration>
</plugin>
Resulted in the tag being REL-1.0.1
I'm new to the release plugin but I would assume something similar would work from the command line.
You can pass in the properties for:
releaseVersion -- What version you want it to be released as (1.0)
developmentVersion -- The next version (2.0-SNAPSHOT)
tag -- The name of the tag
a 1.0-SNAPSHOT implies a 1.0 release version, but doesn't set it. You can set that property in your POM file as a regular property.
try this:
<configuration>
<tag>${project.version}</tag>
</configuration>

Resources