diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ca78b00f..38b22cce 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -94,11 +94,9 @@ jobs: - name: Deploy Snapshot with Maven, version ${{ steps.project.outputs.version }} if: ${{endsWith(steps.project.outputs.version, '-SNAPSHOT')}} - # javadoc:aggregate -> Needs to be fixed: "Error: No source files for package de.cuioss.jsf.api.components.model" - # Actually we need to resolve it regarding https://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.html run: | - mvn -B --no-transfer-progress -Prelease-snapshot install -Dmaven.javadoc.skip=true - mvn -B --no-transfer-progress -Prelease-snapshot deploy -Dmaven.test.skip=true -Dmaven.javadoc.skip=true + mvn -B --no-transfer-progress -Prelease-snapshot,javadoc-mm-reporting install + mvn -B --no-transfer-progress -Prelease-snapshot,javadoc-mm-reporting deploy -Dmaven.test.skip=true env: MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} MAVEN_CENTRAL_TOKEN: ${{ secrets.OSS_SONATYPE_PASSWORD }} diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/PortalResourceBundleBean.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/PortalResourceBundleBean.java index ee670f43..078f6a53 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/PortalResourceBundleBean.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/PortalResourceBundleBean.java @@ -33,15 +33,15 @@ /** *

- * Portal variant of {@link ResourceBundle}. It delegates to - * {@link ResourceBundleWrapper} that does the actual heavy lifting. + * Portal variant of {@link java.util.ResourceBundle}. It delegates to + * {@link de.cuioss.portal.common.bundle.ResourceBundleWrapper} that does the actual heavy lifting. *

*

- * It usage is for cases where there is technically a {@link ResourceBundle} + * It usage is for cases where there is technically a {@link java.util.ResourceBundle} * needed. Sadly there is no corresponding interface, solely an Abstract-Class * that can not be proxied by CDI. Currently it's sole use is the context of the * PortalApplication, that it exposes it on - * {@link Application#getResourceBundle(jakarta.faces.context.FacesContext, String)} + * {@link jakarta.faces.application.Application#getResourceBundle(jakarta.faces.context.FacesContext, String)} * with the name "msgs" * * It can be used directly in jsf views: {@code #{msgs['page.401.title']}} @@ -66,16 +66,19 @@ public class PortalResourceBundleBean extends ResourceBundle implements Serializ private String allBundleNames; + /** {@inheritDoc} */ @Override protected Object handleGetObject(final String key) { return resourceBundleWrapper.getString(key); } + /** {@inheritDoc} */ @Override public Enumeration getKeys() { return Collections.enumeration(keySet()); } + /** {@inheritDoc} */ @Override public Set keySet() { return resourceBundleWrapper.keySet(); @@ -83,7 +86,9 @@ public Set keySet() { /** * Factory Method creating a new instance with loading the contained - * {@link ResourceBundleWrapper}, {@link SessionScoped} from the CDR-COntext + * {@link de.cuioss.portal.common.bundle.ResourceBundleWrapper}, {@link jakarta.enterprise.context.SessionScoped} from the CDR-COntext + * + * @return a {@link de.cuioss.portal.common.bundle.PortalResourceBundleBean} object */ public static PortalResourceBundleBean resolveFromCDIContext() { LOGGER.debug("Resolving PortalResourceBundleBean from CDI-Context"); diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleLocator.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleLocator.java index 33a0267a..485fc76a 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleLocator.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleLocator.java @@ -26,8 +26,8 @@ /** * Used for configuring ResourceBundles. Implementations should provide a - * {@link Priority}. Because of the overwriting mechanics a higher - * {@link Priority} of one of the concrete bundles results in a higher priority + * {@link jakarta.annotation.Priority}. Because of the overwriting mechanics a higher + * {@link jakarta.annotation.Priority} of one of the concrete bundles results in a higher priority * of said bundles, resulting in the key to be chosen of the ones with the * higher ordering. Number higher than 100 should always be reserved for * assemblies / applications @@ -36,18 +36,24 @@ */ public interface ResourceBundleLocator extends Serializable { + /** Constant LOGGER */ CuiLogger LOGGER = new CuiLogger(ResourceBundleLocator.class); /** + *

