我正在使用带有以下命令的Exec Maven插件:
mvn exec:java
我没有设法用这种执行模式设置工作目录.我想使用mainClass(在特定的包中),我希望我的执行的根文件夹在$ {basedir}之外的另一个目录中.
谢谢您的帮助.
我的pom.xml目标<workingDirectory>对我不起作用:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<workingDirectory>${project.build.directory}\classes</workingDirectory>
<mainClass>com.package.MyMainClass</mainClass>
<includeProjectDependencies>true</includeProjectDependencies>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
使用-X选项的结果
[DEBUG] Configuring mojo org.codehaus.mojo:exec-maven-plugin:1.3.2:java from plugin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:1.3.2,parent: sun.misc.Launcher$AppClassLoader@11b86e7]
[DEBUG] Configuring mojo 'org.codehaus.mojo:exec-maven-plugin:1.3.2:java' with basic configurator -->
[DEBUG] (f) arguments = []
[DEBUG] (f) classpathScope = runtime
[DEBUG] (f) cleanupDaemonThreads = true
[DEBUG] (f) daemonThreadJoinTimeout = 15000
[DEBUG] (f) includePluginDependencies = false
[DEBUG] (f) includeProjectDependencies = true
[DEBUG] (f) keepAlive = false
[DEBUG] (f) killAfter = 1 …Run Code Online (Sandbox Code Playgroud) 当我mvn clean install在Linux RHEL 6上运行我的构建时.我收到以下错误:java.lang.outOfMemoryError heap space.
我已经阅读了互联网上的所有文章.在我的机器上,我没有一个名为的文件mvn.sh,我只有一个文件mvn.bat.
我在哪里可以设置导出MAVEN_OPTS命令?