[Gradle][Spring Boot]Maven parent pom similar in Gradle

47 views Asked by At

Consider this maven setup. I have a parent-pom repo with pom.xml that has below:

 <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.1.3</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
....
<properties>...</properties>
<dependencies>...</dependencies>
<build>
    <plugins>
        <plugin>...</plugin>
    </plugins>
</build>

Now in my other spring boot app repo, I am referring to this parent-pom pom.xml in tag like below:

<parent>
    <groupId>com.group</groupId>
    <artifactId>parent-pom</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</parent>
 <dependencies>
    <dependency>..</dependency>
</dependencies>

Here in this repo pom.xml, I don't need to mention versions. they are all maintained at single pom i.e. Parent-Pom's pom.xml.

Is the same possible in Gradle? I failed to find a proper blog or reference. Any help is highly appreciated.

0

There are 0 answers