How can I run a Maven webapp in Eclipse when I use profiles to populate properties files at build time?

前端 未结 2 1744
北海茫月
北海茫月 2021-02-02 00:28

Here is an example profile in my POM:

    
    
        QA
        
            

        
相关标签:
2条回答
  • 2021-02-02 00:58

    You can effectively run any Maven command (including ones with profiles) through the m2eclipse plugin. Also, m2eclipse works with WTP (which I believe is where the Servers tab comes from). I'm not certain on this part, but I've used it to deploy web apps to Tomcat within Eclipse for a Maven project.

    0 讨论(0)
  • 2021-02-02 00:59

    Thanks Alex. I ended up installing Eclipse Integration for Apache Maven (Eclipse IAM), formerly Q for Eclipse

    This plugin solved two problems: populating properties files during Publish to Server events in Eclipse and populating the WEB-INF/lib folder. Before, even though I was running mvn eclipse:eclipse to satisfy my Build Path in Eclipse, it was not publishing these dependencies to the embedded servers correctly. This plugin does that. Having solved these two issues, I don't see any other barriers to developing a Maven project in Eclipse using the embedded servers.

    0 讨论(0)
提交回复
热议问题