Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SSH providers to separate extensions #122

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc-deployment</artifactId>
<artifactId>quarkus-core-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.jgit</groupId>
<artifactId>quarkus-jgit</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.jsch</groupId>
<artifactId>quarkus-jsch-deployment</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
3 changes: 2 additions & 1 deletion docs/modules/ROOT/pages/includes/attributes.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:quarkus-version: 3.8.2
:quarkus-version: 3.8.4
:quarkus-jgit-version: 3.1.2
:project-version: 3.1.2

:examples-dir: ./../examples/

:quarkus-org-url: https://github.com/quarkusio
Expand Down
61 changes: 60 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
<module>runtime</module>
<module>docs</module>
<module>integration-tests</module>
<module>ssh-factories/jsch</module>
<module>ssh-factories/sshd</module>
</modules>
<properties>
<quarkus.version>3.8.2</quarkus.version>
<quarkus.version>3.8.4</quarkus.version>
<jgit.version>6.10.0.202406032230-r</jgit.version>
<quarkus-jsch.version>3.0.8</quarkus-jsch.version>
<quarkus-sshd.version>1.1.0</quarkus-sshd.version>
<sundr-maven-plugin.version>0.103.1</sundr-maven-plugin.version>
</properties>
<scm>
<connection>scm:git:[email protected]:quarkiverse/quarkus-jgit.git</connection>
Expand Down Expand Up @@ -57,6 +61,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.jsch</groupId>
<artifactId>quarkus-jsch</artifactId>
Expand All @@ -67,16 +76,66 @@
<artifactId>quarkus-jsch-deployment</artifactId>
<version>${quarkus-jsch.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.sshd</groupId>
<artifactId>quarkus-sshd</artifactId>
<version>${quarkus-sshd.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.sshd</groupId>
<artifactId>quarkus-sshd-deployment</artifactId>
<version>${quarkus-sshd.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>io.sundr</groupId>
<artifactId>sundr-maven-plugin</artifactId>
<version>${sundr-maven-plugin.version}</version>
<executions>
<execution>
<inherited>false</inherited>
<goals>
<goal>generate-bom</goal>
</goals>
<configuration>
<boms>
<bom>
<artifactId>quarkus-jgit-bom</artifactId>
<name>Quarkus JGit: BOM</name>
<description>Centralized dependencyManagement for the Quarkus JGit Project</description>
<properties>
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
<sonar.skip>true</sonar.skip>
</properties>
<modules>
<excludes>
<exclude>*:*-docs</exclude>
<exclude>*:*-integration-tests</exclude>
</excludes>
</modules>

</bom>
</boms>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.version}</version>
</plugin>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-maven-plugin</artifactId>
<version>${quarkus.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
13 changes: 2 additions & 11 deletions runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,15 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.jsch</groupId>
<artifactId>quarkus-jsch</artifactId>
<artifactId>quarkus-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<artifactId>nativeimage</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -37,7 +29,6 @@
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-maven-plugin</artifactId>
<version>${quarkus.version}</version>
<executions>
<execution>
<phase>compile</phase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ metadata:
- "git"
categories:
- "miscellaneous"
guide: https://quarkiverse.github.io/quarkiverse-docs/quarkus-jgit/dev/index.html
guide: https://docs.quarkiverse.io/quarkus-jgit/dev/index.html
status: "stable"
46 changes: 46 additions & 0 deletions ssh-factories/jsch/deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.quarkiverse.jgit</groupId>
<artifactId>quarkus-jgit-jsch-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>
<artifactId>quarkus-jgit-jsch-deployment</artifactId>
<name>Quarkus - JGit - SSH Providers - JSch - Deployment</name>

<dependencies>
<dependency>
<groupId>io.quarkiverse.jsch</groupId>
<artifactId>quarkus-jsch-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.jgit</groupId>
<artifactId>quarkus-jgit-jsch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${quarkus.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package io.quarkiverse.quarkus.jgit.jsch.deployment;

import org.eclipse.jgit.transport.SshSessionFactory;
import org.eclipse.jgit.transport.ssh.jsch.JschConfigSessionFactory;

import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;

class JGitJschProcessor {

@BuildStep
ServiceProviderBuildItem serviceProvider() {
return new ServiceProviderBuildItem(SshSessionFactory.class.getName(), JschConfigSessionFactory.class.getName());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package io.quarkiverse.quarkus.jgit.jsch.test;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.test.QuarkusDevModeTest;

public class JgitJschDevModeTest {

// Start hot reload (DevMode) test with your extension loaded
@RegisterExtension
static final QuarkusDevModeTest devModeTest = new QuarkusDevModeTest()
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));

@Test
public void writeYourOwnDevModeTest() {
// Write your dev mode tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-hot-reload for more information
Assertions.assertTrue(true, "Add dev mode assertions to " + getClass().getName());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package io.quarkiverse.quarkus.jgit.jsch.test;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.test.QuarkusUnitTest;

public class JgitJschTest {

// Start unit test with your extension loaded
@RegisterExtension
static final QuarkusUnitTest unitTest = new QuarkusUnitTest()
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));

@Test
public void writeYourOwnUnitTest() {
// Write your unit tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-extensions for more information
Assertions.assertTrue(true, "Add some assertions to " + getClass().getName());
}
}
96 changes: 96 additions & 0 deletions ssh-factories/jsch/integration-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.quarkiverse.jgit</groupId>
<artifactId>quarkus-jgit-jsch-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>
<artifactId>quarkus-jgit-jsch-integration-tests</artifactId>
<name>Quarkus - JGit - SSH Providers - JSch - Integration Tests</name>

<properties>
<skipITs>true</skipITs>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.jgit</groupId>
<artifactId>quarkus-jgit-jsch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>native-image</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${native.surefire.skip}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<skipITs>false</skipITs>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
Loading