Eclipse 命令行构建
我使用下面的 bash 脚本从命令行构建 Eclipse 工作区。我还没有弄清楚如何在工作区中构建特定项目...我该怎么做?
#!/bin/sh
echo Eclipse path: ${ECLIPSE}
echo Eclipse workspace path: ${ECLIPSE_WORKSPACE}
stdout=$("${ECLIPSE}/eclipsec" -nosplash -application org.eclipse.jdt.apt.core.aptBuild -data "${ECLIPSE_WORKSPACE}" 2>/dev/null)
echo ${stdout}
if [[ ${stdout} == *error* ]]
then
exit 1
fi
exit 0
I use the below bash script for building an Eclipse workspace from command line. I haven't figured out how to build a specific project within the workspace though...how would I do that?
#!/bin/sh
echo Eclipse path: ${ECLIPSE}
echo Eclipse workspace path: ${ECLIPSE_WORKSPACE}
stdout=$("${ECLIPSE}/eclipsec" -nosplash -application org.eclipse.jdt.apt.core.aptBuild -data "${ECLIPSE_WORKSPACE}" 2>/dev/null)
echo ${stdout}
if [[ ${stdout} == *error* ]]
then
exit 1
fi
exit 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自从你问这个问题以来已经很长时间了,但我在 StackOverflow 的“未回答”部分看到了它。
我看到您在 Linux 中制作了一个 Bash 脚本,以下是我有一天在配置 eclipse.ini 时发现的方法:
在运行 Eclipse 时,打开终端并运行:
<前><代码>ps aux | grep 日食
这将为您提供如下输出:
这是确切的过程及其参数。您可以通过将其复制并粘贴到终端中并自行运行来测试它。额外的参数存储在 eclipse.ini 中。
有关为脚本配置 eclipse.ini 的更多信息,您可以查看以下内容:
Eclipse 的最佳 JVM 设置是什么?
It's been a long time since you have asked this question but I saw it in the "unanswered" section of StackOverflow.
I see your making a Bash script in Linux and here is how I figured this out one day while configuring my eclipse.ini:
While running Eclipse, open a Terminal and run:
This will give you an output such as:
That is the exact process and its arguments. You can test this by copying and pasting it in the Terminal and running it yourself. The extra arguments are stored in the eclipse.ini.
For more information on configuring the eclipse.ini for your script you can check out the following:
What are the best JVM settings for Eclipse?