Maven - Reading a property from an external properties file

前端 未结 2 1635
逝去的感伤
逝去的感伤 2020-12-06 04:39

I have a property file with the following

junit.version=3.8.1
dbcp.version=5.5.27
oracle.jdbc.version=10.2.0.2.0

I try to read those proper

2条回答
  •  死守一世寂寞
    2020-12-06 05:26

    u can define like this:

    
                org.codehaus.mojo
                properties-maven-plugin
                1.0-alpha-2
                
                    
                    pre-clean-config
                        pre-clean
                        
                            read-project-properties
                        
                        
                            
                                config.properties
                            
                        
                    
                    
                    initialize-config
                        initialize
                        
                            read-project-properties
                        
                        
                            
                                config.properties
                            
                        
                    
                
            
    

提交回复
热议问题