P
P
P_Alexander2018-04-23 17:22:18
Java
P_Alexander, 2018-04-23 17:22:18

In pom.xml use JSTL ${versions.wildfly}?

Hello, reading articles I often see that the following syntax is used in the pom.xml file

<dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-arquillian-container-managed</artifactId>
            <version>${versions.wildfly}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
and I can’t understand is it used for an example like substitute the version itself, or is it using EL?
For example, in the piece I wrote above, where does the versions variable come from? I understand that there is little information here, but in principle, where are they stored? If anyone can explain or throw off an article where this is explained, I will be extremely happy!)
Who is interested in this piece from here, this project as an example, so you won’t have to look for pom.xml for a long time - https://github.com/evgeniy-khist/examples /blob/mas...
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Eremin, 2018-04-23
@P_Alexander

well, kroch, in the same place, in the memento, there is a properties section where you can set values ​​​​and drag them around
why, for example

<properties>
        <java.version>1.8</java.version>
        <hibernate.version>4.3.5.Final</hibernate.version>
        <log4j.version>2.6</log4j.version>
</properties>

and if, at startup, I want to override the value, say for log4j.version, then I can just
In articles, they write this
${versions.wildfly}
simply because the version is not important and it is assumed that you are using the most current (well, or the most stable version)
Why do this at all?
Let's say you have a lot of dependencies on a single
Spring provider in your project, e.g. He's got tons of packages. At the same time, it is recommended to use this darkness always with the same version for everyone (they release them that way)
If the version is set only in one place, it will be easy to override it for the entire project

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question