How do I import an alternative pom.xml file in m2eclipse

邮差的信 提交于 2019-12-23 12:38:22

问题


The only possible input is a directory where m2eclipse will automatically scan for pom.xml. What if you want to import an alternative file (say abc.xml)? can it be done and how?

Thank you for your time.


回答1:


No, it's not possible. m2e relies on the presence of a pom.xml. The only way to have a different behaviour in m2e is to use maven profiles. The following will be activated automatically when using m2e :

<profile>
  <id>m2e</id>
  <activation>
    <property>
      <name>m2e.version</name>
    </property>
  </activation>
 ...
</profile>

Your CLI builds will remain unaffected, unless you manually use the m2e profile.




回答2:


Maven is pretty dependent on the pom.xml keeping it's name; repos, developers and other tools expect it to be there for a maven project.




回答3:


in the eclipse navigator view, right click on your project and click new->file click advanced and check off "link to a file in the file system" and specify the path



来源:https://stackoverflow.com/questions/7640143/how-do-i-import-an-alternative-pom-xml-file-in-m2eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!