如何查看eclipse“运行配置”使用的shell命令 [英] How to view shell commands used by eclipse "run configurations"

查看:220
本文介绍了如何查看eclipse“运行配置”使用的shell命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中给出一个运行配置,我想打印出用于运行它的关联shell命令。



例如:
现在,在Eclipse中,如果我点击播放,它将运行:


mvn assembly:directory -Dmaven.test.skip = true



我没看到那个命令,我只是知道这是IDE必须运行的,在某些时候。
但是,其他一些运行配置对于长类路径和虚拟机选项来说要复杂得多,坦白说,有时我不知道等同的shell命令是什么(特别是当涉及到Flex时)。 p>

必须有一些方法来访问与Eclipse / Flex Builder中的运行配置相关联的shell命令。这些信息必须可用,这导致我相信有人编写了一个插件来显示它。或者也许Eclipse内置了一个选项来访问它。



所以有一种方法,基本上将Eclipse运行配置转换为shell命令?



(仅供上下文使用:我正在询问,因为我正在编写一个bash脚本,自动化我在开发过程中所做的一切 - 从数据库填充到在运行Web应用程序之前打开Firefox并清除缓存,所以我从IDE运行的每个命令都需要在脚本中存在,有些是很难弄清楚的。)

解决方案

这应该适用于Java和Maven进程。您可以从流程属性获取命令行。




  • 在调试模式下运行该进程

  • 右键单击调试视图中的进程项,然后选择属性

  • 显示命令行


Given a "run configuration" in Eclipse, I want to print out the associated shell command that would be used to run it.

For example: Right now, in Eclipse, if I click "play" it will run:

mvn assembly:directory -Dmaven.test.skip=true

I don't see that command, I just know that's what the IDE must run, at some point. However, some of the other run configurations are far more complex with long classpaths and virtual machine options and, frankly, sometimes I have no idea what the equivalent shell command would be (particularly when it comes to Flex).

There must be some way to access the shell command that would be associated with a "Run Configuration" in Eclipse/Flex Builder. This information must be available, which leads me to believe someone has written a plugin to display it. Or maybe there's already an option built into Eclipse for accessing this.

So is there a way to, essentially, convert an Eclipse run configuration into a shell command?

(for context only: I'm asking because I'm writing a bash script that automates everything I do, during development--from populating the Database all the way to opening Firefox and clearing the cache before running the web app. So every command I run from the IDE needs to exist in the script. Some are tricky to figure out.)

解决方案

This should work for Java and Maven processes. You can get the command line from the Process properties.

  • run the process in debug mode
  • right click on the process item in the "Debug" view and choose "Properties"
  • the command line is displayed

这篇关于如何查看eclipse“运行配置”使用的shell命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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