Open tasso94 opened 1 year ago
To download the catalog:
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://artifacts.camunda.com/artifactory/camunda-bpm/archetype-catalog.xml</url>
<outputFileName>archetype-catalog.xml</outputFileName>
<outputDirectory>${catalog.path}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
mvn install
or mvn deploy
populates the catalog with the new version
maven-deploy-plugin
can be used to deploy the catalog. NOTE: I didn't test it
However, we would like to skip upload when the version is SNAPSHOT so can create skip.catalog.deploy
property for this purposes. The property can be used for the catalog download as well.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>bsh-property</id>
<goals>
<goal>bsh-property</goal>
</goals>
<configuration>
<properties>
<property>skip.catalog.deploy</property>
</properties>
<source>skip.catalog.deploy =
project.getVersion().endsWith("-SNAPSHOT") ? true : false;</source>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<id>deploy-file</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<skip>${skip.catalog.deploy}</skip>
<file>${catalog.path}\archetype-catalog.xml</file>
<url>https://artifacts.camunda.com/artifactory/camunda-bpm/archetype-catalog.xml</url>
</configuration>
</execution>
</executions>
</plugin>
The deploy-file
goal fails if groupId
, artifactId
, and version
are configured.
<configuration>
<groupId>org.camunda.bpm.archetype</groupId>
<artifactId>archetype-catalog</artifactId>
<version>${project.version}</version>
<!-- ... -->
</configuration>
Unfortunately, deploying a single plain file with the maven-deploy-plugin
is impossible. The file's name is appended with a version and deployed to a location based on the artifactId
and groupId
. Additionally, a maven-metadata.xml
file is deployed:
[INFO] --- maven-deploy-plugin:2.8.2:deploy-file (deploy-file) @ archetype-catalog ---
Downloading: file:~/org/camunda/bpm/archetype/archetype-catalog/7.19.0-SNAPSHOT/maven-metadata.xml
Downloaded: file:~/org/camunda/bpm/archetype/archetype-catalog/7.19.0-SNAPSHOT/maven-metadata.xml (621 B at 86.6 KB/sec)
Uploading: file:~/org/camunda/bpm/archetype/archetype-catalog/7.19.0-SNAPSHOT/archetype-catalog-7.19.0-20230123.142831-2.xml
Uploaded: file:~/org/camunda/bpm/archetype/archetype-catalog/7.19.0-SNAPSHOT/archetype-catalog-7.19.0-20230123.142831-2.xml (91 KB at 30303.1 KB/sec)
Downloading: file:~/org/camunda/bpm/archetype/archetype-catalog/maven-metadata.xml
Downloaded: file:~/org/camunda/bpm/archetype/archetype-catalog/maven-metadata.xml (303 B at 295.9 KB/sec)
Uploading: file:~/org/camunda/bpm/archetype/archetype-catalog/7.19.0-SNAPSHOT/maven-metadata.xml
Uploaded: file:~/org/camunda/bpm/archetype/archetype-catalog/7.19.0-SNAPSHOT/maven-metadata.xml (621 B at 606.4 KB/sec)
Uploading: file:~/org/camunda/bpm/archetype/archetype-catalog/maven-metadata.xml
Uploaded: file:~/org/camunda/bpm/archetype/archetype-catalog/maven-metadata.xml (303 B at 295.9 KB/sec)
We need to decide on the following points:
archetype-catalog.xml
files to be deployed at another place than https://artifacts.camunda.com/artifactory/camunda-bpm/archetype-catalog.xml
?
https://artifacts.camunda.com/artifactory/camunda-bpm/org/camunda/bpm/archetype/archetype-catalog/7.19.0/archetype-catalog-7.19.0.xml
archetype-catalog.xml
files instead of having a single file that contains all the versions?
Context
The
archetype-catalog.xml
file hasn't been updated since last year. After switching from Nexus to the Artifactory repository, the archetype catalog is not updated with future releases.Acceptance Criteria (Required on creation)
archetype-catalog.xml
file is updated automatically on a regular basis to pick up new Automation Platform releases.Hints
Solution ideas
Maven
archetype-catalog.xml
file to~/.m2/repository/archetype-catalog.xml
archetype-catalog.xml
file~/.m2/repository/archetype-catalog.xml
to ArtifactoryTo download the
archetype-catalog.xml
file, the Maven plugincom.googlecode.maven-download-plugin:download-maven-plugin
might be useful. Uploading the changed file might be possible via the nexus stage plugin.Other solutions
Solution ideas proposed by the INFRA team:
Links
This issue is created in favor of: https://github.com/camunda/team-infrastructure/issues/233
Breakdown
-