migrated to Gitea
All checks were successful
CI / build (push) Successful in 53s

This commit is contained in:
2024-04-14 19:12:18 +08:00
parent 1890d1d7b5
commit 06e8949b8e
11 changed files with 62 additions and 58 deletions

View File

@@ -0,0 +1,20 @@
name: CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: woryzen
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Execute Gradle build
env:
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
run: ./gradlew build publish

View File

@@ -37,7 +37,7 @@ allprojects {
repositories { repositories {
maven { maven {
url = 'https://woggioni.net/mvn/' url = getProperty('gitea.maven.url')
content { content {
includeGroup 'net.woggioni' includeGroup 'net.woggioni'
includeGroup 'com.lys' includeGroup 'com.lys'
@@ -123,9 +123,9 @@ Provider<War> warTaskProvider = tasks.named('war', War) { War it ->
tasks.named('deploy2Wildfly', Deploy2WildflyTask) { d2w -> tasks.named('deploy2Wildfly', Deploy2WildflyTask) { d2w ->
d2w.rpcPort = 9990 d2w.rpcPort = 9990
d2w.rpcUsername = 'woggioni' // d2w.rpcUsername = 'woggioni'
// d2w.rpcUsername = 'admin' // d2w.rpcUsername = 'admin'
d2w.rpcPassword = '123456' // d2w.rpcPassword = '123456'
d2w.deploymentName = 'jpacrepo.war' d2w.deploymentName = 'jpacrepo.war'
} }
@@ -141,9 +141,20 @@ tasks.named("test", Test) {
} }
publishing { publishing {
repositories { repositories {
maven { maven {
url = 'https://mvn.woggioni.net/' name = "Gitea"
url = uri(getProperty('gitea.maven.url'))
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "token ${System.getenv()["PUBLISHER_TOKEN"]}"
}
authentication {
header(HttpHeaderAuthentication)
}
} }
} }
publications { publications {

View File

@@ -1,6 +1,8 @@
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.caching=true org.gradle.caching=true
jpacrepo.version=2024.03.11 jpacrepo.version=2024.04.14
lys.version=2024.03.11 lys.version=2024.04.14
gitea.maven.url=https://gitea.woggioni.net/api/packages/woggioni/maven

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

14
gradlew vendored
View File

@@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045 # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
@@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045 # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command; # Collect all arguments for the java command:
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# shell script including quotes and variable substitutions, so put them in # and any embedded shellness will be escaped.
# double quotes to make sure that they get re-expanded; and # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# * put everything else in single quotes, so that it's not re-expanded. # treated as '${Hostname}' itself on the command line.
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \

20
gradlew.bat vendored
View File

@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail

View File

@@ -1,11 +0,0 @@
package net.woggioni.jpacrepo.experimental;
import org.junit.jupiter.api.Test;
public class JPQLTest {
@Test
public void test() {
}
}

View File

@@ -1,7 +1,7 @@
pluginManagement { pluginManagement {
repositories { repositories {
maven { maven {
url = 'https://woggioni.net/mvn/' url = getProperty('gitea.maven.url')
content { content {
includeGroup 'net.woggioni.gradle' includeGroup 'net.woggioni.gradle'
includeGroup 'net.woggioni.gradle.lombok' includeGroup 'net.woggioni.gradle.lombok'
@@ -17,7 +17,7 @@ pluginManagement {
dependencyResolutionManagement { dependencyResolutionManagement {
repositories { repositories {
maven { maven {
url = 'https://woggioni.net/mvn/' url = getProperty('gitea.maven.url')
content { content {
includeGroup 'com.lys' includeGroup 'com.lys'
} }
@@ -27,6 +27,7 @@ dependencyResolutionManagement {
catalog { catalog {
from group: 'com.lys', name: 'lys-catalog', version: getProperty('lys.version') from group: 'com.lys', name: 'lys-catalog', version: getProperty('lys.version')
version("slf4j", "1.7.36") version("slf4j", "1.7.36")
version('jzstd', '2024.04.14')
} }
} }
} }

View File

@@ -85,7 +85,6 @@ public class ClientTest {
assert Response.Status.CREATED.getStatusCode() == response.getStatus(); assert Response.Status.CREATED.getStatusCode() == response.getStatus();
} }
@Test
public void hashTest(@TempDir Path testDir) { public void hashTest(@TempDir Path testDir) {
ClassLoader cl = getClass().getClassLoader(); ClassLoader cl = getClass().getClassLoader();
Stream.of("gvfs-nfs-1.50.2-1-x86_64.pkg.tar.zst") Stream.of("gvfs-nfs-1.50.2-1-x86_64.pkg.tar.zst")
@@ -116,7 +115,6 @@ public class ClientTest {
} }
} }
@Test
public void invokeStatelessBean() throws Exception { public void invokeStatelessBean() throws Exception {
Properties prop = new Properties(); Properties prop = new Properties();
InputStream in = getClass().getClassLoader().getResourceAsStream("jboss-ejb-client.properties"); InputStream in = getClass().getClassLoader().getResourceAsStream("jboss-ejb-client.properties");
@@ -124,35 +122,18 @@ public class ClientTest {
prop.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); prop.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
// prop.put(Context.PROVIDER_URL, "http-remoting://localhost:1234");
prop.put(Context.PROVIDER_URL, "http-remoting://localhost:8080"); prop.put(Context.PROVIDER_URL, "http-remoting://localhost:8080");
// prop.put(Context.PROVIDER_URL, "remote://odroid-u3:4447"); prop.put(Context.SECURITY_PRINCIPAL, "luser");
prop.put(Context.SECURITY_PRINCIPAL, "walter"); prop.put(Context.SECURITY_CREDENTIALS, "123456");
prop.put(Context.SECURITY_CREDENTIALS, "27ff5990757d1d");
// prop.put(Context.SECURITY_PRINCIPAL, "luser");
// prop.put(Context.SECURITY_CREDENTIALS, "123456");
prop.put("jboss.naming.client.ejb.context", true); prop.put("jboss.naming.client.ejb.context", true);
Context context = new InitialContext(prop); Context context = new InitialContext(prop);
Context ctx = new InitialContext(prop); Context ctx = new InitialContext(prop);
traverseJndiNode("/", context); traverseJndiNode("/", context);
// final PacmanService stateService = (PacmanService) ctx.lookup("/jpacrepo-1.0/remote/PacmanServiceEJB!service.PacmanService");
final FileSystemSynchronizer service = (FileSystemSynchronizer) ctx.lookup( final FileSystemSynchronizer service = (FileSystemSynchronizer) ctx.lookup(
"/jpacrepo/PackageSynchronizerEJB!net.woggioni.jpacrepo.api.service.FileSystemSynchronizer" "/jpacrepo/PackageSynchronizerEJB!net.woggioni.jpacrepo.api.service.FileSystemSynchronizer"
); );
// List<PkgData> pkgs = service.searchPackage("google-earth", null, null, 1, 10);
// System.out.println(new XStream().toXML(pkgs));
service.syncDb(); service.syncDb();
// service.searchPkgId("jre8-openjdk", null, null, null)
// .stream()
// .map(service::getPackage)
// .filter(Objects::nonNull)
// .map(PkgData::getFileName)
// .forEach(System.out::println);
// final TestEJB service = (TestEJB) ctx.lookup(
// "/jpacrepo-2023.07TestEJBImpl!net.woggioni.jpacrepo.api.service.TestEJB"
// );
// System.out.println(service.hello());
} }
} }