build: add aliyun maven mirrors for dependency resolution

This commit is contained in:
Joe Allen
2026-05-18 17:33:51 +08:00
parent 6952aefc4f
commit aa672ad587
3 changed files with 53 additions and 105 deletions
+52
View File
@@ -0,0 +1,52 @@
plugins {
id 'java'
id 'application'
}
group = 'org.example'
version = '1.0-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
maven { url = uri('https://maven.aliyun.com/repository/public') }
maven { url = uri('https://maven.aliyun.com/repository/central') }
mavenCentral()
}
ext {
djlVersion = '0.26.0'
}
dependencies {
implementation 'com.google.code.gson:gson:2.13.1'
implementation 'org.slf4j:slf4j-api:2.0.17'
implementation 'commons-cli:commons-cli:1.9.0'
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.25.2'
implementation "ai.djl:api:${djlVersion}"
implementation "ai.djl:basicdataset:${djlVersion}"
implementation "ai.djl:model-zoo:${djlVersion}"
implementation "ai.djl.pytorch:pytorch-engine:${djlVersion}"
implementation "ai.djl.pytorch:pytorch-model-zoo:${djlVersion}"
implementation "ai.djl.paddlepaddle:paddlepaddle-model-zoo:${djlVersion}"
implementation "ai.djl.paddlepaddle:paddlepaddle-engine:${djlVersion}"
compileOnly 'org.projectlombok:lombok:1.18.38'
annotationProcessor 'org.projectlombok:lombok:1.18.38'
implementation 'org.bytedeco:javacv-platform:1.5.12'
testImplementation 'org.testng:testng:7.11.0'
}
test {
useTestNG()
}
application {
mainClass = 'cn.heavenlybook.Main'
}
-105
View File
@@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>DetectAnimalsFromCameras</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<djl.version>0.17.0</djl.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<encoding>utf-8</encoding>
</configuration>
<version>3.8.1</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>ai.djl</groupId>
<artifactId>api</artifactId>
<version>${djl.version}</version>
</dependency>
<dependency>
<groupId>ai.djl</groupId>
<artifactId>basicdataset</artifactId>
<version>${djl.version}</version>
</dependency>
<dependency>
<groupId>ai.djl</groupId>
<artifactId>model-zoo</artifactId>
<version>${djl.version}</version>
</dependency>
<!-- Pytorch -->
<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-engine</artifactId>
<version>${djl.version}</version>
</dependency>
<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-model-zoo</artifactId>
<version>${djl.version}</version>
</dependency>
<!-- PaddlePaddle -->
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-model-zoo</artifactId>
<version>${djl.version}</version>
</dependency>
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-engine</artifactId>
<version>${djl.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.18</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv-platform</artifactId>
<version>1.5.7</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.5</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
+1
View File
@@ -0,0 +1 @@
rootProject.name = 'DetectAnimalsFromCameras'