Eclipse命令行构建 [英] Eclipse command line build
问题描述
我使用以下bash脚本从命令行构建Eclipse工作区。我不知道如何在工作区内建立一个特定的项目...我该怎么做?
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
推荐答案
自从你提出这个问题已经很久了,但我在StackOverflow的未回答部分看到了。
It's been a long time since you have asked this question but I saw it in the "unanswered" section of StackOverflow.
我看到你在Linux中制作一个Bash脚本,这里是我在配置我的eclipse.ini有一天我想出了这一点:
I see your making a Bash script in Linux and here is how I figured this out one day while configuring my eclipse.ini:
-
运行Eclipse时,打开一个终端并运行:
While running Eclipse, open a Terminal and run:
ps aux | grep eclipse
这将给你一个输出:
This will give you an output such as:
/usr/bin/java -XX:MaxPermSize=256m -jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /usr/lib/eclipse/eclipse -name Eclipse --launcher.library /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist/eclipse_1407.so -startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar --launcher.overrideVmargs ... and so on
这是确切的过程及其参数。你可以通过复制和粘贴在终端并自己运行它来测试这个。额外的参数存储在eclipse.ini中。
有关为您的脚本配置eclipse.ini的更多信息,您可以查看以下内容:
这篇关于Eclipse命令行构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!