Is it best to Mavenize your project jar files or put them in WEB-INF/lib?

后端 未结 3 1432
南旧
南旧 2021-01-25 14:26

I\'ve been doing this for all of the jar files that my Spring MVC project needs:

call mvn install:install-file -DgroupId=vegetables -DartifactId=potatoes -Dversi         


        
3条回答
  •  耶瑟儿~
    2021-01-25 15:27

    I've been doing the same that you do with the command line, but by configuring maven-install-plugin in my POM (please read the note at the end):

         
                org.apache.maven.plugins
                maven-install-plugin
                
                    
                        install-vegetables
                        initialize
                        
                            install-file
                        
                        
                            ${project.basedir}/lib/vegetables-1.0.jar
                            vegetables
                            potatoes
                            1.0
                            jar
                        
                    
                    
                        install-minerals
                        initialize
                        
                            install-file
                        
                        
                            ${project.basedir}/lib/minerals-1.0.jar
                            minerals
                            rocks
                            1.0
                            jar
                        
                    
                
            
    

    It is much less efficient, because files get installed over and over, but it is much less annoying than making it manually. Anyway, I think you should give it a try.

提交回复
热议问题