How to Configure pom.xml to run 2 java mains in 1 Maven project

后端 未结 1 623
日久生厌
日久生厌 2021-01-14 14:15

I have a Maven project and it has 2 mains (MyTestApp_A, and MyTestApp_B) inside one of the packages from the src folder.

I can run these \"main\" classes in Eclipse

1条回答
  •  我在风中等你
    2021-01-14 14:27

    Try using executions for each main class you want to execute:

    
        
            org.codehaus.mojo
            exec-maven-plugin
            1.2.1
            
                
                    MyTestApp_A
                    
                        java
                    
                    
                        servers.MyTestApp_A
                        false
                    
                
                
                    MyTestApp_B
                    
                        java
                    
                    
                        servers.MyTestApp_B
                        false
                    
                
            
        
    
    

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