读书人

mvn eclipse:eclipse下令控制生成的.p

发布时间: 2012-06-30 17:20:12 作者: rapoo

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

读书人网 >Eclipse开发

热点推荐