How to get revision number from subversion using maven?

前端 未结 4 1322
一生所求
一生所求 2020-12-28 13:10

I\'d like to put revision number on main page of webapp, how can i do that using maven?

P.S. Its two part question, how to get revision number and how to write it in

4条回答
  •  猫巷女王i
    2020-12-28 13:39

    Provided you have the svn command line application, you can use the following code - we use it in our projects (slightly altered)

    
      
        
          maven-antrun-plugin
          
            
              generate-resources
              
                run
              
              
                
                  
                  
                    
                  
                
              
            
          
        
        
          maven-war-plugin
          
            
              
                ${project.build.directory}/generated-web-resources/svn
              
            
            **/_svn/**
          
        
      
    
    

提交回复
热议问题