Java 运行Maven-exec-Maven-plugin时,可以选择包含具有所提供范围的依赖项,如Intellij
我想使用exec maven插件运行一个主类,该插件带有Intellij Idea提供的选项“include dependencies with'“scope”。当我使用execmaven插件运行代码时,我收到了大量的classNotFoundException和NoClassDefFoundError。 我能够使用选项“include dependencies with'provided'scope”成功运行主类 如果不使用IDE,如何从Maven或以编程方式运行主类Java 运行Maven-exec-Maven-plugin时,可以选择包含具有所提供范围的依赖项,如Intellij,java,maven,intellij-idea,maven-plugin,exec-maven-plugin,Java,Maven,Intellij Idea,Maven Plugin,Exec Maven Plugin,我想使用exec maven插件运行一个主类,该插件带有Intellij Idea提供的选项“include dependencies with'“scope”。当我使用execmaven插件运行代码时,我收到了大量的classNotFoundException和NoClassDefFoundError。 我能够使用选项“include dependencies with'provided'scope”成功运行主类 如果不使用IDE,如何从Maven或以编程方式运行主类 <profiles
<profiles>
<profile>
<id>documentation-generator</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<includePluginDependencies>true</includePluginDependencies>
<mainClass>XXXXXXXXXXXXXXXXXX</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
文档生成器
org.codehaus.mojo
execmaven插件
1.6.0
安装
JAVA
真的
XXXXXXXXXXXXXXXX
能否添加pom中与依赖项相关的部分?为什么要包含提供的依赖项,提供意味着它将在运行时提供。如果你想包含那些依赖项,就把它改为compile。在插件中添加compile是一个相关的问题