解决Maven使用<systemPath>标签的warning

本文介绍如何使用maven-install-plugin解决Maven项目中&lt;systemPath&gt;标签导致的警告。通过配置插件,将外部依赖安装到本地仓库,避免打包时出现警告。插件的最新版本可在官网查询。
部署运行你感兴趣的模型镜像

当maven项目中使用<systemPath>标签时,打包项目时会报警告,具体如下所示:

为了解决这个warning,使用如下maven插件:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-install-plugin</artifactId>
    <version>2.5.2</version>
    <executions>
        <execution>
            <id>install-external</id>
            <phase>clean</phase>
            <configuration>
                <file>${basedir}/lib/mylib-core-0.0.1.jar</file>
                <repositoryLayout>default</repositoryLayout>
                <groupId>com.mylib</groupId>
                <artifactId>mylib-core</artifactId>
                <version>0.0.1</version>
                <packaging>jar</packaging>
                <generatePom>true</generatePom>
            </configuration>
            <goals>
                <goal>install-file</goal>
            </goals>
        </execution>
    </executions>
</plugin>

当打包maven项目时,首先运行 mvn clean 命令,再运行 mvn package 命令,即可生成jar包。

其中,插件的最新版本请到下面的网站查询:

maven-install-plugin:https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-install-plugin

参考文献:https://stackoverflow.com/questions/10935135/maven-and-adding-jars-to-system-scope

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

