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> <description>Socket.IO Client Library for Java</description>
<url>https://github.com/socketio/socket.io-client-java</url> <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> <properties>
<github.global.server>github</github.global.server> <github.global.server>github</github.global.server>
</properties> </properties>
@@ -41,38 +35,44 @@
</developer> </developer>
</developers> </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> <prerequisites>
<maven>3.0.4</maven> <maven>3.0.4</maven>
</prerequisites> </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> <dependencies>
<dependency> <dependency>
<groupId>io.socket</groupId> <groupId>io.socket</groupId>
<artifactId>engine.io-client</artifactId> <artifactId>engine.io-client</artifactId>
<version>2.1.0</version> <version>2.1.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.json</groupId> <groupId>org.json</groupId>
<artifactId>json</artifactId> <artifactId>json</artifactId>
<version>20090211</version> <version>20231013</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.13.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@@ -89,17 +89,6 @@
</dependency> </dependency>
</dependencies> </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> <build>
<plugins> <plugins>
<plugin> <plugin>
@@ -107,8 +96,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <version>3.5.1</version>
<configuration> <configuration>
<source>1.7</source> <source>23</source>
<target>1.7</target> <target>23</target>
<compilerArgs> <compilerArgs>
<arg>-Xlint:unchecked</arg> <arg>-Xlint:unchecked</arg>
</compilerArgs> </compilerArgs>
@@ -130,20 +119,6 @@
</systemProperties> </systemProperties>
</configuration> </configuration>
</plugin> </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> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
@@ -207,7 +182,7 @@
<workingDirectory>./src/test/resources</workingDirectory> <workingDirectory>./src/test/resources</workingDirectory>
<executable>npm</executable> <executable>npm</executable>
<arguments> <arguments>
<argument>install</argument> <argument>install</argument>
</arguments> </arguments>
</configuration> </configuration>
</execution> </execution>