Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# Patch xxx
COPY  --chown=odl:odl system/org/opendaylight/{the}/{odl}/{groupId}/{artifactId} $ODL_HOME/system/org/opendaylight/{the}/{odl}/{groupId}/{artifactId}/

The versioning problem

There will be maybe the case that you'll have to do a fix for the fix. The problem is that you cannot release an artifact in the offical maven repository twice. The solution is luckily quite simple. Just release it with a new version number and modify the injection of the artifact in the release building pom.xml.

Code Block
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
            <execution>
                <id>copy-with-alternalte-repo</id>
                <phase>generate-sources</phase>
                <goals>
                    <goal>copy</goal>
                </goals>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>{your groupId}</groupId>
                            <artifactId>{artifactId}</artifactId>
                            <version>{your deployed newer version}</version>
                            <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/{the}/{odl}/{groupId}/{artifactId}/{destination version}</outputDirectory>
                            <destFileName>{artifactId}-${destination version}.jar</destFileName>
                        </artifactItem>
                    </artifactItems>
                    <localRepositoryDirectory>${project.build.directory}/docker-stage/system</localRepositoryDirectory>
                </configuration>
            </execution>
        </executions>
    </plugin>