Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
实际上,我想在我的项目上运行 mvn clean install 时运行一个 java 类。我发现最好的解决方案是使用 abstractMojo 并在 execute 方法中定义处理。你能给我一个描述这种机制的简单例子吗?.. 谢谢
我终于找到了我的问题的解决方案。. 实际上我使用了另一种方法:我使用了 exec-maven-plugin 并在这个插件中定义了我的 mainClass。. 此类包含我想在运行应用程序之前执行的处理。