1:把前端vue打包成jar的时候需要用到exec-maven-plugin-1.5.0.jar 这个依赖
2:mvn clean package -Dmaven.test.skip=true 进行编译报错如下图
3:解决方案:更改从私服上下载的exec-maven-plugin-1.5.0对应的pom。更改后就能编译成功了,目前不知道什么原因。
修改前:
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
</project>
修改后:
```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>
<parent>
<groupId>org.codehaus.mojo</groupId>
<artifactId>mojo-parent</artifactId>
<version>38</version>
</parent>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<packaging>maven-plugin</packaging>
<name>Exec Maven Plugin</name>
<description>A plugin to allow execution of system and Java programs</description>
<url>http://www.mojohaus.org/exec-maven-plugin</url>
<inceptionYear>2005</inceptionYear>
<prerequisites>
<maven>${mavenVersion}</maven>
</prerequisites>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/mojohaus/exec-maven-plugin/issues/</url>
</issueManagement>
<ciManagement>
<system>Travis-CI</system>
<url>https://travis-ci.org/mojohaus/exec-maven-plugin</url>
</ciManagement>
<developers>
<developer>
<id>jerome</id>
<name>Jerome Lacoste</name>
<email>jerome@coffeebreaks.org</email>
<organization>CoffeeBreaks</organization>
<organizationUrl>http://www.coffeebreaks.org</organizationUrl>
<roles>
<role>Java Developer</role>
</roles>
<timezone>+1</timezone>
</developer>
<developer>
<id>kaare</id>
<name>Kaare Nilsen</name>
<email>kaare.nilsen@gmail.com</email>
<organization>Objectware</organization>
<organizationUrl>http://www.objectware.no</organizationUrl>
<roles>
<role>Java Developer</role>
</roles>
<timezone>+1</timezone>
</developer>
<developer>
<id>rfscholte</id>
<name>Robert Scholte</name>
<email>rfscholte@codehaus.org</email>
<timezone>Europe/Amsterdam</timezone>
</developer>
<developer>
<id>khmarbaise</id>
<name>Karl Heinz Marbaise</name>
<email>khmarbaise@apache.org</email>
<timezone>Europe/Berlin</timezone>
</developer>
</developers>
<contributors>
<contributor>
<name>David Smiley</name>
<email>protected</email>
<roles>
<role>Patch Contributor</role>
</roles>
</contributor>
<contributor>
<name>Milos Kleint</name>
<email>protected</email>
<roles>
<role>Patch Contributor</role>
</roles>
</contributor>
<contributor>
<name>Markus KARG</name>
<email>markus@headcrashing.eu</email>
<organization>Head Crashing Informatics</organization>
<organizationUrl>http://www.headcrashing.eu</organizationUrl>
<roles>
<role>Patch Contributor</role>
</roles>
<timezone>Europe/Berlin</timezone>
</contributor>
</contributors>
<licenses>
<license>
<name>Apache License 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/mojohaus/exec-maven-plugin.git</connection>
<developerConnection>scm:git:ssh://git@github.com/mojohaus/exec-maven-plugin.git</developerConnection>
<url>https://github.com/mojohaus/exec-maven-plugin</url>
<tag>exec-maven-plugin-1.5.0</tag>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-toolchain</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.20</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-annotations</artifactId>
<version>1.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
<version>1.21</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<mavenVersion>2.2.1</mavenVersion>
<mojo.java.target>1.5</mojo.java.target>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- Temporary solution to get a release out using gpg version 1 -->
<useAgent>false</useAgent>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java15</artifactId>
<version>1.0</version>
</signature>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>generate-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<goalPrefix>exec</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>run-its</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>1.8.4</version>
</dependency>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-1.8</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<configuration>
<debug>false</debug>
<verbose>true</verbose>
<stacktrace>true</stacktrace>
<defaultScriptExtension>.groovy</defaultScriptExtension>
</configuration>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<addTestClassPath>true</addTestClassPath>
<debug>true</debug>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<projectsDirectory>src/it</projectsDirectory>
<showVersion>true</showVersion>
<setupIncludes>
<setupInclude>setup/pom.xml</setupInclude>
</setupIncludes>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<preBuildHookScript>setup</preBuildHookScript>
<postBuildHookScript>verify</postBuildHookScript>
<settingsFile>src/it/settings.xml</settingsFile>
<!--
! Currently working with more than one thread does not work,
! cause it is not guaranteed that the setup-config
! project is build at first.
! see also https://issues.apache.org/jira/browse/MINVOKER-147
-->
<parallelThreads>1</parallelThreads>
</configuration>
<executions>
<execution>
<id>pre-integration-tests</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<extraArtifacts>
<extraArtifact>org.apache.maven.plugins:maven-compiler-plugin:3.1:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-install-plugin:2.4:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-clean-plugin:2.5:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-surefire-plugin:2.16:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-assembly-plugin:2.4:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-jar-plugin:2.4:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-war-plugin:2.3:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-resources-plugin:2.6:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-site-plugin:3.3:maven-plugin</extraArtifact>
<extraArtifact>org.apache.maven.plugins:maven-site-plugin:2.0.1:maven-plugin</extraArtifact>
<extraArtifact>commons-io:commons-io:1.1:jar</extraArtifact>
<extraArtifact>commons-logging:commons-logging:1.0.4:jar</extraArtifact>
<extraArtifact>org.codehaus.plexus:plexus-utils:1.1:jar</extraArtifact>
</extraArtifacts>
</configuration>
</execution>
<execution>
<id>integration-tests</id>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>