Skip to content

Commit 517d755

Browse files
committed
Refine Javadoc setup.
Add Javadoc links. See spring-projects/spring-data-build#2886
1 parent 3a6d746 commit 517d755

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

pom.xml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,104 @@
183183
</develocity>
184184
</configuration>
185185
</plugin>
186+
<plugin>
187+
<groupId>org.apache.maven.plugins</groupId>
188+
<artifactId>maven-dependency-plugin</artifactId>
189+
<executions>
190+
<execution>
191+
<id>unpack-javadoc-offline-links</id>
192+
<configuration>
193+
<artifactItems combine.children="append">
194+
<artifactItem>
195+
<groupId>org.hibernate.orm</groupId>
196+
<artifactId>hibernate-core</artifactId>
197+
<version>${hibernate}</version>
198+
<classifier>javadoc</classifier>
199+
<type>jar</type>
200+
<outputDirectory>
201+
${javadoc.offline-links.directory}/hibernate-core
202+
</outputDirectory>
203+
</artifactItem>
204+
<artifactItem>
205+
<groupId>org.hibernate.orm</groupId>
206+
<artifactId>hibernate-envers</artifactId>
207+
<version>${hibernate}</version>
208+
<classifier>javadoc</classifier>
209+
<type>jar</type>
210+
<outputDirectory>
211+
${javadoc.offline-links.directory}/hibernate-envers
212+
</outputDirectory>
213+
</artifactItem>
214+
<artifactItem>
215+
<groupId>jakarta.persistence</groupId>
216+
<artifactId>jakarta.persistence-api</artifactId>
217+
<version>${jakarta-persistence-api}</version>
218+
<classifier>javadoc</classifier>
219+
<type>jar</type>
220+
<outputDirectory>
221+
${javadoc.offline-links.directory}/jakarta-persistence
222+
</outputDirectory>
223+
</artifactItem>
224+
</artifactItems>
225+
</configuration>
226+
</execution>
227+
</executions>
228+
</plugin>
229+
230+
<plugin>
231+
<groupId>org.apache.maven.plugins</groupId>
232+
<artifactId>maven-javadoc-plugin</artifactId>
233+
<configuration>
234+
<offlineLinks combine.children="append">
235+
<offlineLink>
236+
<url>
237+
https://docs.hibernate.org/orm/${hibernate.parsed.majorVersion}.${hibernate.parsed.minorVersion}/javadocs/
238+
</url>
239+
<location>
240+
${javadoc.offline-links.directory}/hibernate-core
241+
</location>
242+
</offlineLink>
243+
<offlineLink>
244+
<url>
245+
https://docs.hibernate.org/orm/${hibernate.parsed.majorVersion}.${hibernate.parsed.minorVersion}/javadocs/
246+
</url>
247+
<location>
248+
${javadoc.offline-links.directory}/hibernate-envers
249+
</location>
250+
</offlineLink>
251+
<offlineLink>
252+
<url>
253+
https://javadoc.io/doc/jakarta.persistence/jakarta.persistence-api/${jakarta-persistence-api}
254+
</url>
255+
<location>
256+
${javadoc.offline-links.directory}/jakarta-persistence
257+
</location>
258+
</offlineLink>
259+
</offlineLinks>
260+
</configuration>
261+
</plugin>
186262
</plugins>
187263
</pluginManagement>
264+
265+
<plugins>
266+
<plugin>
267+
<groupId>org.codehaus.mojo</groupId>
268+
<artifactId>build-helper-maven-plugin</artifactId>
269+
<executions>
270+
<execution>
271+
<id>parse-hibernate-version</id>
272+
<goals>
273+
<goal>parse-version</goal>
274+
</goals>
275+
<phase>initialize</phase>
276+
<configuration>
277+
<propertyPrefix>hibernate.parsed</propertyPrefix>
278+
<versionString>${hibernate}</versionString>
279+
</configuration>
280+
</execution>
281+
</executions>
282+
</plugin>
283+
</plugins>
188284
</build>
189285

190286
<repositories>

0 commit comments

Comments
 (0)