Skip to content

Commit 719300b

Browse files
committed
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.
1 parent 391e276 commit 719300b

File tree

3 files changed

+22
-80
lines changed

3 files changed

+22
-80
lines changed

documentation/src/main/asciidoc/bean-validation.adoc

Lines changed: 0 additions & 59 deletions
This file was deleted.

pom.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<url>http://deltaspike.apache.org</url>
4949

5050
<properties>
51-
<asciidoctor.version>1.5.8</asciidoctor.version>
51+
<asciidoctor.version>2.2.6</asciidoctor.version>
5252
<version.deltaspike.latest.stable>2.0.0</version.deltaspike.latest.stable>
5353
<version.deltaspike.latest.snapshot>2.0.1-SNAPSHOT</version.deltaspike.latest.snapshot>
5454
<svn.scmPubCheckoutDirectory>${project.build.directory}/co-site</svn.scmPubCheckoutDirectory>
@@ -88,7 +88,6 @@
8888
<plugin>
8989
<groupId>org.apache.maven.plugins</groupId>
9090
<artifactId>maven-scm-publish-plugin</artifactId>
91-
<version>1.1</version>
9291
<configuration>
9392
<content>${project.reporting.outputDirectory}</content>
9493
<pubScmUrl>scm:svn:${svn.scmPubUrl}</pubScmUrl>
@@ -107,28 +106,30 @@
107106
<configuration>
108107
<sourceDirectory>src/main/asciidoc</sourceDirectory>
109108
<outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
110-
<sourceHighlighter>coderay</sourceHighlighter>
111-
<backend>html</backend>
112-
<templateDir>../template</templateDir>
109+
<backend>html5</backend>
113110
<eruby>erb</eruby>
114111
<preserveDirectories>true</preserveDirectories>
112+
<templateDirs>
113+
<templateDir>../template</templateDir>
114+
</templateDirs>
115+
<relativeBaseDir>true</relativeBaseDir>
115116
<attributes>
116117
<toc>true</toc>
117118
<icons>font</icons>
118119
<latestStable>${version.deltaspike.latest.stable}</latestStable>
119120
<latestSnapshot>${version.deltaspike.latest.snapshot}</latestSnapshot>
121+
<sourceHighlighter>coderay</sourceHighlighter>
122+
<imagesdir>./images</imagesdir>
120123
</attributes>
121124
</configuration>
122125
</plugin>
123126
</plugins>
124127
</pluginManagement>
125128

126129
<plugins>
127-
<!-- we need to tweak the maven-release-plugin for GIT -->
128130
<plugin>
129131
<groupId>org.apache.maven.plugins</groupId>
130132
<artifactId>maven-release-plugin</artifactId>
131-
<version>2.5.1</version>
132133
<configuration>
133134
<pushChanges>false</pushChanges>
134135
<localCheckout>true</localCheckout>

template/document.html.erb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,32 +169,32 @@
169169
<div class="row-fluid">
170170

171171
<%
172-
MODULEDEPS = 'moduledeps' unless defined? MODULEDEPS
173-
MODULECONF = 'moduleconf' unless defined? MODULECONF
174-
MODULEBASE = 'modulebase' unless defined? MODULEBASE
175-
CONF_LINK = "https://github.com/apache/deltaspike/blob/master/deltaspike/%{base}/%{proj}/src/main/java/%{fqn}.java" unless defined? CONF_LINK
172+
$moduleDeps = 'moduledeps' unless defined? $moduleDeps
173+
$moduleConf = 'moduleconf' unless defined? $moduleConf
174+
$moduleBase = 'modulebase' unless defined? $moduleBase
175+
$conf_link = "https://github.com/apache/deltaspike/blob/master/deltaspike/%{base}/%{proj}/src/main/java/%{fqn}.java" unless defined? $conf_link
176176

177177
# module dependencies
178178
def dep_name(short_name)
179179
short_name.tr('-', ' ').capitalize
180180
end
181181

182182
def has_deps?
183-
if attributes.has_key?(MODULEDEPS) && !(attributes[MODULEDEPS].empty?)
184-
attributes[MODULEDEPS].split(%r{\s*,\s*}).size > 0
183+
if attributes.has_key?($moduleDeps) && !(attributes[$moduleDeps].empty?)
184+
attributes[$moduleDeps].split(%r{\s*,\s*}).size > 0
185185
else
186186
false
187187
end
188188
end
189189

190190
def deps_list()
191-
attributes[MODULEDEPS].split(%r{\s*,\s*})
191+
attributes[$moduleDeps].split(%r{\s*,\s*})
192192
end
193193

194194
# module configuration
195195
def module_base()
196-
if attributes.has_key?(MODULEBASE) && !(attributes[MODULEBASE].empty?)
197-
attributes[MODULEBASE]
196+
if attributes.has_key?($moduleBase) && !(attributes[$moduleBase].empty?)
197+
attributes[$moduleBase]
198198
else
199199
'modules/' + attributes['docname']
200200
end
@@ -205,19 +205,19 @@
205205
end
206206

207207
def conf_link(in_fqn)
208-
CONF_LINK % { base: module_base(), proj: in_fqn.split(':')[0], fqn: in_fqn.split(':')[1].tr('.', '/') }
208+
$conf_link % { base: module_base(), proj: in_fqn.split(':')[0], fqn: in_fqn.split(':')[1].tr('.', '/') }
209209
end
210210

211211
def has_conf?
212-
if attributes.has_key?(MODULECONF) && !(attributes[MODULECONF].empty?)
213-
attributes[MODULECONF].split(%r{\s*,\s*}).size > 0
212+
if attributes.has_key?($moduleConf) && !(attributes[$moduleConf].empty?)
213+
attributes[$moduleConf].split(%r{\s*,\s*}).size > 0
214214
else
215215
false
216216
end
217217
end
218218

219219
def conf_list()
220-
attributes[MODULECONF].split(%r{\s*,\s*})
220+
attributes[$moduleConf].split(%r{\s*,\s*})
221221
end
222222
%>
223223

@@ -260,7 +260,7 @@
260260
</div>
261261
<% if is_toc? then %>
262262
<div class="fallback-toc">
263-
<%= converter.convert_with_options @document, 'outline', :toclevels => 4 %>
263+
<%= converter.convert @document, 'outline', :toclevels => 4 %>
264264
</div>
265265
<% end %>
266266
</div>

0 commit comments

Comments
 (0)