Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

${project.version} warning in ACM build

Avatar

Level 3

We are in AMS and using ACM builds to deploy the code in all environments, from the past few days we are getting following warnings in our build log -

 

I am getting following for every module -
18:56:25,926 [main] [WARNING] Some problems were encountered while building the effective model for com.XXX.XXX.XXX:XXXX.all:content-package:2022.03.31204623
18:56:25,926 [main] [WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
18:56:25,927 [main] [WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.


below is our pom.xml structure in code repo, when I try to update with project,version I am getting error -

Parent pom

<groupId>xxx.xxx.xxx</groupId>
<artifactId>xxx-xxx</artifactId>
<packaging>pom</packaging>
<project.version>1.0-SNAPSHOT</project.version>
<description>xxx xxx</description>

Child ui.apps pom

<parent>
<groupId>xxx.xxx.xxx.xxx</groupId>
<artifactId>xxx-xxx</artifactId>
<project.version>1.0-SNAPSHOT</project.version> - error in this line( Element project.version not allowed here)
<relativePath>../pom.xml</relativePath>
</parent>


 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You have references using the string "${version}" in your pom. Searching your complete maven repository for this string should show where it is used.

 

In the parent section you have to have the "version" tag (as shown here), otherwise the build will fail:

<parent>
<groupId>xxx.xxx.xxx.xxx</groupId>
<artifactId>xxx-xxx</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

 

View solution in original post

2 Replies

Avatar

Community Advisor

Hi,

 

Can you try matching groupId in for both parent and ui.apps pom.xml which might resolve the issue

Avatar

Correct answer by
Employee Advisor

You have references using the string "${version}" in your pom. Searching your complete maven repository for this string should show where it is used.

 

In the parent section you have to have the "version" tag (as shown here), otherwise the build will fail:

<parent>
<groupId>xxx.xxx.xxx.xxx</groupId>
<artifactId>xxx-xxx</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>