Maven - Generate Jar and War

后端 未结 8 2070
轻奢々
轻奢々 2020-12-29 04:24

I have a CXF WS project that I would use it in another project, I would consume this WS in a Web Project but I don\'t know how to generate Jar file.

Please have you

8条回答
  •  长发绾君心
    2020-12-29 05:02

    Considering your maven project packaging to war

    
    
        4.0.0
    
        com.sample
        sample
        1.0-SNAPSHOT
        war
    

    add the following executions to maven-install-plugin

        
            org.apache.maven.plugins
            maven-install-plugin
            2.5.2
            
                
                    package
                    
                        jar
                        ${project.build.directory}\${artifactId}-${version}.jar
                    
                    
                        install-file
                    
                
            
        
    

提交回复
热议问题