猿问

Maven编译错误:文件名,目录名或卷标签语法不正确

我正在编译我的pom.xml文件,并收到以下编译错误


Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.5.1:copy-dependencies (copy-dependencies) on project ElasticSearchUtility: Error copying artifact from C:\Users\10641516\.m2\repository\org\apache\lucene\lucene-sandbox\7.1.0\lucene-sandbox-7.1.0.jar to D:\Karthikeyan\ElasticSearch\ElasticSearch_Tesing\target\dependency-

    [ERROR] jars\lucene-sandbox-7.1.0.jar: The filename, directory name, or volume label syntax is incorrect

但是所需的.jar文件在指定路径中可用。


我已经在我的maven项目中创建了两个Java文件,一个是POJO类,另一个是Java主类文件。我想使我的项目成为可执行的jar文件,我想使用java -jar命令在外部运行。


请找到我的pom.xml文件


<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>ElasticSearchUtility</groupId>

<artifactId>ElasticSearchUtility</artifactId>

<version>1.0.0-SNAPSHOT</version>


<dependencies>

    <dependency>

        <groupId>org.elasticsearch</groupId>

        <artifactId>elasticsearch</artifactId>

        <version>6.1.2</version>

    </dependency>

    <dependency>

        <groupId>org.elasticsearch.client</groupId>

        <artifactId>elasticsearch-rest-high-level-client</artifactId>

        <version>6.1.2</version>

    </dependency>

    <dependency>

        <groupId>org.elasticsearch.client</groupId>

        <artifactId>rest</artifactId>

        <version>5.1.2</version>

    </dependency>


</dependencies>


<build>


        <plugins>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-eclipse-plugin</artifactId>

                <version>2.9</version>

                <configuration>

                    <downloadSources>true</downloadSources>

                    <downloadJavadocs>false</downloadJavadocs>

                </configuration>

            </plugin>


慕雪6442864
浏览 1371回答 1
1回答
随时随地看视频慕课网APP

相关分类

Java
我要回答