Producing executable jar in NetBeans

前端 未结 17 1544
感动是毒
感动是毒 2020-11-30 08:55

I\'m using NetBeans 6.5 and for some reason it won\'t produce executable jar \"out of the box\".

I set my project to be the main project, defined main class in the p

17条回答
  •  难免孤独
    2020-11-30 09:40

    If you are using the maven assembly plugin and want to build an executable jar with dependencies, you need to add this portion to the configuration of the maven-assembly-plugin section in your pom.xml:

    
      maven-assembly-plugin
      
        
        
          
            your.app.SampleClass
          
        
      
    
    

    Source: Maven Assembly Plugin Usage

提交回复
热议问题