pom的用法

	<properties>
		<!-- Test -->
		<junit.contrib.version>1.16.1</junit.contrib.version>
	</properties>

使用

		<dependency>
			<groupId>com.github.stefanbirkner</groupId>
			<artifactId>system-rules</artifactId>
			<version>${junit.contrib.version}</version>
			<scope>test</scope>
		</dependency>
可以使用${標籤名}來使用在<properties>標籤裏所定義的<標籤>值</標籤>

有什麼用呢,可以作爲全局變量來用,改變該全局變量的值,所有引用該全局變量的值也隨着改變,方便維護

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章