[maven-clover2-plugin] licenseLocation param is ignored if license is defined in parent pom

Hi

I noticed that -Dmaven.clover.license is ignored if clover license is already present in pom file.

From my understanding maven overrides properties from pom files if user provides them in command line. Maven clover plugins seems to act differently:

[DEBUG] Full license supplied. Length: '261'. License location: 'clover.license' will be ignored.

If there is a way to provide license with CLI if it's already defined in pom file? I used clover plugin version >=3.1.0

1 answer

1 accepted

This widget could not be displayed.

Please note that there are two properties which you can use to pass a Clover license key:

  • license (maven.clover.license) - license key pasted as text (usually encapsulated in CDATA)
  • licenseLocation (maven.clover.licenseLocation) - path to a license file

See: http://docs.atlassian.com/maven-clover2-plugin/latest/setup-mojo.html

As per the 'license' documentation:

The full Clover license String to use. If supplied, this certificate will be used over licenseLocation.

The debug message in your question says exactly the same - because of the fact that the license key has been provided in maven.clover.license, a path to a license file provided in the maven.clover.licenseLocation will be ignored.

What may be misleading is the message you have:

License location: 'clover.license'.

The 'clover.license' is a path to a file and not a name of the -D system property.

Ok, now I get it. Thanks for help. Just for clarification I made typo in my original post. I meant maven.clover.licenseLocation is used by me and ignored by maven.This is the command I used (valid results were not the point here.I was only interested in loading license via file):

mvn com.atlassian.maven.plugins:maven-clover2-plugin:4.0.0:setup -Dmaven.clover.licenseLocation=clover.license -X

where clover.license is file with license and it's in the same dir as project main pom.xml but as you pointed it's ignored because license param is already defined

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

121 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you