问题
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