You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "gtully (via GitHub)" <gi...@apache.org> on 2023/05/09 15:22:58 UTC

[GitHub] [activemq-artemis] gtully commented on a diff in pull request #4297: ARTEMIS-3042 simple properties based, extensible broker image

gtully commented on code in PR #4297:
URL: https://github.com/apache/activemq-artemis/pull/4297#discussion_r1188774969


##########
artemis-image/pom.xml:
##########
@@ -0,0 +1,127 @@
+<!--
+  ~ 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.
+  -->
+
+<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">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>artemis-pom</artifactId>
+      <version>2.28.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>artemis-image</artifactId>
+   <name>Apache ActiveMQ Artemis Image</name>
+
+   <properties>
+      <!-- for checkstyle plugin -->
+      <activemq.basedir>${project.basedir}/..</activemq.basedir>
+      <!-- none of the surefire project defaults are relevant to the tests here -->
+      <activemq-surefire-argline></activemq-surefire-argline>
+
+
+      <!-- for the locked down examples/amqp_sasl_scram_test__etc -->
+      <!-- user A is referenced in the role file, so don't just change it here -->
+      <example.user>A</example.user>
+      <!-- a password must be provided to generate the user credential data.
+         use: mvn exec:exec -Dexample.pwd=xyz on the command line to register your value in the example.user.file -->
+      <example.pwd></example.pwd>
+      <example.user.file>examples/amqp_sasl_scram_test__etc/user</example.user.file>
+   </properties>
+
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>apache-artemis</artifactId>
+         <version>${project.version}</version>
+         <type>pom</type>
+      </dependency>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <version>${junit.version}</version>
+         <scope>test</scope>
+      </dependency>
+      <!-- The johnzon-core and json-api contents are repackaged in -commons,
+           However maven can still need them during tests that don't see the shaded bits during build -->
+      <dependency>
+         <groupId>org.apache.johnzon</groupId>
+         <artifactId>johnzon-core</artifactId>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>jakarta.json</groupId>
+         <artifactId>jakarta.json-api</artifactId>
+         <scope>test</scope>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>com.google.cloud.tools</groupId>
+            <artifactId>jib-maven-plugin</artifactId>
+            <version>3.3.0</version>
+            <configuration>
+               <from>
+                  <!-- reproducible build and single pull with @sha reference -->
+                  <image>eclipse-temurin:19-jre@sha256:619e1c33be065f75eb00b0999627b7b1e070f55c427e63dfd256f06d00935111</image>
+               </from>
+               <to>
+                  <image>target/activemq-artemis-image:${project.version}</image>
+               </to>
+               <container>
+                  <mainClass>org.apache.activemq.artemis.ActiveMQImageMain</mainClass>
+                  <ports>
+                     <port>61616</port>
+                  </ports>
+                  <format>OCI</format>
+               </container>
+            </configuration>
+            <executions>
+               <execution>
+                  <phase>package</phase>
+                  <goals>
+                     <goal>buildTar</goal>
+                  </goals>
+               </execution>
+            </executions>
+         </plugin>
+
+         <!-- to easily create a single salted credential for our ${example.user.file}-->
+         <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
+            <version>${exec-maven-plugin.version}</version>
+            <configuration>
+               <executable>java</executable>
+               <arguments>
+                  <argument>-classpath</argument>
+                  <classpath/>
+                  <argument>org.apache.activemq.artemis.spi.core.security.jaas.SCRAMPropertiesLoginModule</argument>
+                  <argument>${example.user}</argument>
+                  <argument>${example.pwd}</argument>
+               </arguments>
+               <outputFile>${example.user.file}</outputFile>
+            </configuration>
+         </plugin>

Review Comment:
   agree. will make a readme and pom in the examples dir. thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org