This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doap-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 758f1e4 Follow Oracle Javadoc conventions (#129)
758f1e4 is described below
commit 758f1e42fac8e81ce5fd9830072b466b37481f66
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Thu Nov 27 05:51:14 2025 -0600
Follow Oracle Javadoc conventions (#129)
---
.../org/apache/maven/plugin/doap/DoapMojo.java | 22 +++++-----
.../org/apache/maven/plugin/doap/DoapUtil.java | 48 +++++++++++-----------
.../plugin/doap/options/ASFExtOptionsUtil.java | 18 ++++----
3 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java
b/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java
index 048e7aa..a30e450 100644
--- a/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java
+++ b/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java
@@ -94,17 +94,17 @@ import org.codehaus.plexus.util.xml.XMLWriter;
@Mojo(name = "generate")
public class DoapMojo extends AbstractMojo {
/**
- * UTC Time Zone
+ * UTC Time Zone.
*/
private static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("UTC");
/**
- * Date format for <lastUpdated/> tag in the repository metadata, i.e.:
yyyyMMddHHmmss
+ * Date format for <lastUpdated/> tag in the repository metadata, i.e.:
yyyyMMddHHmmss.
*/
private static final DateFormat REPOSITORY_DATE_FORMAT;
/**
- * Date format for DOAP file, i.e. ISO-8601 YYYY-MM-DD
+ * Date format for DOAP file, i.e. ISO-8601 YYYY-MM-DD.
*/
private static final DateFormat DOAP_DATE_FORMAT;
@@ -193,7 +193,7 @@ public class DoapMojo extends AbstractMojo {
private List<ArtifactRepository> remoteRepositories;
/**
- * Factory for creating artifact objects
+ * Factory for creating artifact objects.
*
* @since 1.1
*/
@@ -201,7 +201,7 @@ public class DoapMojo extends AbstractMojo {
private ArtifactFactory factory;
/**
- * Project builder
+ * Project builder.
*
* @since 1.1
*/
@@ -209,7 +209,7 @@ public class DoapMojo extends AbstractMojo {
private MavenProjectBuilder mavenProjectBuilder;
/**
- * Used for resolving artifacts
+ * Used for resolving artifacts.
*
* @since 1.1
*/
@@ -1571,7 +1571,7 @@ public class DoapMojo extends AbstractMojo {
}
/**
- * Writer a single developer or contributor
+ * Writer a single developer or contributor.
*
* @param writer not null
* @param xmlsPrefix could be null
@@ -1670,7 +1670,7 @@ public class DoapMojo extends AbstractMojo {
}
/**
- * Return a <code>SCM repository</code> defined by a given url
+ * Return a <code>SCM repository</code> defined by a given url.
*
* @param scmUrl an SCM URL
* @return a valid SCM repository or null
@@ -1691,7 +1691,7 @@ public class DoapMojo extends AbstractMojo {
}
/**
- * Write the ASF extensions
+ * Write the ASF extensions.
*
* @param writer not null
* @param project the Maven project, not null
@@ -2121,7 +2121,7 @@ public class DoapMojo extends AbstractMojo {
*
* @param scmRepository a SCM repository
* @param scmProvider a SCM provider name
- * @return true if the provider of the given SCM repository is equal to
the given scm provider.
+ * @return true if the provider of the given SCM repository is equal to
the given scm provider
* @see <a
href="http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-providers/">maven-scm-providers</a>
*/
private static boolean isScmSystem(ScmRepository scmRepository, String
scmProvider) {
@@ -2300,7 +2300,7 @@ public class DoapMojo extends AbstractMojo {
/**
* @param tags not null
* @param value of the last tag, could be null
- * @return the XML configuration defined in tags.
+ * @return the XML configuration defined in tags
*/
protected String toConfiguration(String[] tags, String value) {
if (tags == null) {
diff --git a/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java
b/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java
index 52223e7..3b7a9f7 100644
--- a/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java
+++ b/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java
@@ -81,30 +81,30 @@ import org.codehaus.plexus.util.xml.XmlWriterUtil;
* @since 1.0
*/
public class DoapUtil {
- /** Email regex */
+ /** Email regex. */
private static final String EMAIL_REGEX =
"^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
- /** Email pattern */
+ /** Email pattern. */
private static final Pattern EMAIL_PATTERN = Pattern.compile(EMAIL_REGEX);
- /** Magic number to repeat '=' */
+ /** Magic number to repeat '='. */
private static final int REPEAT_EQUALS = 21;
/** The default timeout used when fetching url, i.e. 2000. */
public static final int DEFAULT_TIMEOUT = 2000;
- /** RDF resource attribute */
+ /** RDF resource attribute. */
protected static final String RDF_RESOURCE = "rdf:resource";
- /** RDF nodeID attribute */
+ /** RDF nodeID attribute. */
protected static final String RDF_NODE_ID = "rdf:nodeID";
- /** DoaP Organizations stored by name */
+ /** DoaP Organizations stored by name. */
private static Map<String, DoapUtil.Organization> organizations = new
HashMap<>();
/**
- * Write comments in the DOAP file header
+ * Write comments in the DOAP file header.
*
* @param writer not null
*/
@@ -258,7 +258,7 @@ public class DoapUtil {
/**
* @param i18n the internationalization component
* @param developersOrContributors list of <code>{@link Contributor}</code>
- * @return a none null list of <code>{@link Contributor}</code> which have
a <code>developer</code> DOAP role.
+ * @return a none null list of <code>{@link Contributor}</code> which have
a <code>developer</code> DOAP role
*/
public static List<Contributor> getContributorsWithDeveloperRole(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -268,7 +268,7 @@ public class DoapUtil {
/**
* @param i18n the internationalization component
* @param developersOrContributors list of <code>{@link Contributor}</code>
- * @return a none null list of <code>{@link Contributor}</code> which have
a <code>documenter</code> DOAP role.
+ * @return a none null list of <code>{@link Contributor}</code> which have
a <code>documenter</code> DOAP role
*/
public static List<Contributor> getContributorsWithDocumenterRole(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -278,7 +278,7 @@ public class DoapUtil {
/**
* @param i18n the internationalization component
* @param developersOrContributors list of <code>{@link Contributor}</code>
- * @return a none null list of <code>{@link Contributor}</code> which have
an <code>helper</code> DOAP role.
+ * @return a none null list of <code>{@link Contributor}</code> which have
an <code>helper</code> DOAP role
*/
public static List<Contributor> getContributorsWithHelperRole(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -288,7 +288,7 @@ public class DoapUtil {
/**
* @param i18n the internationalization component
* @param developersOrContributors list of <code>{@link Contributor}</code>
- * @return a none null list of <code>{@link Contributor}</code> which have
a <code>maintainer</code> DOAP role.
+ * @return a none null list of <code>{@link Contributor}</code> which have
a <code>maintainer</code> DOAP role
*/
public static List<Contributor> getContributorsWithMaintainerRole(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -298,7 +298,7 @@ public class DoapUtil {
/**
* @param i18n the internationalization component
* @param developersOrContributors list of <code>{@link Contributor}</code>
- * @return a none null list of <code>{@link Contributor}</code> which have
a <code>tester</code> DOAP role.
+ * @return a none null list of <code>{@link Contributor}</code> which have
a <code>tester</code> DOAP role
*/
public static List<Contributor> getContributorsWithTesterRole(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -308,7 +308,7 @@ public class DoapUtil {
/**
* @param i18n the internationalization component
* @param developersOrContributors list of <code>{@link Contributor}</code>
- * @return a none null list of <code>{@link Contributor}</code> which have
a <code>translator</code> DOAP role.
+ * @return a none null list of <code>{@link Contributor}</code> which have
a <code>translator</code> DOAP role
*/
public static List<Contributor> getContributorsWithTranslatorRole(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -318,7 +318,7 @@ public class DoapUtil {
/**
* @param i18n the internationalization component
* @param developersOrContributors list of <code>{@link Contributor}</code>
- * @return a none null list of <code>{@link Contributor}</code> which have
an <code>unknown</code> DOAP role.
+ * @return a none null list of <code>{@link Contributor}</code> which have
an <code>unknown</code> DOAP role
*/
public static List<Contributor> getContributorsWithUnknownRole(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -369,11 +369,11 @@ public class DoapUtil {
}
/**
- * put an organization from the pom file in the organization list.
+ * Put an organization from the pom file in the organization list.
*
* @param name from the pom file (e.g. Yoyodyne)
* @param url from the pom file (e.g. http://yoyodyne.example.org/about)
- * @return the existing organization if a duplicate, or a new one.
+ * @return the existing organization if a duplicate, or a new one
*/
public static DoapUtil.Organization addOrganization(String name, String
url) {
Organization organization = organizations.get(name);
@@ -391,7 +391,7 @@ public class DoapUtil {
private static int nodeNumber = 1;
/**
- * get a unique (within the DoaP file) RDF blank node ID
+ * Get a unique (within the DoaP file) RDF blank node ID.
*
* @return the nodeID
* @see <a
href="http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-blank-nodes">
@@ -402,7 +402,7 @@ public class DoapUtil {
}
/**
- * get the set of Organizations that people are members of
+ * Get the set of Organizations that people are members of.
*
* @return Map.EntrySet of DoapUtil.Organization
*/
@@ -414,7 +414,7 @@ public class DoapUtil {
* Validate the given DOAP file.
*
* @param doapFile not null and should exist
- * @return an empty list if the DOAP file is valid, otherwise a list of
errors.
+ * @return an empty list if the DOAP file is valid, otherwise a list of
errors
* @since 1.1
*/
public static List<String> validate(File doapFile) {
@@ -444,7 +444,7 @@ public class DoapUtil {
/**
* @param str not null
- * @return <code>true</code> if the str parameter is a valid email,
<code>false</code> otherwise.
+ * @return <code>true</code> if the str parameter is a valid email,
<code>false</code> otherwise
* @since 1.1
*/
public static boolean isValidEmail(String str) {
@@ -533,7 +533,7 @@ public class DoapUtil {
* @param value could be null
* @param project not null
* @param settings could be null
- * @return the value trimmed and interpolated or null if the interpolation
doesn't work.
+ * @return the value trimmed and interpolated or null if the interpolation
doesn't work
* @since 1.1
*/
public static String interpolate(String value, final MavenProject project,
Settings settings) {
@@ -604,7 +604,7 @@ public class DoapUtil {
* @param developersOrContributors list of <code>{@link Contributor}</code>
* @return a none null map with <code>maintainers</code>,
<code>developers</code>, <code>documenters</code>,
* <code>translators</code>, <code>testers</code>,
<code>helpers</code>, <code>unknowns</code> as keys and
- * list of <code>{@link Contributor}</code> as value.
+ * list of <code>{@link Contributor}</code> as value
*/
private static Map<String, List<Contributor>>
filterContributorsByDoapRoles(
I18N i18n, List<Contributor> developersOrContributors) {
@@ -672,14 +672,14 @@ public class DoapUtil {
/**
* @param i18n not null
* @param key not null
- * @return lower case value for the key in the i18n bundle.
+ * @return lower case value for the key in the i18n bundle
*/
private static String getLowerCaseString(I18N i18n, String key) {
return i18n.getString("doap-person", Locale.ENGLISH,
key).toLowerCase(Locale.ENGLISH);
}
/**
- * @return the Maven artefact version.
+ * @return the Maven artefact version
*/
private static String getPluginVersion() {
Properties pomProperties = new Properties();
diff --git
a/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java
b/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java
index 3f8ed51..9eb3727 100644
--- a/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java
+++ b/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java
@@ -34,7 +34,7 @@ import org.codehaus.plexus.util.StringUtils;
* @since 1.1
*/
public class ASFExtOptionsUtil {
- /** Apache domain name, i.e. apache.org */
+ /** Apache domain name, i.e. apache.org. */
private static final String APACHE_DOMAIN_NAME = "apache.org";
/**
@@ -77,7 +77,7 @@ public class ASFExtOptionsUtil {
/** Software based on XML technologies. */
public static final String XML_CATEGORY = "xml";
- /** All categories supported by ASF */
+ /** All categories supported by ASF. */
public static final String[] CATEGORIES = {
BUILD_MANAGEMENT_CATEGORY,
DATABASE_CATEGORY,
@@ -110,7 +110,7 @@ public class ASFExtOptionsUtil {
/** Tcl Programming Language. */
public static final String TCL_PROGRAMMING_LANGUAGE = "Tcl";
- /** All Programming Languages supported by ASF */
+ /** All Programming Languages supported by ASF. */
public static final String[] PROGRAMMING_LANGUAGES = {
C_PROGRAMMING_LANGUAGE,
JAVA_PROGRAMMING_LANGUAGE,
@@ -122,7 +122,7 @@ public class ASFExtOptionsUtil {
/**
* @param category not null
- * @return if the given category is supported by ASF (correctly formatted)
or <code>null</code> if not found.
+ * @return if the given category is supported by ASF (correctly formatted)
or <code>null</code> if not found
* @see <a
href="http://projects.apache.org/categories.html">http://projects.apache.org/categories.html</a>
* @see #CATEGORIES
*/
@@ -138,7 +138,7 @@ public class ASFExtOptionsUtil {
/**
* @param programmingLanguage not null
- * @return the given programming language supported by ASF (correctly
formatted) or <code>null</code> if not found.
+ * @return the given programming language supported by ASF (correctly
formatted) or <code>null</code> if not found
* @see <a
href="http://projects.apache.org/languages.html">http://projects.apache.org/languages.html</a>
* @see #PROGRAMMING_LANGUAGES
*/
@@ -156,7 +156,7 @@ public class ASFExtOptionsUtil {
* Find the chair man of the project. The role of the developer should
contain <code>chair</code>.
*
* @param developers list of <code>{@link Developer}</code>
- * @return a Developer or null if not found.
+ * @return a Developer or null if not found
*/
public static Developer findChair(List<Developer> developers) {
if (developers == null || developers.isEmpty()) {
@@ -180,7 +180,7 @@ public class ASFExtOptionsUtil {
* Find the list of PMC members of the project. The role of each developer
should contain <code>pmc</code>.
*
* @param developers list of <code>{@link Developer}</code>
- * @return a not null list of Developer.
+ * @return a not null list of Developer
*/
public static List<Developer> findPMCMembers(List<Developer> developers) {
if (developers == null || developers.isEmpty()) {
@@ -206,7 +206,7 @@ public class ASFExtOptionsUtil {
*
* @param project not null
* @return <code>true</code> if the SCM url, distribution management url,
project url or organization url is hosted
- * in the Apache domain name, <code>false</code> otherwise.
+ * in the Apache domain name, <code>false</code> otherwise
* @see #APACHE_DOMAIN_NAME
* @since 1.1
*/
@@ -281,7 +281,7 @@ public class ASFExtOptionsUtil {
/**
* @param str an url could be null
- * @return <code>true</code> if the str is hosted by ASF.
+ * @return <code>true</code> if the str is hosted by ASF
* @see #APACHE_DOMAIN_NAME
*/
private static boolean isHostedAtASF(String str) {