Running resource filters when using jetty:run

前端 未结 3 782
盖世英雄少女心
盖世英雄少女心 2021-02-08 20:15

I\'m using resource filtering on jsps, based on profiles. I\'m also developing locally using mvn jetty:run, but the filtering phase does not run.

How can I

3条回答
  •  梦毁少年i
    2021-02-08 20:43

    The filtered files usually end up in the build target-directory. If you run 'mvn jetty:run' it uses per default your unfiltered src/main/webapp directory. All you got to do is to add the build-target as additional resource directory. Done so, jetty will create an overlay and will also use the filtered files.

                    
                        org.mortbay.jetty
                        maven-jetty-plugin
                        6.1.26
                        
                            
                                /${project.build.finalName}
                                
                                    src/main/webapp,${project.build.directory}/${project.build.finalName}
                                
                            
                            2
                        
                    
    

提交回复
热议问题