如何在创建eclipse插件项目时以编程方式创建具有pom文件的maven项目

时间:2014-07-01 05:49:41

标签: java xml eclipse maven eclipse-plugin

我正在创建一个eclipse插件,它将创建一个maven java项目。 我已经包含了maven性质,因为我希望它是pom.xml的maven项目。

IProjectDescription description = project.getDescription();
        description.setNatureIds(new String[] {
                     "org.eclipse.jem.workbench.JavaEMFNature",
                     "org.eclipse.wst.common.modulecore.ModuleCoreNature",
                     "org.eclipse.jdt.core.javanature",
                     "org.eclipse.m2e.core.maven2Nature",
                     "org.eclipse.wst.common.project.facet.core.nature"});

        project.setDescription(description, monitor);

但它没有创建任何pom文件而是我在日志中看到以下行:

16:50:00.271 [Worker-2] DEBUG o.e.m.c.i.builder.MavenBuilder - Building project AA
16:50:00.271 [Worker-2] DEBUG o.e.m.c.i.p.r.ProjectRegistryManager - Refreshing: [L/AA/pom.xml]
16:50:00.286 [Worker-2] DEBUG o.e.m.c.i.p.r.ProjectRegistryManager - Refreshed: [L/AA/pom.xml]
16:50:00.770 [Worker-0] DEBUG o.e.m.c.i.p.r.ProjectRegistryManager - Refreshing: [L/AA/pom.xml]
16:50:00.770 [Worker-0] DEBUG o.e.m.c.i.p.r.ProjectRegistryManager - Refreshed: [L/AA/pom.xml]

任何帮助?

0 个答案:

没有答案