maven pom xml variables

luca.p.alexandru

When setting a dependency. Let's assume the following

<dependency>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
        <version>${plugin.testrunner.version}</version>
        <scope>test</scope>
</dependency>

Where does the

${plugin.testrunner.version}

variable get initialized? Is there a properties file or where does it gets it value?

ewanc

This should be intialised in a properties section, at the same level as your dependencies section, eg

<project>
    <properties>
        <plugin.testrunner.version>1.0</plugin.testrunner.version>
    </properties>
...
    <dependencies>
...
    </dependencies>
</project>

If you have a multi project application with a parent pom.xml it's common to put all your properties in there so they can be used by all of the individual poms.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Maven Snapshot in pom.xml

From Dev

Maven variables precedence: how to make env variable being more important than hardcoded value in pom.xml?

From Dev

Maven variables precedence: how to make env variable being more important than hardcoded value in pom.xml?

From Dev

What are the difference between pom.xml and effective pom in Apache Maven?

From Dev

Maven Enforce some rules on pom.xml

From Dev

Error in pom.xml, maven issue

From Dev

Meaning of "SNAPSHOT" version in Maven pom.xml

From Dev

Error in pom.xml Maven build

From Dev

jBPM Maven dependencies not showing in pom.xml

From Dev

Repositories specified in pom.xml are not used by maven?

From Dev

Maven pom.xml error in eclipse

From Dev

maven pom.xml error with configuration in IntelliJ

From Dev

maven plugin dependency scope in pom.xml

From Dev

JDBC Maven Dependency in pom.xml

From Dev

Dependency version in maven pom.xml

From Dev

Maven not recognising 'configuration' tag in pom.xml

From Dev

Upload maven pom.xml to Git repository?

From Dev

Spring Maven project structure pom.xml

From Dev

Maven testResource filtering is not working in pom.xml

From Dev

Maven: If sentences in pom.xml in the property tag

From Dev

how to configure dependencies in maven pom.xml?

From Dev

Using maven pom to export values in xml file

From Dev

Dependency version in maven pom.xml

From Dev

jBPM Maven dependencies not showing in pom.xml

From Dev

Maven pom.xml <version></version>

From Dev

Maven not recognising 'configuration' tag in pom.xml

From Dev

Findbugs plugin configuration in maven pom.xml

From Dev

Trying to add plugin in pom.xml in maven

From Dev

Maven pom.xml adding another project

Related Related

HotTag

Archive