Ahora utiliza la libreria actualizada

This commit is contained in:
2025-05-18 17:33:42 +02:00
parent 822fe23bf8
commit e3ca32610f
2 changed files with 75 additions and 50 deletions

View File

@@ -0,0 +1,50 @@
name: Build and Publish to Gitea Packages
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.8
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '23'
- name: Build with Maven
run: mvn clean package -Dgpg.skip=true
- name: Create Maven settings.xml
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml <<EOF
<settings>
<servers>
<server>
<id>gitea</id>
<username>${USER_GITEA}</username>
<password>${TOKEN_GITEA}</password>
</server>
</servers>
</settings>
EOF
env:
USER_GITEA: ${{ secrets.USER_GITEA }}
TOKEN_GITEA: ${{ secrets.TOKEN_GITEA }}
- name: Publish to Gitea Package Registry
run: mvn deploy -DaltDeploymentRepository=gitea::default::https://git.h4ckdata.es/api/packages/h4ckx0r/maven -Dgpg.skip=true
env:
USER_GITEA: ${{ secrets.USER_GITEA }}
TOKEN_GITEA: ${{ secrets.TOKEN_GITEA }}

75
pom.xml
View File

@@ -8,12 +8,6 @@
<description>Socket.IO Client Library for Java</description>
<url>https://github.com/socketio/socket.io-client-java</url>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<properties>
<github.global.server>github</github.global.server>
</properties>
@@ -41,38 +35,44 @@
</developer>
</developers>
<repositories>
<repository>
<id>sonatype-oss-public</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<prerequisites>
<maven>3.0.4</maven>
</prerequisites>
<repositories>
<repository>
<id>gitea</id>
<url>https://git.h4ckdata.es/api/packages/h4ckx0r/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>gitea</id>
<url>https://git.h4ckdata.es/api/packages/h4ckx0r/maven</url>
</repository>
<snapshotRepository>
<id>gitea</id>
<url>https://git.h4ckdata.es/api/packages/h4ckx0r/maven</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>io.socket</groupId>
<artifactId>engine.io-client</artifactId>
<version>2.1.0</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
<version>20231013</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -89,17 +89,6 @@
</dependency>
</dependencies>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
@@ -107,8 +96,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>23</source>
<target>23</target>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
@@ -130,20 +119,6 @@
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@@ -207,7 +182,7 @@
<workingDirectory>./src/test/resources</workingDirectory>
<executable>npm</executable>
<arguments>
<argument>install</argument>
<argument>install</argument>
</arguments>
</configuration>
</execution>