答案 0 :(得分:1)
我的解决方案原则:
.project
和.classpath
文件的模板下面仅是脚本的相关部分/结尾,其中创建了.project
文件。
注意:在我的情况下,我不需要.classpath
文件,因此仅导入项目,而不是Java项目。
# name: the local Eclipse Folder name I give as script arg
# Create Eclipse .project
projectFile="${name}/.project" ;
# below EOF's content comes from an existing real .project file
echo $( cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>${name}</name>
<comment></comment>
<projects></projects>
<buildSpec></buildSpec>
<natures></natures>
</projectDescription>
EOF
) > ${projectFile};
echo "✓ ${projectFile} created" ;
# Create Eclipse .classpath if needed (in case of Java project, not needed for default Project)
...
之后: