Package org.codehaus.mojo.license
Class LicenseMojoUtils
java.lang.Object
org.codehaus.mojo.license.LicenseMojoUtils
Utility methods common to various mojos.
- Since:
- 1.17
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static String
prepareThirdPartyOverrideUrl
(String resolvedUrl, File deprecatedFile, String url, File basedir) Chooses the overrideinvalid reference
URL
resolvedUrl
,deprecatedFile
,url
, or the default given byDEFAULT_OVERRIDE_THIRD_PARTY
.
-
Method Details
-
isValid
- Parameters:
url
- theinvalid reference
URL
- Returns:
url != null && url != NO_URL
-
prepareThirdPartyOverrideUrl
public static String prepareThirdPartyOverrideUrl(String resolvedUrl, File deprecatedFile, String url, File basedir) Chooses the overrideinvalid reference
URL
resolvedUrl
,deprecatedFile
,url
, or the default given byDEFAULT_OVERRIDE_THIRD_PARTY
.- Parameters:
resolvedUrl
- returns this one if it is notnull
and not equal toNO_URL
deprecatedFile
- the deprecated mojo parameterurl
- the newer variant of the mojo parameterbasedir
-basedir
to resolve "src/license/override-THIRD-PARTY.properties" against- Returns:
- a valid URL or
NO_URL
, nevernull
-