如何解决无法找出 pom 文件
所以我想将 ojdbc 库和 javafx 库捆绑到一个可运行的 jar 文件中。我在设置 pom 文件时遇到问题,因为我对使用这些文件还很陌生。
<?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>org.example</groupId>
<artifactId>RPSServer</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>RPSServer</name>
<properties>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
<javafx.version>12</javafx.version>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
<!--<type>jar</type>
<classifier>jar-with-dependencies</classifier>-->
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc10</artifactId>
<version>19.10.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<!--<type>maven-plugin</type>-->
<!--<classifier>jar-with-dependencies</classifier>-->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/assembly/distribution.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我在设置它时遇到了很多困难。我得到的当前错误是 Unrecognized tag: 'descriptor' (position: START_TAG seen \r\n\t... @2:14)。如果有人能指出我将多个外部库捆绑到一个 jar 文件的方向,这样我就可以在没有任何外部依赖的情况下启动 jar,我将不胜感激。我很确定我的分发文件设置不正确 - 此处仅供参考。
enter code here<assembly>
<descriptor>src/assembly/distribution.xml</descriptor>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。