mvn install:install-file \ -Dfile=/path/to/actual/ruoyi-framework-3.8.9.jar \ -DgroupId=com.ruoyi \ -DartifactId=ruoyi-framework \ -Dversion=3.8.9 \ -Dpackaging=jar 出现报错: [ERROR] [ERROR] Some problems were encountered while processing the POMs: [WARNING] 'parent.relativePath' of POM io.github.bovane:ruoyi-framework:3.8.0 (/home/xitongguanliyuan/ruoyi/RuoYi-flowable/ruoyi-admin/pom.xml) points at com.ruoyi:ruoyi instead of io.github.bovane:ruoyi, please verify your project structure @ line 5, column 13 [FATAL] 'dependencies.dependency.[io.github.bovane:ruoyi-framework:3.8.0]' for io.github.bovane:ruoyi-framework:3.8.0 is referencing itself. @ line 33, column 21 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project io.github.bovane:ruoyi-framework:3.8.0 (/home/xitongguanliyuan/ruoyi/RuoYi-flowable/ruoyi-admin/pom.xml) has 1 error [ERROR] 'dependencies.dependency.[io.github.bovane:ruoyi-framework:3.8.0]' for io.github.bovane:ruoyi-framework:3.8.0 is referencing itself. @ line 33, column 21 [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException xitongguanliyuan@fcsh:~/ruoyi/RuoYi-flowable/ruoyi-admin$ sudo apt update Hit:1 http://ftp.sjtu.edu.cn/ubuntu noble InRelease Hit:2 http://ftp.sjtu.edu.cn/ubuntu noble-updates InRelease Hit:3 http://ftp.sjtu.edu.cn/ubuntu noble-backports InRelease Hit:4 http://repo.mysql.com/apt/ubuntu noble InRelease Hit:5 http://security.ubuntu.com/ubuntu noble-security InRelease Ign:6 https://packages.adoptium.net/artifactory/ubuntu noble InRelease Err:7 https://packages.adoptium.net/artifactory/ubuntu noble Release 404 Not Found [IP: 104.18.21.66 443] Hit:8 https://deb.nodesource.com/node_18.x nodistro InRelease Reading package lists... Done E: The repository 'https://packages.adoptium.net/artifactory/ubuntu noble Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. xitongguanliyuan@fcsh:~/ruoyi/RuoYi-flowable/ruoyi-admin$ mvn -v Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b) Maven home: /opt/maven Java version: 1.8.0_462, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.8.0-85-generic", arch: "amd64", family: "unix" 修正父模块的版本为3.8.0,子模块满足官网库中版本,父模块不满足 子模块代码如下: xitongguanliyuan@fcsh:~/ruoyi/RuoYi-flowable/ruoyi-admin$ cat pom.xml <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>ruoyi</artifactId> <groupId>io.github.bovane</groupId> <version>3.8.0</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>ruoyi-framework</artifactId> <version>3.8.0</version> <description> framework框架核心 </description> <dependencies> <!-- SpringBoot Web容器 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- SpringBoot 拦截器 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> <dependency> <groupId>io.github.bovane</groupId> <artifactId>ruoyi-framework</artifactId> <version>3.8.0</version> </dependency> <!-- 阿里数据库连接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> </dependency> <!-- 验证码 --> <dependency> <groupId>com.github.penggle</groupId> <artifactId>kaptcha</artifactId> <exclusions> <exclusion> <artifactId>javax.servlet-api</artifactId> <groupId>javax.servlet</groupId> </exclusion> </exclusions> </dependency> <!-- 获取系统信息 --> <dependency> <groupId>com.github.oshi</groupId> <artifactId>oshi-core</artifactId> </dependency> <!-- 系统模块--> <dependency> <groupId>io.github.bovane</groupId> <artifactId>ruoyi-system</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.5.15</version> <configuration> <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 --> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.1.0</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <warName>${project.artifactId}</warName> </configuration> </plugin> </plugins> <finalName>${project.artifactId}</finalName> </build> <!-- 正确的仓库配置 --> <repositories> <!-- 阿里云公共仓库 --> <repository> <id>aliyun-public</id> <name>Aliyun Public Repository</name> <url>https://maven.aliyun.com/repository/public</url> <layout>default</layout> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> <!-- 阿里云中央仓库镜像 --> <repository> <id>aliyun-central</id> <name>Aliyun Central Repository</name> <url>https://maven.aliyun.com/repository/central</url> <layout>default</layout> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <!-- 插件仓库配置 --> <pluginRepository> <id>aliyun-plugin</id> <name>Aliyun Plugin Repository</name> <url>https://maven.aliyun.com/repository/public</url> <layout>default</layout> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </pluginRepository> </pluginRepositories> </project> 父模块代码如下: xitongguanliyuan@fcsh:~/ruoyi/RuoYi-flowable$ cat pom.xml <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.ruoyi</groupId> <artifactId>ruoyi</artifactId> <version>3.8.9</version> <name>ruoyi</name> <url>http://www.ruoyi.vip</url> <description>若依管理系统</description> <properties> <ruoyi.version>3.8.9</ruoyi.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> <spring-boot.version>2.5.15</spring-boot.version> <druid.version>1.2.23</druid.version> <bitwalker.version>1.21</bitwalker.version> <swagger.version>3.0.0</swagger.version> <kaptcha.version>2.3.3</kaptcha.version> <pagehelper.boot.version>1.4.7</pagehelper.boot.version> <fastjson.version>2.0.53</fastjson.version> <oshi.version>6.6.5</oshi.version> <commons.io.version>2.13.0</commons.io.version> <poi.version>4.1.2</poi.version> <velocity.version>2.3</velocity.version> <jwt.version>0.9.1</jwt.version> <!-- override dependency version --> <tomcat.version>9.0.102</tomcat.version> <logback.version>1.2.13</logback.version> <spring-security.version>5.7.12</spring-security.version> <spring-framework.version>5.3.39</spring-framework.version> <flowable.version>6.8.0</flowable.version> </properties> <!-- 依赖声明 --> <dependencyManagement> <dependencies> <!-- 覆盖SpringFramework的依赖配置--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-framework-bom</artifactId> <version>${spring-framework.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- 覆盖SpringSecurity的依赖配置--> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-bom</artifactId> <version>${spring-security.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- SpringBoot的依赖配置--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- 覆盖logback的依赖配置--> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>${logback.version}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>${logback.version}</version> </dependency> <!-- 覆盖tomcat的依赖配置--> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> <version>${tomcat.version}</version> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-el</artifactId> <version>${tomcat.version}</version> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> <version>${tomcat.version}</version> </dependency> <!-- 阿里数据库连接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>${druid.version}</version> </dependency> <!-- 解析客户端操作系统、浏览器等 --> <dependency> <groupId>eu.bitwalker</groupId> <artifactId>UserAgentUtils</artifactId> <version>${bitwalker.version}</version> </dependency> <!-- pagehelper 分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>${pagehelper.boot.version}</version> </dependency> <!-- 获取系统信息 --> <dependency> <groupId>com.github.oshi</groupId> <artifactId>oshi-core</artifactId> <version>${oshi.version}</version> </dependency> <!-- Swagger3依赖 --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>${swagger.version}</version> <exclusions> <exclusion> <groupId>io.swagger</groupId> <artifactId>swagger-models</artifactId> </exclusion> </exclusions> </dependency> <!-- io常用工具类 --> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>${commons.io.version}</version> </dependency> <!-- excel工具 --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>${poi.version}</version> </dependency> <!-- velocity代码生成使用模板 --> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-core</artifactId> <version>${velocity.version}</version> </dependency> <!-- 阿里JSON解析器 --> <dependency> <groupId>com.alibaba.fastjson2</groupId> <artifactId>fastjson2</artifactId> <version>${fastjson.version}</version> </dependency> <!-- Token生成与解析--> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>${jwt.version}</version> </dependency> <!-- 验证码 --> <dependency> <groupId>pro.fessional</groupId> <artifactId>kaptcha</artifactId> <version>${kaptcha.version}</version> </dependency> <!-- 定时任务--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-quartz</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 代码生成--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-generator</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 核心模块--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-framework</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 系统模块--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-system</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 通用工具--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-common</artifactId> <version>${ruoyi.version}</version> </dependency> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-flowable</artifactId> <version>${ruoyi.version}</version> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter</artifactId> <version>${flowable.version}</version> </dependency> <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-annotations</artifactId> <version>1.5.21</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.4.0</version> </dependency> </dependencies> </dependencyManagement> <modules> <module>ruoyi-admin</module> <module>ruoyi-framework</module> <module>ruoyi-system</module> <module>ruoyi-quartz</module> <module>ruoyi-generator</module> <module>ruoyi-common</module> <module>ruoyi-flowable</module> </modules> <packaging>pom</packaging> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> </plugins> </build> <repositories> <repository> <id>public</id> <name>aliyun nexus</name> <url>https://maven.aliyun.com/repository/public</url> <releases> <enabled>true</enabled> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>public</id> <name>aliyun nexus</name> <url>https://maven.aliyun.com/repository/public</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </project>
最新发布
10-17
[root@centos ~]# cd wvp-GB28181-pro/ [root@centos wvp-GB28181-pro]# mvn package -Dmaven.repo.local=/tmp/maven-repo \ > -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ > -Doverride.mirrors='<mirrors><mirror><id>central</id><url>https://repo.maven.apache.org/maven2</url><mirrorOf>central</mirrorOf></mirror></mirrors>' [INFO] Scanning for projects... Downloading from nexus-aliyun: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-starter-parent/2.7.18/spring-boot-starter-parent-2.7.18.pom Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.7.18/spring-boot-starter-parent-2.7.18.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [WARNING] 'dependencies.dependency.systemPath' for com.kingbase:kingbase8:jar should not point at files within the project directory, ${basedir}/libs/jdbc-aarch/kingbase8-8.6.0.jar will be unresolvable by dependent projects @ line 173, column 16 [WARNING] 'dependencies.dependency.systemPath' for com.kingbase:kingbase8:jar should not point at files within the project directory, ${basedir}/libs/jdbc-x86/kingbase8-8.6.0.jar will be unresolvable by dependent projects @ line 180, column 16 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.kingbase:kingbase8:jar -> duplicate declaration of version 8.6.0 @ line 175, column 15 [FATAL] Non-resolvable parent POM for com.genersoft:wvp-pro:2.7.4: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.7.18 from/to nexus-aliyun (https://maven.aliyun.com/repository/public): transfer failed for https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-starter-parent/2.7.18/spring-boot-starter-parent-2.7.18.pom and 'parent.relativePath' points at wrong local POM @ line 6, column 13 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.genersoft:wvp-pro:2.7.4 (/root/wvp-GB28181-pro/pom.xml) has 1 error [ERROR] Non-resolvable parent POM for com.genersoft:wvp-pro:2.7.4: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.7.18 from/to nexus-aliyun (https://maven.aliyun.com/repository/public): transfer failed for https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-starter-parent/2.7.18/spring-boot-starter-parent-2.7.18.pom and 'parent.relativePath' points at wrong local POM @ line 6, column 13: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException [root@centos wvp-GB28181-pro]#
07-03
[root@yfw ~]# cd /opt/openfire [root@yfw openfire]# cd ~ [root@yfw ~]# mkdir -p openfire-plugins/restapi-plugin/src/main/{java,resources} [root@yfw ~]# cd openfire-plugins/restapi-plugin [root@yfw restapi-plugin]# cat > pom.xml << 'EOF' > <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > > <groupId>com.example.openfire.plugins</groupId> > <artifactId>restapi-plugin</artifactId> > <version>1.0.0-SNAPSHOT</version> > <packaging>jar</packaging> > > <name>REST API Plugin</name> > <description>A simple Openfire plugin with REST support</description> > > <properties> > <maven.compiler.source>11</maven.compiler.source> > <maven.compiler.target>11</maven.compiler.target> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > </properties> > > <dependencies> > <!-- 核心依赖:Openfire 的 xmppserver --> > <dependency> > <groupId>org.igniterealtime.openfire</groupId> > <artifactId>xmppserver</artifactId> > <version>4.9.2</version> > <scope>provided</scope> > </dependency> > </dependencies> > > <build> > <finalName>restapi-plugin-assembly</finalName> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>3.11.0</version> > <configuration> > <source>11</source> > <target>11</target> > </configuration> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <version>3.3.0</version> > <configuration> > <archive> > <manifestEntries> > <Openfire-Plugin>true</Openfire-Plugin> > </manifestEntries> > </archive> > </configuration> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-assembly-plugin</artifactId> > <version>3.6.0</version> > <executions> > <execution> > <phase>package</phase> > <goals> > <goal>single</goal> > </goals> > </execution> > </executions> > <configuration> > <descriptorRefs> > <descriptorRef>jar-with-dependencies</descriptorRef> > </descriptorRefs> > <archive> > <manifestEntries> > <Openfire-Plugin>true</Openfire-Plugin> > </manifestEntries> > </archive> > <appendAssemblyId>false</appendAssemblyId> > </configuration> > </plugin> > </plugins> > </build> > </project> > EOF [root@yfw restapi-plugin]# cat > src/main/resources/plugin.xml << 'EOF' > <?xml version="1.0" encoding="UTF-8"?> > <plugin> > <className>com.example.restapi.RestApiPlugin</className> > <name>REST API Plugin</name> > <description>Provides REST APIs for external integration.</description> > <author>Your Name</author> > <version>1.0.0</version> > <date>2025-10-03</date> > <minServerVersion>4.9.2</minServerVersion> > </plugin> > EOF [root@yfw restapi-plugin]# mkdir -p src/main/java/com/example/restapi [root@yfw restapi-plugin]# cat > src/main/java/com/example/restapi/RestApiPlugin.java << 'EOF' > package com.example.restapi; > > import org.jivesoftware.openfire.plugin.Plugin; > import org.jivesoftware.openfire.plugin.PluginManager; > import java.io.File; > > public class RestApiPlugin implements Plugin { > @Override > public void initializePlugin(PluginManager manager, File pluginDirectory) { > System.out.println("✅ REST API Plugin 已成功加载!"); > } > > @Override > public void destroyPlugin() { > System.out.println("🛑 REST API Plugin 已卸载。"); > } > } > EOF [root@yfw restapi-plugin]# mvn install:install-file \ > -Dfile=/opt/openfire/lib/xmppserver-4.9.2.jar \ > -DgroupId=org.igniterealtime.openfire \ > -DartifactId=xmppserver \ > -Dversion=4.9.2 \ > -Dpackaging=jar \ > -DgeneratePom=true [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/3.3.0/maven-jar-plugin-3.3.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/3.3.0/maven-jar-plugin-3.3.0.pom (6.8 kB at 5.6 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/37/maven-plugins-37.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/37/maven-plugins-37.pom (9.9 kB at 19 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/3.3.0/maven-jar-plugin-3.3.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/3.3.0/maven-jar-plugin-3.3.0.jar (27 kB at 54 kB/s) [INFO] [INFO] ------------< com.example.openfire.plugins:restapi-plugin >------------- [INFO] Building REST API Plugin 1.0.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ restapi-plugin --- [INFO] Installing /opt/openfire/lib/xmppserver-4.9.2.jar to /root/.m2/repository/org/igniterealtime/openfire/xmppserver/4.9.2/xmppserver-4.9.2.jar [INFO] Installing /tmp/mvninstall14026972927602741505.pom to /root/.m2/repository/org/igniterealtime/openfire/xmppserver/4.9.2/xmppserver-4.9.2.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.782 s [INFO] Finished at: 2025-10-03T01:59:45+08:00 [INFO] ------------------------------------------------------------------------ [root@yfw restapi-plugin]# mvn clean package [INFO] Scanning for projects... [INFO] [INFO] ------------< com.example.openfire.plugins:restapi-plugin >------------- [INFO] Building REST API Plugin 1.0.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ restapi-plugin --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ restapi-plugin --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ restapi-plugin --- Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.pom (5.8 kB at 4.7 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/34/maven-shared-components-34.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/34/maven-shared-components-34.pom (5.1 kB at 11 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.6/commons-io-2.6.pom Downloaded from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.6/commons-io-2.6.pom (14 kB at 31 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-java/1.1.2/plexus-java-1.1.2.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-java/1.1.2/plexus-java-1.1.2.pom (5.0 kB at 9.9 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-languages/1.1.2/plexus-languages-1.1.2.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-languages/1.1.2/plexus-languages-1.1.2.pom (4.1 kB at 8.3 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.4/asm-9.4.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.4/asm-9.4.pom (2.4 kB at 5.4 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/thoughtworks/qdox/qdox/2.0.3/qdox-2.0.3.pom Downloaded from central: https://repo.maven.apache.org/maven2/com/thoughtworks/qdox/qdox/2.0.3/qdox-2.0.3.pom (17 kB at 38 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.13.0/plexus-compiler-api-2.13.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.13.0/plexus-compiler-api-2.13.0.pom (1.1 kB at 2.3 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler/2.13.0/plexus-compiler-2.13.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler/2.13.0/plexus-compiler-2.13.0.pom (8.4 kB at 17 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/10.0/plexus-components-10.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/10.0/plexus-components-10.0.pom (2.7 kB at 5.3 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.5.0/plexus-utils-3.5.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.5.0/plexus-utils-3.5.0.pom (8.0 kB at 18 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.13.0/plexus-compiler-manager-2.13.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.13.0/plexus-compiler-manager-2.13.0.pom (1.1 kB at 2.3 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-component-annotations/2.1.1/plexus-component-annotations-2.1.1.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-component-annotations/2.1.1/plexus-component-annotations-2.1.1.pom (770 B at 1.6 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-containers/2.1.1/plexus-containers-2.1.1.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-containers/2.1.1/plexus-containers-2.1.1.pom (6.0 kB at 13 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/6.5/plexus-6.5.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/6.5/plexus-6.5.pom (26 kB at 56 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.13.0/plexus-compiler-javac-2.13.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.13.0/plexus-compiler-javac-2.13.0.pom (1.2 kB at 2.8 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compilers/2.13.0/plexus-compilers-2.13.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compilers/2.13.0/plexus-compilers-2.13.0.pom (1.3 kB at 2.7 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.jar Downloading from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.6/commons-io-2.6.jar Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-java/1.1.2/plexus-java-1.1.2.jar Downloading from central: https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.4/asm-9.4.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.jar (153 kB at 228 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/com/thoughtworks/qdox/qdox/2.0.3/qdox-2.0.3.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar (4.2 kB at 4.6 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.13.0/plexus-compiler-api-2.13.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-java/1.1.2/plexus-java-1.1.2.jar (55 kB at 49 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.5.0/plexus-utils-3.5.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.4/asm-9.4.jar (122 kB at 91 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.13.0/plexus-compiler-manager-2.13.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.6/commons-io-2.6.jar (215 kB at 154 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.13.0/plexus-compiler-javac-2.13.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/com/thoughtworks/qdox/qdox/2.0.3/qdox-2.0.3.jar (334 kB at 239 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.13.0/plexus-compiler-api-2.13.0.jar (27 kB at 19 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.13.0/plexus-compiler-manager-2.13.0.jar (4.7 kB at 2.5 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.13.0/plexus-compiler-javac-2.13.0.jar (23 kB at 12 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.5.0/plexus-utils-3.5.0.jar (267 kB at 133 kB/s) [INFO] Changes detected - recompiling the module! :source [INFO] Compiling 1 source file with javac [debug target 11] to target/classes [INFO] ------------------------------------------------------------- [WARNING] COMPILATION WARNING : [INFO] ------------------------------------------------------------- [WARNING] system modules path not set in conjunction with -source 11 [INFO] 1 warning [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[3,40] package org.jivesoftware.openfire.plugin does not exist [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[4,40] package org.jivesoftware.openfire.plugin does not exist [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[7,39] cannot find symbol symbol: class Plugin [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[9,34] cannot find symbol symbol: class PluginManager location: class com.example.restapi.RestApiPlugin [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[8,5] method does not override or implement a method from a supertype [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[13,5] method does not override or implement a method from a supertype [INFO] 6 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.408 s [INFO] Finished at: 2025-10-03T02:00:44+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project restapi-plugin: Compilation failure: Compilation failure: [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[3,40] package org.jivesoftware.openfire.plugin does not exist [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[4,40] package org.jivesoftware.openfire.plugin does not exist [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[7,39] cannot find symbol [ERROR] symbol: class Plugin [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[9,34] cannot find symbol [ERROR] symbol: class PluginManager [ERROR] location: class com.example.restapi.RestApiPlugin [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[8,5] method does not override or implement a method from a supertype [ERROR] /root/openfire-plugins/restapi-plugin/src/main/java/com/example/restapi/RestApiPlugin.java:[13,5] method does not override or implement a method from a supertype [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [root@yfw restapi-plugin]#
10-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值