Issue #10312 Remove cyclic dependencies between jetty-home and jetty-documentation. Add new module jetty-documentation (#10348)

* cleanup jetty home build extracting jetty-documentation
* Issue #10312 Remove cyclic dependencies between jetty-home and jetty-documentation

Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Olivier Lamy 2023-08-25 03:41:17 +10:00 committed by GitHub
parent c55363d43f
commit 2ea646bacd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 125 deletions

View File

@ -89,9 +89,10 @@ public class JettyIncludeExtension implements ExtensionRegistry
{
try
{
String jettyVersion = (String)document.getAttribute("project-version");
// Document attributes are converted by Asciidoctor to lowercase.
Path jettyDocsPath = Path.of((String)document.getAttribute("project-basedir"));
Path jettyHome = jettyDocsPath.resolve("../../jetty-home/target/jetty-home").normalize();
Path jettyHome = jettyDocsPath.resolve("target/jetty-home-" + jettyVersion).normalize();
JettyHomeTester jetty = JettyHomeTester.Builder.newInstance()
.jettyHome(jettyHome)

View File

@ -138,6 +138,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-jetty-home</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-home</artifactId>
<version>${project.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
@ -248,5 +272,12 @@
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-home</artifactId>
<version>${project.version}</version>
<type>zip</type>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -13,7 +13,6 @@
<properties>
<assembly-directory>${basedir}/target/jetty-home</assembly-directory>
<source-assembly-directory>${basedir}/target/jetty-home-sources</source-assembly-directory>
<docs-assembly-directory>${basedir}/target/jetty-home-with-docs</docs-assembly-directory>
<jetty-setuid-version>1.0.4</jetty-setuid-version>
<spotbugs.skip>true</spotbugs.skip>
</properties>
@ -509,44 +508,6 @@
<outputDirectory>${assembly-directory}</outputDirectory>
</configuration>
</execution>
<execution>
<id>unpack-documentation</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty.documentation</groupId>
<artifactId>jetty-documentation</artifactId>
<version>${project.version}</version>
<classifier>html</classifier>
<type>zip</type>
</artifactItem>
</artifactItems>
<outputDirectory>${docs-assembly-directory}/docs</outputDirectory>
</configuration>
</execution>
<execution>
<id>unpack-javadoc-aggregate</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>javadoc</artifactId>
<version>${project.version}</version>
<classifier>javadoc</classifier>
<type>jar</type>
</artifactItem>
</artifactItems>
<outputDirectory>${docs-assembly-directory}/javadoc</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
@ -602,19 +563,6 @@
<appendAssemblyId>true</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>docs</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/jetty-with-docs-assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>true</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
@ -928,14 +876,6 @@
<type>jar</type>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.documentation</groupId>
<artifactId>jetty-documentation</artifactId>
<version>${project.version}</version>
<classifier>html</classifier>
<type>zip</type>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>javadoc</artifactId>

View File

@ -1,46 +0,0 @@
<assembly>
<id>with-docs</id>
<formats>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${assembly-directory}</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/META-INF/**</exclude>
<exclude>*-config.jar</exclude>
<!-- we'll build up shell scripts with execute in separate file-set -->
<exclude>bin/*.sh</exclude>
</excludes>
<!-- The archive is generated with the uid / gid of the user that
built the jetty release. which is highly unlikely to
exist on the target machines that unpack this tarball.
We set the user / group / other to have read-only access
to files, and read-execute access to directories
in the unpacked contents. -->
<fileMode>0444</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
<fileSet>
<directory>${assembly-directory}</directory>
<outputDirectory></outputDirectory>
<includes>
<include>bin/*.sh</include>
</includes>
<!-- Set read-execute for shell scripts -->
<fileMode>0555</fileMode>
</fileSet>
<fileSet>
<directory>${docs-assembly-directory}</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
</includes>
</fileSet>
</fileSets>
</assembly>

View File

@ -1,18 +0,0 @@
<assembly>
<id>site-component</id>
<formats>
<format>jar</format>
</formats>
<fileSets>
<fileSet>
<directory>${basedir}/target/dist-src</directory>
<outputDirectory>jetty-home-${version}-site-component</outputDirectory>
<includes>
<include>target/site/**</include>
<include>README**</include>
<include>VERSION**</include>
<include>LICENSES/**</include>
</includes>
</fileSet>
</fileSets>
</assembly>