Skip to content

Commit

Permalink
Issue #10312 Remove cyclic dependencies between jetty-home and jetty-…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Co-authored-by: Joakim Erdfelt <[email protected]>
  • Loading branch information
olamy and joakime authored Aug 24, 2023
1 parent c55363d commit 2ea646b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ public void process(Document document, PreprocessorReader reader, String target,
{
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)
Expand Down
31 changes: 31 additions & 0 deletions documentation/jetty-documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
60 changes: 0 additions & 60 deletions jetty-home/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
46 changes: 0 additions & 46 deletions jetty-home/src/main/assembly/jetty-with-docs-assembly.xml

This file was deleted.

18 changes: 0 additions & 18 deletions jetty-home/src/main/assembly/site-component.xml

This file was deleted.

0 comments on commit 2ea646b

Please sign in to comment.