在POM文件中定义变量


    4.0.0

    cc.lixp
    springjdbc
    0.0.1-SNAPSHOT
    jar

    springjdbc
    http://maven.apache.org

    
        UTF-8
        1.8
        4.2.4.RELEASE
    

    
        
            junit
            junit
            4.11
            test
        
        
            org.springframework
            spring-context
            ${springframework.version}
        
        
            org.springframework
            spring-jdbc
            ${springframework.version}
        
        
            org.springframework
            spring-test
            ${springframework.version}
        
        
            commons-dbcp
            commons-dbcp
            1.4
        
        
            mysql
            mysql-connector-java
            5.1.38
        
    

    
        
            
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    3.1
                    
                        ${jdk.version}
                        ${jdk.version}
                        UTF-8
                    
                
            
        
    

    在 节点中定义变量,在其他节点中可引用该变量。

    如在依赖配置时引用变量,达到统一版本号的目的。


转载于:https://my.oschina.net/u/2313484/blog/601283

你可能感兴趣的:(在POM文件中定义变量)