Maven Error: Could not find or load main class

后端 未结 12 1573
忘了有多久
忘了有多久 2020-12-05 07:09

I\'m using a Java Maven program and I don\'t know what to enter as the . I\'ve tried all kinds of things based off of numerous stackoverflow q

12条回答
  •  温柔的废话
    2020-12-05 07:24

    Please follow the below snippet.. it works..

    
        4.0.0
        com.xyz
        test
        jar
        0.0.1-SNAPSHOT
        TestProject
        Sample Project
        
            
        
        
            
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    3.8.1
                    
                        1.8
                        1.8
                    
                
                
                
                    org.apache.maven.plugins
                    maven-assembly-plugin
                    3.1.1
                    
                        
                            
                                com.xyz.ABC.
                            
                        
                        
                            jar-with-dependencies
                        
                    
                    
                        
                            make-assembly
                            package
                            
                                single
                            
                        
                    
                
            
        
    
    

    Please note, you have to provide the full classified class name (class name including package name without .java or .class) of main class inside tag.

提交回复
热议问题