如何解决POM中Maven的问题不要复制文件
我在 Maven 中的耳朵有问题,我发现了这个错误,但我没有找到答案,请帮忙
Error to compile in Maven Goals Clean Install
Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.7:ear (default-ear) on project DashboardOSM-ear: Cannot copy a directory: C:\Users\Coneja\Desktop\OSM_DashboardBackend\OSM_DashboardBackend\commonModule\target\classes; Did you package/install DashboardOSMEar:commonModule:jar:1.0-SNAPSHOT:compile? -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.7:ear (default-ear) on project DashboardOSM-ear: Cannot copy a directory: C:\Users\Coneja\Desktop\OSM_DashboardBackend\OSM_DashboardBackend\commonModule\target\classes; Did you package/install DashboardOSMEar:commonModule:jar:1.0-SNAPSHOT:compile?
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>
<parent>
<groupId>DashboardOSMEar</groupId>
<artifactId>DashboardOSM</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>DashboardOSMEar</groupId>
<artifactId>DashboardOSM-ear</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>ear</packaging>
<name>DashboardOSMEar</name>
<url>http://maven.apache.org</url>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.7</version>
<configuration>
<version>5</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>DashboardOSMWar</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>commonModule</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>configurationModule</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>queryModule</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。