How can I find maven property names for libraries? -
i have these properties defined in pom.xml -
<properties> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <powermock.version>1.6.2</powermock.version> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <spring.artifact.version>4.1.7.release</spring.artifact.version> <logback.version>1.1.6</logback.version> </properties>
i trying understand these properties names defined - powermock.version, logback.version? how know version of ch.qos.logback.core library determined logback.version property? looked information quite bit , found there many known properties maven.compiler.source , maven.compiler.target nothing explains version ones.
maven properties
value placeholder, properties in ant. values accessible anywhere within pom using notation ${x}, x property.
your current usage 5th style mentioned in above link
x: set within element in pom. value of value may used ${somevar}.
its effectiveness comes act when want use same variable multiple artifacts might or might not part of same groupid.
for example -
<properties> <spring.version>3.1.2.release</spring.version> </properties>
you can further define dependency using same property -
<dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version>${spring.version}</version> <!-- version fetched properties--> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context</artifactid> <version>${spring.version}</version> <!-- version fetched properties--> </dependency>
which similar
<version>3.1.2</version>
ensuring both artifacts on same version well.
Comments
Post a Comment