mvn eclipse:eclipse命令控制生成的.project的内容
首先在pom.xml中配置如下:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <additionalConfig> <file> <name>.project</name> <location>project.xml</location> </file> </additionalConfig> </configuration> </plugin> </plugins> </build>
然后在pom.xml同目录下添加你想要生成的.project的文件
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>smume-android</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>com.android.ide.eclipse.adt.ApkBuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>com.android.ide.eclipse.adt.AndroidNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
很显然,我是为了生成一个支持android adt的工程文件。
更多请参考:http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html
相关推荐
xnuzfm 2020-02-12
zhangmin0 2019-12-14
heshizui 2015-03-19
lzqlawrence 2015-08-19
小易Smalle 2016-07-22
Yvonne的小 2014-06-05
wangzhe00 2014-06-27
tgxblue 2016-03-25
heshizui 2015-03-19
Christina潇潇 2015-01-27