|
| 1 | +<?xml version='1.0'?> |
| 2 | +<!-- |
| 3 | +Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +or more contributor license agreements. See the NOTICE file |
| 5 | +distributed with this work for additional information |
| 6 | +regarding copyright ownership. The ASF licenses this file |
| 7 | +to you under the Apache License, Version 2.0 (the |
| 8 | +"License"); you may not use this file except in compliance |
| 9 | +with the License. You may obtain a copy of the License at |
| 10 | +
|
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +
|
| 13 | +Unless required by applicable law or agreed to in writing, |
| 14 | +software distributed under the License is distributed on an |
| 15 | +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +KIND, either express or implied. See the License for the |
| 17 | +specific language governing permissions and limitations |
| 18 | +under the License. |
| 19 | +--> |
| 20 | + |
| 21 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| 22 | + <modelVersion>4.0.0</modelVersion> |
| 23 | + |
| 24 | + <parent> |
| 25 | + <groupId>org.apache.artemis.examples.broker</groupId> |
| 26 | + <artifactId>jms-examples</artifactId> |
| 27 | + <version>2.53.0</version> |
| 28 | + </parent> |
| 29 | + |
| 30 | + <artifactId>security-oidc</artifactId> |
| 31 | + <packaging>jar</packaging> |
| 32 | + <name>Apache Artemis JMS Security with OpenID Connect Example</name> |
| 33 | + |
| 34 | + <properties> |
| 35 | + <activemq.basedir>${project.basedir}/../../../..</activemq.basedir> |
| 36 | + <version.org.keycloak>26.5.6</version.org.keycloak> |
| 37 | + <version.jboss.logging>3.5.0.Final</version.jboss.logging> |
| 38 | + <noKeycloakServer>false</noKeycloakServer> |
| 39 | + <skipDownloadKc>${noKeycloakServer}</skipDownloadKc> |
| 40 | + </properties> |
| 41 | + |
| 42 | + <dependencies> |
| 43 | + <dependency> |
| 44 | + <groupId>org.apache.artemis</groupId> |
| 45 | + <artifactId>artemis-jms-client</artifactId> |
| 46 | + <version>${project.version}</version> |
| 47 | + </dependency> |
| 48 | + <dependency> |
| 49 | + <groupId>jakarta.servlet</groupId> |
| 50 | + <artifactId>jakarta.servlet-api</artifactId> |
| 51 | + <version>6.0.0</version> |
| 52 | + <scope>provided</scope> |
| 53 | + </dependency> |
| 54 | + </dependencies> |
| 55 | + |
| 56 | + <build> |
| 57 | + <plugins> |
| 58 | + <plugin> |
| 59 | + <groupId>com.googlecode.maven-download-plugin</groupId> |
| 60 | + <artifactId>download-maven-plugin</artifactId> |
| 61 | + <version>1.6.1</version> |
| 62 | + <executions> |
| 63 | + <execution> |
| 64 | + <id>install-keycloak</id> |
| 65 | + <phase>pre-integration-test</phase> |
| 66 | + <goals> |
| 67 | + <goal>wget</goal> |
| 68 | + </goals> |
| 69 | + <configuration> |
| 70 | + <url>https://github.com/keycloak/keycloak/releases/download/${version.org.keycloak}/keycloak-${version.org.keycloak}.tar.gz</url> |
| 71 | + <unpack>true</unpack> |
| 72 | + <overwrite>false</overwrite> |
| 73 | + <skip>${skipDownloadKc}</skip> |
| 74 | + </configuration> |
| 75 | + </execution> |
| 76 | + </executions> |
| 77 | + </plugin> |
| 78 | + <plugin> |
| 79 | + <groupId>org.apache.artemis</groupId> |
| 80 | + <artifactId>artemis-maven-plugin</artifactId> |
| 81 | + <executions> |
| 82 | + <execution> |
| 83 | + <id>create</id> |
| 84 | + <phase>pre-integration-test</phase> |
| 85 | + <goals> |
| 86 | + <goal>create</goal> |
| 87 | + </goals> |
| 88 | + <configuration> |
| 89 | + <ignore>${noServer}</ignore> |
| 90 | + <noWeb>false</noWeb> |
| 91 | + <!-- |
| 92 | + enable keycloak for hawtio via system property overrides,"console" realm is used, but Hawtio populates this realm dynamically, |
| 93 | + no entry is needed in etc/login.config |
| 94 | + --> |
| 95 | + <javaOptions>-Dhawtio.realm=console</javaOptions> |
| 96 | + </configuration> |
| 97 | + </execution> |
| 98 | + <execution> |
| 99 | + <id>start</id> |
| 100 | + <phase>verify</phase> |
| 101 | + <goals> |
| 102 | + <goal>cli</goal> |
| 103 | + </goals> |
| 104 | + <configuration> |
| 105 | + <ignore>${noServer}</ignore> |
| 106 | + <spawn>true</spawn> |
| 107 | + <args> |
| 108 | + <param>run</param> |
| 109 | + </args> |
| 110 | + </configuration> |
| 111 | + </execution> |
| 112 | + <execution> |
| 113 | + <id>runClient</id> |
| 114 | + <phase>verify</phase> |
| 115 | + <goals> |
| 116 | + <goal>runClient</goal> |
| 117 | + </goals> |
| 118 | + <configuration> |
| 119 | + <clientClass>org.apache.activemq.artemis.jms.example.OIDCSecurityExample</clientClass> |
| 120 | + </configuration> |
| 121 | + </execution> |
| 122 | + <execution> |
| 123 | + <id>stop</id> |
| 124 | + <phase>verify</phase> |
| 125 | + <goals> |
| 126 | + <goal>stop</goal> |
| 127 | + </goals> |
| 128 | + <configuration> |
| 129 | + <ignore>${noServer}</ignore> |
| 130 | + </configuration> |
| 131 | + </execution> |
| 132 | + </executions> |
| 133 | + <dependencies> |
| 134 | + <dependency> |
| 135 | + <groupId>org.apache.artemis.examples.broker</groupId> |
| 136 | + <artifactId>security-oidc</artifactId> |
| 137 | + <version>${project.version}</version> |
| 138 | + </dependency> |
| 139 | + </dependencies> |
| 140 | + </plugin> |
| 141 | + <plugin> |
| 142 | + <groupId>org.codehaus.mojo</groupId> |
| 143 | + <artifactId>exec-maven-plugin</artifactId> |
| 144 | + <executions> |
| 145 | + <execution> |
| 146 | + <id>run-keycloak</id> |
| 147 | + <phase>pre-integration-test</phase> |
| 148 | + <goals> |
| 149 | + <goal>exec</goal> |
| 150 | + </goals> |
| 151 | + <configuration> |
| 152 | + <skip>${noKeycloakServer}</skip> |
| 153 | + <async>true</async> |
| 154 | + <asyncDestroyOnShutdown>true</asyncDestroyOnShutdown> |
| 155 | + <executable>./target/keycloak-${version.org.keycloak}/bin/kc.sh</executable> |
| 156 | + <arguments> |
| 157 | + <argument>start-dev</argument> |
| 158 | + <argument>-Dkeycloak.migration.action=import</argument> |
| 159 | + <argument>-Dkeycloak.migration.provider=singleFile</argument> |
| 160 | + <argument>-Dkeycloak.migration.file=./src/main/resources/artemis-keycloak-demo-realm.json</argument> |
| 161 | + </arguments> |
| 162 | + </configuration> |
| 163 | + </execution> |
| 164 | + <execution> |
| 165 | + <id>wait-for-keycloak</id> |
| 166 | + <phase>pre-integration-test</phase> |
| 167 | + <goals> |
| 168 | + <goal>java</goal> |
| 169 | + </goals> |
| 170 | + <configuration> |
| 171 | + <skip>${noKeycloakServer}</skip> |
| 172 | + <mainClass>org.apache.activemq.artemis.jms.example.Sleep</mainClass> |
| 173 | + <arguments> |
| 174 | + <argument>12000</argument> |
| 175 | + </arguments> |
| 176 | + </configuration> |
| 177 | + </execution> |
| 178 | + </executions> |
| 179 | + </plugin> |
| 180 | + </plugins> |
| 181 | + </build> |
| 182 | +</project> |
0 commit comments