How do I cure release project due to non released dependencies when releasing a child module?

I'm using Maven 3.1.1 and trying to use the Maven release plugin to release a child module of a multi-module project. The parent module was released and this child module is not in the parent's child module list. In my child module pom.xml file

    <parent>
            <artifactId>subco</artifactId>
            <groupId>org.mainco.subco</groupId>
            <version>52.0.0-SNAPSHOT</version>
    </parent>
    <name>myproject</name>
    <url>http://maven.apache.org</url>
 
    <dependencyManagement>
            <dependencies>
                    <dependency>
                            <groupId>org.mainco.subco</groupId>
                            <artifactId>core</artifactId>
                            <version>${project.version}</version>
                    </dependency>
   </dependencyManagement>
 
    <dependencies>
            ...
            <dependency>
                    <groupId>org.mainco.subco</groupId>
                    <artifactId>core</artifactId>
            </dependency>
I'm not able to change any properties in the parent pom.xml file … is there anything I can do in the child module to get the above command to run successfully?

.




 

Actual problem is you have done multi modules. So whenever you go with multi modules, we can do build on parent. while doing on parent, child modules get executed. after build process done jenkins will update all versions in all the pom files.

If you want to build alone for child module, you will get the problems automatically. Because you have done setup for multi modules, but you are trying to do build for single module.

    Actual problem:
    modules have parent vesrion: 52.0.0-SNAPSHOT

This version have SNAPSHOT generally if u do module alone this is not acceptable, because one jar will not accept snapshot dependencies.

But this is accepted by Multi modules because while doing build this will be updated dynamically by the jenkins.

 
Post a Reply
Captcha Image