manueljordan opened a new issue, #13356:
URL: https://github.com/apache/maven/issues/13356

   ### New feature, improvement proposal
   
   Hello Maven Team
   
   Pls consider the following scenario:
   
   Exists many projects with the same dependency such as JUnit. These projects 
are **not** related among them and as reminder they are of the two following 
types:
   
   **Standalone projects** 
   
   Such as _project-a_, _project-b_, ..., _project-n_ where is used:
   
   * `<packaging>jar</packaging>`
   
   **Parent/module projects**
   
   Such as _parent-project-001_, _parent-project-002_, ..., 
_parent-project-00n_ where is used:
   
   * `<packaging>pom</packaging>` + `<packaging>jar</packaging>`
   
   Because they are not related among them and if exists a new version of JUnit 
is mandatory open each project and upgrade the version at the `pom.xml` file. 
It such as:
   
   ```xml
   <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jdk.version>25</jdk.version>
     ...
    <junit.version>6.1.3</junit.version>
   </properties>
   
   ...
   
   <dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-engine</artifactId>
    <version>${junit.version}</version>
    <scope>test</scope>
   </dependency>
   ```
   
   As you can imagine it can be "complicated"
   
   **Suggestion**
   
   Can be possible do it globally? It to be declared for example at the 
`/home/<username>/apache/maven/<version>/conf/settings.xml` file or something 
special such as the 
`/home/<username>/apache/maven/<version>/properties/properties.xml` file which 
would contain:. 
   
   ```xml
   <global-properties>
    <junit.version>6.1.3</junit.version>
   </global-properties>
   ```
   
   It to be applied as:
   
   ```xml
   <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jdk.version>25</jdk.version>
     ...
    <junit.version>${global.property.junit.version}</junit.version>
   </properties>
   
   ...
   
   <dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-engine</artifactId>
    <version>${junit.version}</version>
    <scope>test</scope>
   </dependency>
   
   ```
   I hope you see my point
   
   Of course if is **not** need it the use of the global approach then is used 
the classic way as the 1rst sample code shown (practically it becomes now a 
kind of override of the global approach)
   
   Thanks for your understanding
   
   **Just in case**: pls, consider to create the _discussions_ section as 
[Apache Netbeans](https://github.com/apache/netbeans/discussions) has


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to