This is an automated email from the ASF dual-hosted git repository. struberg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git
commit 719300bb0ba6b287a2648a3d1a7027bab71d7b7c Author: Mark Struberg <[email protected]> AuthorDate: Tue Jul 15 12:54:25 2025 +0200 DELTASPIKE-1481 upgrade to Apache parent 35 and fix asciidoc We had a very old asciidoc-maven-plugin. I had to fix a bit in the configuration and also update our ancient ruby scripts because newer Ruby doesn't allow to modify constants. --- .../src/main/asciidoc/bean-validation.adoc | 59 ---------------------- pom.xml | 15 +++--- template/document.html.erb | 28 +++++----- 3 files changed, 22 insertions(+), 80 deletions(-) diff --git a/documentation/src/main/asciidoc/bean-validation.adoc b/documentation/src/main/asciidoc/bean-validation.adoc deleted file mode 100644 index e6fb27052..000000000 --- a/documentation/src/main/asciidoc/bean-validation.adoc +++ /dev/null @@ -1,59 +0,0 @@ -:moduledeps: core - -= Bean Validation Module - -:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...] - - -== Overview -The Bean Validation module provides CDI integration for bean validation. It enables the creation of CDI-aware `ConstraintValidator` methods that can use business objects (EJBs, ManagedBeans) to support validation needs. - -== Project Setup -The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in <<configure#, Configure DeltaSpike in Your Projects>>. For Maven-independent projects, see <<configure#config-maven-indep,Configure DeltaSpike in Maven-independent Projects>>. - -=== Declare Bean Validation Module Dependencies -Add the Bean Validation module to the list of dependencies in the project `pom.xml` file using this code snippet: - -[source,xml] ----- -<dependency> - <groupId>org.apache.deltaspike.modules</groupId> - <artifactId>deltaspike-bean-validation-module-impl</artifactId> - <version>${deltaspike.version}</version> - <scope>runtime</scope> -</dependency> ----- - -Or if you're using Gradle, add these dependencies to your `build.gradle`: - -[source] ----- - runtime 'org.apache.deltaspike.modules:deltaspike-bean-validation-module-impl' ----- - -== Scoping - -A `ConstraintValidator` inherits the scope defined in the bean class. - -NOTE: A `ConstraintValidator` may be invoked by multiple threads. For this reason, you should consider using at least `RequestScoped` validators. - -== Code Requirements - -There are no compile dependencies to use the Bean Validation module. You -simply need to override the factory. Then you can build your `ConstraintValidator` based on CDI programming rules. - -.Overriding in Java -[source,java] -------------------------------------------------------------------------- -Validation.byDefaultProvider().configure().constraintValidatorFactory(new CDIAwareConstraintValidatorFactory()).buildValidatorFactory() -------------------------------------------------------------------------- - -.Overriding in XML -[source,xml] --------------------------------------------------------------------------------- -<validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration"> - <constraint-validator-factory>org.apache.deltaspike.beanvalidation.impl.CDIAwareConstraintValidatorFactory</constraint-validator-factory> -</validation-config> --------------------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 34d3e5e5e..2a0f3fd07 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ <url>http://deltaspike.apache.org</url> <properties> - <asciidoctor.version>1.5.8</asciidoctor.version> + <asciidoctor.version>2.2.6</asciidoctor.version> <version.deltaspike.latest.stable>2.0.0</version.deltaspike.latest.stable> <version.deltaspike.latest.snapshot>2.0.1-SNAPSHOT</version.deltaspike.latest.snapshot> <svn.scmPubCheckoutDirectory>${project.build.directory}/co-site</svn.scmPubCheckoutDirectory> @@ -88,7 +88,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-publish-plugin</artifactId> - <version>1.1</version> <configuration> <content>${project.reporting.outputDirectory}</content> <pubScmUrl>scm:svn:${svn.scmPubUrl}</pubScmUrl> @@ -107,16 +106,20 @@ <configuration> <sourceDirectory>src/main/asciidoc</sourceDirectory> <outputDirectory>${project.reporting.outputDirectory}</outputDirectory> - <sourceHighlighter>coderay</sourceHighlighter> - <backend>html</backend> - <templateDir>../template</templateDir> + <backend>html5</backend> <eruby>erb</eruby> <preserveDirectories>true</preserveDirectories> + <templateDirs> + <templateDir>../template</templateDir> + </templateDirs> + <relativeBaseDir>true</relativeBaseDir> <attributes> <toc>true</toc> <icons>font</icons> <latestStable>${version.deltaspike.latest.stable}</latestStable> <latestSnapshot>${version.deltaspike.latest.snapshot}</latestSnapshot> + <sourceHighlighter>coderay</sourceHighlighter> + <imagesdir>./images</imagesdir> </attributes> </configuration> </plugin> @@ -124,11 +127,9 @@ </pluginManagement> <plugins> - <!-- we need to tweak the maven-release-plugin for GIT --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <version>2.5.1</version> <configuration> <pushChanges>false</pushChanges> <localCheckout>true</localCheckout> diff --git a/template/document.html.erb b/template/document.html.erb index 95d459e49..1465ed9f1 100644 --- a/template/document.html.erb +++ b/template/document.html.erb @@ -169,10 +169,10 @@ <div class="row-fluid"> <% - MODULEDEPS = 'moduledeps' unless defined? MODULEDEPS - MODULECONF = 'moduleconf' unless defined? MODULECONF - MODULEBASE = 'modulebase' unless defined? MODULEBASE - CONF_LINK = "https://github.com/apache/deltaspike/blob/master/deltaspike/%{base}/%{proj}/src/main/java/%{fqn}.java" unless defined? CONF_LINK + $moduleDeps = 'moduledeps' unless defined? $moduleDeps + $moduleConf = 'moduleconf' unless defined? $moduleConf + $moduleBase = 'modulebase' unless defined? $moduleBase + $conf_link = "https://github.com/apache/deltaspike/blob/master/deltaspike/%{base}/%{proj}/src/main/java/%{fqn}.java" unless defined? $conf_link # module dependencies def dep_name(short_name) @@ -180,21 +180,21 @@ end def has_deps? - if attributes.has_key?(MODULEDEPS) && !(attributes[MODULEDEPS].empty?) - attributes[MODULEDEPS].split(%r{\s*,\s*}).size > 0 + if attributes.has_key?($moduleDeps) && !(attributes[$moduleDeps].empty?) + attributes[$moduleDeps].split(%r{\s*,\s*}).size > 0 else false end end def deps_list() - attributes[MODULEDEPS].split(%r{\s*,\s*}) + attributes[$moduleDeps].split(%r{\s*,\s*}) end # module configuration def module_base() - if attributes.has_key?(MODULEBASE) && !(attributes[MODULEBASE].empty?) - attributes[MODULEBASE] + if attributes.has_key?($moduleBase) && !(attributes[$moduleBase].empty?) + attributes[$moduleBase] else 'modules/' + attributes['docname'] end @@ -205,19 +205,19 @@ end def conf_link(in_fqn) - CONF_LINK % { base: module_base(), proj: in_fqn.split(':')[0], fqn: in_fqn.split(':')[1].tr('.', '/') } + $conf_link % { base: module_base(), proj: in_fqn.split(':')[0], fqn: in_fqn.split(':')[1].tr('.', '/') } end def has_conf? - if attributes.has_key?(MODULECONF) && !(attributes[MODULECONF].empty?) - attributes[MODULECONF].split(%r{\s*,\s*}).size > 0 + if attributes.has_key?($moduleConf) && !(attributes[$moduleConf].empty?) + attributes[$moduleConf].split(%r{\s*,\s*}).size > 0 else false end end def conf_list() - attributes[MODULECONF].split(%r{\s*,\s*}) + attributes[$moduleConf].split(%r{\s*,\s*}) end %> @@ -260,7 +260,7 @@ </div> <% if is_toc? then %> <div class="fallback-toc"> - <%= converter.convert_with_options @document, 'outline', :toclevels => 4 %> + <%= converter.convert @document, 'outline', :toclevels => 4 %> </div> <% end %> </div>
