mvn exec:exec和mvn exec:java的区别 [英] mvn exec:exec and mvn exec:java difference

查看:273
本文介绍了mvn exec:exec和mvn exec:java的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经浏览了@ codehaus exec-maven-plugin usage 。据我所知,exec:java允许用户在他们声明的同一个VM中执行java程序。我是maven的新手,我的目的是了解 mvn exec:exec mvn exec:java 之间的区别这样我就可以更好地应用它们。

I have gone through the documentation at @ codehaus exec-maven-plugin usage. I understand that the exec:java allows the user to execute the java program, in the same VM as they state. I am a newbie in maven and my aim is to understand the difference between mvn exec:exec and mvn exec:java so that I can apply them better.

推荐答案

当您使用java类并希望在JVM中运行它们时,使用mvn exec:java(包含所有项目)依赖于classpath),而mvn exec:exec允许你运行任何可执行文件(比如shell脚本来做一些清理或windows批处理文件),而不仅仅是java文件。

You use mvn exec:java when you are working with java classes and want to run them in your JVM (with all project dependencies as classpath), whilst mvn exec:exec allows you to run any executable (like shell script to do some cleanup or windows batch file), not only the java ones.

这篇关于mvn exec:exec和mvn exec:java的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