Skip to content

Commit

Permalink
[SRVLOGIC-311] - Add Red Hat repository to Maven installation
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini committed May 28, 2024
1 parent 17f2a16 commit 390ec66
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 15 deletions.
27 changes: 27 additions & 0 deletions modules/prod/kogito-maven/configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
set -e

SCRIPT_DIR=$(dirname "${0}")

echo "---> Overriding Maven settings.xml file with Red Hat configuration"

mkdir -p "${KOGITO_HOME}"/.m2
cp -v "${SCRIPT_DIR}"/maven/* "${KOGITO_HOME}"/.m2
88 changes: 88 additions & 0 deletions modules/prod/kogito-maven/maven/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">

<mirrors>
<!-- ### configured mirrors ### -->
</mirrors>

<proxies>
<!-- ### configured http proxy ### -->
</proxies>

<profiles>
<!-- ### extra maven repositories ### -->

<profile>
<id>kogito-images</id>
<repositories>
<repository>
<id>maven-central</id>
<name>Maven Central Repository</name>
<url>https://repo.maven.apache.org/maven2/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<repository>
<id>redhat</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<!-- ### configured repositories ### -->
</repositories>

<pluginRepositories>
<pluginRepository>
<id>maven-central</id>
<name>Maven Central Repository</name>
<url>https://repo.maven.apache.org/maven2/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>redhat</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
<!-- ### configured plugin repositories ### -->
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!-- ### extra maven profile ### -->
<activeProfile>kogito-images</activeProfile>
</activeProfiles>
</settings>
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,8 @@
# under the License.
#
schema_version: 1
name: org.kie.kogito.maven.prod
version: "3.9.3"

envs:
- name: "MAVEN_VERSION"
value: "3.9.3"

artifacts:
- name: apache-maven-3.9.3-bin.tar.gz
url: https://download.devel.redhat.com/brewroot/packages/org.apache.maven-apache-maven/3.9.3/1/maven/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.tar.gz
md5: f3fbff830d9a0dc2c6c99a76e27d0c01
name: org.kie.kogito.maven.osl
version: "999-SNAPSHOT"

execute:
- script: configure
3 changes: 1 addition & 2 deletions prod-logic-swf-builder-rhel8-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ modules:
- name: org.kie.kogito.logging
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.maven.prod
version: "3.9.3"
- name: org.kie.kogito.maven.common
- name: org.kie.kogito.maven.osl
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.swf.common.scripts
- name: org.kie.kogito.swf.builder.runtime.osl
Expand Down
3 changes: 1 addition & 2 deletions prod-logic-swf-devmode-rhel8-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ modules:
- name: org.kie.kogito.logging
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.maven.prod
version: "3.9.3"
- name: org.kie.kogito.maven.common
- name: org.kie.kogito.maven.osl
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.swf.common.scripts
- name: org.kie.kogito.swf.devmode.runtime.common
Expand Down

0 comments on commit 390ec66

Please sign in to comment.