getBundlePath.

+ * * @return paths of the resource bundles if it can be loaded. Caution: - * {@link ResourceBundleRegistry} assumes that only loadable paths are + * {@link de.cuioss.portal.common.bundle.ResourceBundleRegistry} assumes that only loadable paths are * to be returned. Therefore, each implementation must take care. */ Optional getBundlePath(); /** - * @return an {@link Optional} {@link ResourceBundle} derived by the path of + *

getBundle.

+ * + * @return an {@link java.util.Optional} {@link java.util.ResourceBundle} derived by the path of * {@link #getBundlePath()} + * @param locale a {@link java.util.Locale} object */ default Optional getBundle(Locale locale) { var bundlePath = getBundlePath(); diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleRegistry.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleRegistry.java index 11d85598..512dd640 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleRegistry.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleRegistry.java @@ -39,9 +39,9 @@ /** * Registry for the ResourceBundleNames. The injected - * {@link ResourceBundleLocator}s must have unique paths and define an existing - * {@link ResourceBundle}. In addition they should be annotated with the - * corresponding {@link Priority} + * {@link de.cuioss.portal.common.bundle.ResourceBundleLocator}s must have unique paths and define an existing + * {@link java.util.ResourceBundle}. In addition they should be annotated with the + * corresponding {@link jakarta.annotation.Priority} * * @author Oliver Wolff */ diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapper.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapper.java index 213edf6d..fe21d523 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapper.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapper.java @@ -24,7 +24,7 @@ /** * Defines the portal-contract dealing with UnifiedResourceBundle Technically it - * provides an interface similar to {@link ResourceBundle} + * provides an interface similar to {@link java.util.ResourceBundle} * * @author Oliver Wolff */ @@ -36,14 +36,12 @@ public interface ResourceBundleWrapper extends Serializable { * @param key to be looked up * @return the resolved message if key is defined, otherwise "??[key value]??" * will be returned and warning will be written - * @throws MissingResourceException if key is unknown and application is in - * development mode */ String getString(String key); /** - * Technical method for {@link ResourceBundle} caching the resolved keys and - * values @see {@link ResourceBundle#getKeys()} + * Technical method for {@link java.util.ResourceBundle} caching the resolved keys and + * values @see {@link java.util.ResourceBundle#getKeys()} * * @return an Enumeration of the keys contained in this ResourceBundle and its * parent bundles. @@ -53,11 +51,15 @@ default Enumeration getKeys() { } /** + *

keySet.

+ * * @return set of all supported keys of this bundle */ Set keySet(); /** + *

getBundleContent.

+ * * @return a list of all configured bundles to be used for debugging. */ String getBundleContent(); diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapperImpl.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapperImpl.java index bb1a6d40..9a343f5a 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapperImpl.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/bundle/ResourceBundleWrapperImpl.java @@ -48,13 +48,13 @@ /** * It can do the following tricks: *
    - *
  • Define a working {@link Serializable} contract for - * {@link ResourceBundle}s
  • - *
  • Listens and acts on {@link LocaleChangeEvent}s
  • + *
  • Define a working {@link java.io.Serializable} contract for + * {@link java.util.ResourceBundle}s
  • + *
  • Listens and acts on {@link de.cuioss.portal.common.locale.LocaleChangeEvent}s
  • *
* - * Handling of Missing Keys: On {@link ProjectStage#DEVELOPMENT} it will throw a - * {@link MissingResourceException}. Otherwise it will return the requested key, + * Handling of Missing Keys: On {@link de.cuioss.portal.common.stage.ProjectStage#DEVELOPMENT} it will throw a + * {@link java.util.MissingResourceException}. Otherwise it will return the requested key, * surrounded with Question-Marks * * @author Oliver Wolff @@ -83,6 +83,7 @@ public class ResourceBundleWrapperImpl implements ResourceBundleWrapper { private final List keyList = new CopyOnWriteArrayList<>(); + /** {@inheritDoc} */ @Override public String getString(final String key) { @@ -127,11 +128,13 @@ private List getResolvedBundles() { return resolvedBundles; } + /** {@inheritDoc} */ @Override public Enumeration getKeys() { return Collections.enumeration(keySet()); } + /** {@inheritDoc} */ @Override @Synchronized public Set keySet() { @@ -145,6 +148,7 @@ public Set keySet() { return mutableSet(keyList); } + /** {@inheritDoc} */ @Override public String getBundleContent() { return Joiner.on(", ").join(resourceBundleRegistry.getResolvedPaths()); diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/cdi/AnnotationInstanceProvider.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/cdi/AnnotationInstanceProvider.java index 6f7e03ba..12dec351 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/cdi/AnnotationInstanceProvider.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/cdi/AnnotationInstanceProvider.java @@ -46,8 +46,8 @@ * *
  * String annotationClassName = ...;
- * Class annotationClass =
- *     (Class) ClassUtils.getClassLoader(null).loadClass(annotationClassName);
+ * Class<? extends annotation> annotationClass =
+ *     (Class<? extends Annotation>) ClassUtils.getClassLoader(null).loadClass(annotationClassName);
  * Annotation a = AnnotationInstanceProvider.of(annotationClass)
  * 
* diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PortalPriorities.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PortalPriorities.java index c949aeb8..792c1075 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PortalPriorities.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PortalPriorities.java @@ -30,11 +30,11 @@ *

Design

*

* Some items at the portal need an explicit ordering in order to check the - * priority. For e.g. instances of {@link ResourceBundleLocator} can have a + * priority. For e.g. instances of {@link de.cuioss.portal.common.bundle.ResourceBundleLocator} can have a * higher priority for overwriting portal defined messages. The ordering relies - * on the {@link Priority} annotation on the corresponding elements. The higher - * the {@link Priority#value()} the higher is the priority. If the corresponding - * element has not annotated with {@link Priority} the order will be defaulted + * on the {@link jakarta.annotation.Priority} annotation on the corresponding elements. The higher + * the {@link jakarta.annotation.Priority#value()} the higher is the priority. If the corresponding + * element has not annotated with {@link jakarta.annotation.Priority} the order will be defaulted * to {@link #DEFAULT_LEVEL} *

*

Implementation

@@ -80,13 +80,14 @@ public final class PortalPriorities { /** * Helper method that sorts a number of given objects regarding their - * priority. The Priority is assumed to be defined by the {@link Priority} + * priority. The Priority is assumed to be defined by the {@link jakarta.annotation.Priority} * annotation at class level. If it is not set, the priority is defaulted to * {@value #DEFAULT_LEVEL} * * @param toBeSorted must not be null - * @return the sorted list. In case of {@link List#size()} is lower than 2 the + * @return the sorted list. In case of {@link java.util.List#size()} is lower than 2 the * original list will be returned. + * @param a T class */ @SuppressWarnings("unchecked") public static List sortByPriority(final List toBeSorted) { diff --git a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PriorityComparator.java b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PriorityComparator.java index 8ed7a220..00afdf08 100644 --- a/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PriorityComparator.java +++ b/modules/core/portal-common-cdi/src/main/java/de/cuioss/portal/common/priority/PriorityComparator.java @@ -25,8 +25,8 @@ import lombok.ToString; /** - * Helper class for sorting elements regarding its {@link Priority} - * annotation. In case the given class does not have a {@link Priority} + * Helper class for sorting elements regarding its {@link jakarta.annotation.Priority} + * annotation. In case the given class does not have a {@link jakarta.annotation.Priority} * annotation present an order of {@code 0} is assumed. * * @author Oliver Wolff @@ -42,6 +42,8 @@ public class PriorityComparator implements Comparable { private final Object wrapped; /** + *

Constructor for PriorityComparator.

+ * * @param wrappedObject must not be null */ public PriorityComparator(final Object wrappedObject) { @@ -83,6 +85,7 @@ private Priority findPriorityAnnotation(final Class annotatedClass) { return null; } + /** {@inheritDoc} */ @Override public int compareTo(final PriorityComparator other) { return other.getOrder().compareTo(order); diff --git a/modules/core/portal-configuration/README.adoc b/modules/core/portal-configuration/README.adoc index 5e564f0f..756c5aaf 100644 --- a/modules/core/portal-configuration/README.adoc +++ b/modules/core/portal-configuration/README.adoc @@ -17,6 +17,7 @@ Provides some portal-specific extensions to microprofile-config. In addition it * link:src/main/java/de/cuioss/portal/configuration/types/[Additional configuration-types] * link:src/main/java/de/cuioss/portal/configuration/util/ConfigurationHelper.java[Simplifies the programmatic lookup up configuration-properties] + Constant Key classes for: * link:src/main/java/de/cuioss/portal/configuration/PortalConfigurationKeys.java[Portal-Configuration-Core] diff --git a/modules/core/portal-configuration/src/main/java/de/cuioss/portal/configuration/initializer/package-info.java b/modules/core/portal-configuration/src/main/java/de/cuioss/portal/configuration/initializer/package-info.java index 54658986..519e80dc 100644 --- a/modules/core/portal-configuration/src/main/java/de/cuioss/portal/configuration/initializer/package-info.java +++ b/modules/core/portal-configuration/src/main/java/de/cuioss/portal/configuration/initializer/package-info.java @@ -1,8 +1,8 @@ /** * Members of this package help to initialize - * {@link javax.enterprise.context.ApplicationScoped} beans eagerly in a + * {@link jakarta.enterprise.context.ApplicationScoped} beans eagerly in a * specified order. The actual initialization will be done by a ServletContext - * initializer. This replaces the {@link javax.annotation.PostConstruct} based + * initializer. This replaces the {@link jakarta.annotation.PostConstruct} based * approach, because with that the initialization order will be determined by * the access order and will therefore not be deterministic. * diff --git a/modules/micro-profile/portal-metrics-api/src/main/java/de/cuioss/portal/metrics/CaffeineCacheMetrics.java b/modules/micro-profile/portal-metrics-api/src/main/java/de/cuioss/portal/metrics/CaffeineCacheMetrics.java index 8373d279..52f5bd0e 100644 --- a/modules/micro-profile/portal-metrics-api/src/main/java/de/cuioss/portal/metrics/CaffeineCacheMetrics.java +++ b/modules/micro-profile/portal-metrics-api/src/main/java/de/cuioss/portal/metrics/CaffeineCacheMetrics.java @@ -43,7 +43,7 @@ * @Inject * @RegistryType(type = MetricRegistry.Type.APPLICATION) * private MetricRegistry appRegistry; - * final Cache cache = Caffeine.newBuilder().maximumSize(cacheConfig.getSize()) + * final Cache<String, String> cache = Caffeine.newBuilder().maximumSize(cacheConfig.getSize()) * .expireAfterAccess(cacheConfig.getExpiration(), cacheConfig.getTimeUnit()).recordStats().build(); * new CaffeineCacheMetrics("my-cache-name", cache, cacheConfig).bindTo(appRegistry); * diff --git a/modules/micro-profile/portal-mp-rest-client/src/main/java/de/cuioss/portal/restclient/PortalRestClient.java b/modules/micro-profile/portal-mp-rest-client/src/main/java/de/cuioss/portal/restclient/PortalRestClient.java index 6ac596b6..c6088953 100644 --- a/modules/micro-profile/portal-mp-rest-client/src/main/java/de/cuioss/portal/restclient/PortalRestClient.java +++ b/modules/micro-profile/portal-mp-rest-client/src/main/java/de/cuioss/portal/restclient/PortalRestClient.java @@ -15,45 +15,41 @@ */ package de.cuioss.portal.restclient; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; +import de.cuioss.portal.configuration.types.ConfigAsConnectionMetadata; +import jakarta.enterprise.util.Nonbinding; +import jakarta.inject.Qualifier; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import jakarta.enterprise.util.Nonbinding; -import jakarta.inject.Qualifier; - -import de.cuioss.portal.configuration.types.ConfigAsConnectionMetadata; +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.RUNTIME; /** *

- * Marker identifying concrete instances of {@link RestClientHolder}. The - * connection-specific metadata is derived by a number of properties derived by - * {@link #baseName()}. Expected is a structure as defined within - * {@link ConfigAsConnectionMetadata}. + * Marker identifying concrete instances of {@link RestClientHolder}. The connection-specific metadata is derived by a number of properties derived by + * {@link PortalRestClient#baseName()}. Expected is a structure as defined within {@link ConfigAsConnectionMetadata}. */ @Qualifier @Retention(RUNTIME) -@Target({ TYPE, METHOD, FIELD, PARAMETER }) +@Target({TYPE, METHOD, FIELD, PARAMETER}) public @interface PortalRestClient { /** * @return the basename of the configuration, see - * {@link ConfigAsConnectionMetadata} for details + * {@link ConfigAsConnectionMetadata} for details */ @Nonbinding String baseName(); /** * @return boolean indicating whether the corresponding producer should throw an - * {@link IllegalArgumentException} in case the properties contain - * errors. Defaults to true. In case of false - * will return the created {@link RestClientHolder} without structural - * checks on the configuration + * {@link IllegalArgumentException} in case the properties contain + * errors. + * Defaults to true. + * In case of false + * will return the created {@link RestClientHolder} without structural + * checks on the configuration */ @Nonbinding boolean failOnInvalidConfiguration() default true; diff --git a/modules/test/portal-core-unit-testing/pom.xml b/modules/test/portal-core-unit-testing/pom.xml index 3f806a97..49b5dd7b 100644 --- a/modules/test/portal-core-unit-testing/pom.xml +++ b/modules/test/portal-core-unit-testing/pom.xml @@ -13,6 +13,11 @@ weld-junit testing + + false de.cuioss.portal.core.test diff --git a/modules/test/portal-core-unit-testing/src/main/java/de/cuioss/portal/core/test/junit5/mockwebserver/MockWebServerExtension.java b/modules/test/portal-core-unit-testing/src/main/java/de/cuioss/portal/core/test/junit5/mockwebserver/MockWebServerExtension.java index 0cc3fce3..6181b4ad 100644 --- a/modules/test/portal-core-unit-testing/src/main/java/de/cuioss/portal/core/test/junit5/mockwebserver/MockWebServerExtension.java +++ b/modules/test/portal-core-unit-testing/src/main/java/de/cuioss/portal/core/test/junit5/mockwebserver/MockWebServerExtension.java @@ -16,7 +16,6 @@ package de.cuioss.portal.core.test.junit5.mockwebserver; import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Optional; diff --git a/modules/test/portal-core-unit-testing/src/main/java/de/cuioss/portal/core/test/mocks/package-info.java b/modules/test/portal-core-unit-testing/src/main/java/de/cuioss/portal/core/test/mocks/package-info.java deleted file mode 100644 index 1575cc2c..00000000 --- a/modules/test/portal-core-unit-testing/src/main/java/de/cuioss/portal/core/test/mocks/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Provides a number of mock classes used for simplifying unit-tests - * - * @author Oliver Wolff - * - */ -package de.cuioss.portal.core.test.mocks; diff --git a/pom.xml b/pom.xml index 0ebf7f94..80f30397 100644 --- a/pom.xml +++ b/pom.xml @@ -30,9 +30,72 @@ 0.7.6 + true + + html + 3.10.0 bom modules + + + javadoc-mm-reporting + + + + org.apache.maven.plugins + maven-javadoc-plugin + + ${maven.compiler.source} + true + true + true + ${maven.javadoc.plugin.failOnError} + ${maven.javadoc.plugin.doclint} + true + CUIOSS-Documentation + none + + https://jakarta.ee/specifications/platform/9/apidocs/ + + + + + aggregate + + aggregate + + site + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + aggregate + false + + aggregate + + + + default + + javadoc + + + + + + + +