Skip to content

Commit

Permalink
Refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Sep 15, 2024
1 parent 5114334 commit 63b2701
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 97 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/asciidoc.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ on:
- master
jobs:
Test:
name: Build asciidoc
name: Deploy docs zip
strategy:
matrix:
os: [ubuntu-latest]
jdk: [8]
jdk: [11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: joschi/setup-jdk@v2
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
- name: Render asciidoc
run: mvn package
java-version: 11
distribution: temurin
- name: Render guide
run: mvn compile asciidoctor:process-asciidoc
- name: Publish to GitHub Pages
uses: JamesIves/[email protected]
with:
Expand Down
113 changes: 36 additions & 77 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@

<parent>
<groupId>io.vertx</groupId>
<artifactId>vertx-parent</artifactId>
<version>14</version>
<artifactId>vertx5-parent</artifactId>
<version>4</version>
</parent>

<groupId>com.julienviet</groupId>
<artifactId>advanced-vertx-guide</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<stack.version>4.1.2</stack.version>
<asciidoc.dir>${project.basedir}/src/main/asciidoc</asciidoc.dir>
<stack.version>5.0.0-SNAPSHOT</stack.version>
</properties>

<dependencyManagement>
Expand All @@ -38,14 +36,13 @@
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen</artifactId>
<scope>provided</scope>
<artifactId>vertx-codegen-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-docgen</artifactId>
<scope>provided</scope>
<version>0.9.2</version>
<artifactId>vertx-docgen-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.netty</groupId>
Expand All @@ -55,79 +52,41 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen</artifactId>
<classifier>processor</classifier>
</annotationProcessorPath>
<annotationProcessorPath>
<groupId>io.vertx</groupId>
<artifactId>vertx-docgen-processor</artifactId>
<classifier>processor</classifier>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<annotationProcessors>
<annotationProcessor>io.vertx.docgen.JavaDocGenProcessor</annotationProcessor>
</annotationProcessors>
<compilerArgs>
<arg>-Adocgen.output=${project.build.directory}/asciidoc</arg>
<arg>-Adocgen.source=${asciidoc.dir}</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/asciidoc</outputDirectory>
<resources>
<resource>
<directory>${asciidoc.dir}</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.adoc</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.7.1</version>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>package-docs</id>
<goals>
<goal>process-asciidoc</goal>
<goal>single</goal>
</goals>
<configuration>
<sourceDirectory>${project.build.directory}/asciidoc</sourceDirectory>
<outputDirectory>${project.build.directory}/docs/${project.artifactId}</outputDirectory>
<sourceHighlighter>highlightjs</sourceHighlighter>
<preserveDirectories>true</preserveDirectories>
<sourceDocumentName>index.adoc</sourceDocumentName>
<relativeBaseDir>true</relativeBaseDir>
<backend>html5</backend>
<doctype>book</doctype>
<attributes>
<toc>center</toc>
<icons>font</icons>
<idseparator>-</idseparator>
<docinfo1>true</docinfo1>
<stylesheet>iconic.css</stylesheet>
<stylesdir>${project.basedir}/src/main/stylesheets</stylesdir>
<!-- see https://highlightjs.org/static/demo/ -->
<highlightjs-theme>tomorrow-night-eighties</highlightjs-theme>
</attributes>
</configuration>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Advanced Vert.x Guide
Julien Viet <julien@julienviet.com>

This guide document advanced/internal stuff about Vert.x.
This guide document advanced/internal stuff about Vert.x (5.0).

It aims to explain and discuss the following

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/vietj/vertx/internals/Internals.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.VertxInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.internal.VertxInternal;
import io.vertx.docgen.Source;

import java.net.SocketAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@
import io.netty.channel.ChannelPipeline;
import io.netty.handler.codec.memcache.binary.*;
import io.vertx.codegen.annotations.Nullable;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.VertxInternal;
import io.vertx.core.internal.VertxInternal;
import io.vertx.core.net.NetClient;
import io.vertx.core.net.NetClientOptions;
import io.vertx.core.net.NetSocket;
import io.vertx.core.net.impl.NetSocketInternal;
import io.vertx.core.internal.net.NetSocketInternal;
import org.vietj.vertx.memcached.MemcachedClient;
import org.vietj.vertx.memcached.MemcachedError;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import io.vertx.core.Future;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import org.vietj.vertx.nettyclient.TimeClient;

public class TimeClientImpl implements TimeClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;

/**
* @author <a href="mailto:[email protected]">Julien Viet</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
import io.netty.channel.EventLoop;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.VertxInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.internal.VertxInternal;
import org.vietj.vertx.nettyserver.TimeServer;

public class TimeServerImpl implements TimeServer {
Expand Down

0 comments on commit 63b2701

Please sign in to comment.