我正在做一个端到端的项目,包括后端和前端。前端工作正常(angular2框架、“npm启动”和“ng构建”工作正常)。但是,当我从project home文件夹运行“mvn clean install”时,它会给我一个错误,我对此一无所知:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar (default-jar) on project frontend: Error assembling JAR: Failed to determine inclusion status for: .\frontend\pom.xml: The request is not supported. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: ...
在project home文件夹下,我可以成功运行“mvn compile”,但不能运行“mvn clean install”。它显示前端故障,并显示上面的错误消息“后端跳过”。
maven设置。xml是最原始的。我有正确的Java Home设置。
你能帮助我吗?
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>com.xlinq.gtool</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>parent</name>
<description>Demo project for X-LinQ Graphical Tool</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<modules>
<module>frontend</module>
<module>backend</module>
</modules>
</project>
正面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>
<artifactId>frontend</artifactId>
<name>frontend</name>
<description>The X-LinQ frontend project</description>
<parent>
<groupId>com.xlinq.gtool</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<nodeVersion>v6.10.3</nodeVersion>
<npmVersion>3.10.10</npmVersion>
<workingDirectory>src/main/frontend</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>target/frontend</directory>
<targetPath>static</targetPath>
</resource>
</resources>
</build>
</project>
答复:
> mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent
[INFO] frontend
[INFO] backend
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ parent ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ parent ---
[INFO] Installing H:\project\pom.xml to C:\Users\x\.m2\repository\com\xlinq\gtool\parent\0.0.1-SNAPSHOT\parent-0.0.1-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building frontend 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ frontend ---
[INFO] Deleting H:\project\frontend\target
[INFO]
[INFO] --- frontend-maven-plugin:1.3:install-node-and-npm (install node and npm) @ frontend ---
[INFO] Node v6.10.3 is already installed.
[INFO] NPM 3.10.10 is already installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.3:npm (npm install) @ frontend ---
[INFO] Running 'npm install' in H:\project\frontend\src\main\frontend
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
[INFO]
[INFO] --- frontend-maven-plugin:1.3:npm (npm run build) @ frontend ---
[INFO] Running 'npm run build' in H:\project\frontend\src\main\frontend
[INFO]
[INFO] > gtool@0.0.0 build H:\project\frontend\src\main\frontend
[INFO] > ng build
[INFO]
[INFO] Hash: 46436a79c4d4bc172d29
[INFO] Time: 52660ms
[INFO] chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 177 kB {5} [initial] [rendered]
[INFO] chunk {1} main.bundle.js, main.bundle.js.map (main) 104 kB {4} [initial] [rendered]
[INFO] chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 270 kB {5} [initial] [rendered]
[INFO] chunk {3} scripts.bundle.js, scripts.bundle.js.map (scripts) 733 kB {5} [initial] [rendered]
[INFO] chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 6.01 MB [initial] [rendered]
[INFO] chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
[ERROR]
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ frontend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 36 resources to static
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ frontend ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ frontend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory H:\project\frontend\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ frontend ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ frontend ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ frontend ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent ............................................. SUCCESS [ 0.350 s]
[INFO] frontend ........................................... FAILURE [03:06 min]
[INFO] backend ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:07 min
[INFO] Finished at: 2017-08-16T15:27:21+02:00
[INFO] Final Memory: 21M/357M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar (default-jar) on project frontend: Error assembling JAR: Failed to determine inclusion status for: H:\project\frontend\pom.xml: H:\project\frontend\pom.xml: The request is not supported. -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :frontend
可悲的是,安装的WSL驱动器被认为是网络安装,这也是我所看到的。
Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar
和
Error assembling JAR: Failed to determine inclusion status for
是我看到的信息。以前版本的maven jar插件(2.5)没有问题
我解决了这个问题。POM和Maven设置没有问题。xml。问题是,该项目安装在网络位置。在将其移动到本地硬盘驱动器后,mvn clean install可以正常工作。
来自Eclipse火星版,pom。xml-Run-As-maven-clean,我得到了以下关于构建失败的错误消息 [ERROR]无法执行目标组织。阿帕奇。专家插件:maven clean插件:2.5:项目测试框架上的clean(默认清洁):目标组织的执行默认清洁。阿帕奇。专家插件:maven clean插件:2.5:clean失败:插件组织。阿帕奇。专家plugins:maven clean p
运行Maven测试时出现此错误 执行目标组织失败。阿帕奇。专家插件:maven插件插件:3.2:项目amsframeworok上的描述符(默认描述符):提取插件描述符时出错:“未找到插件:ams5的mojo定义。0:amsframeworok。'- 下面是我的pom。xml
我已经创建了一个maven项目。构建是成功的。但是我在尝试在我的maven项目中做标记准备(“mvn发布:准备”)时出现了以下错误。我在pom中添加了新的依赖项后收到了这个错误,如下所示。 请找出下面的错误。 [错误]无法执行目标组织。阿帕奇。专家插件:maven release插件:2.5.3:project print services上的prepare(默认cli):reactor proj
当我运行intellij idea maven安装时,它遇到了如下问题 无法执行目标组织。阿帕奇。专家插件:maven编译器插件:3.8.1:testCompile 如何解决?
maven jar插件失败,错误如下: 无法执行目标组织。阿帕奇。专家plugins:maven-jar plugin:3.1.2:jar(默认jar)on project myProject:您必须使用分类器将补充工件附加到项目中,而不是替换它们。 我正在使用Java11。我将maven jar插件从2.4升级到了3.1.0。 它只在mvn清洁安装部署时失败。(没有部署,它正在正确运行)。 有什
我在maven surefire插件3.0.0-M4和maven版本3.6.3、3.6.0和3.3.9以及jdk1中遇到了这个问题。8.0_222(Ubuntu 18.0.4)。我的pom。xml如下所示: 詹金斯的产出如下: