不使用 Maven 部署 ActiveMQ Artemis 示例
Deploy ActiveMQ Artemis example without Maven
我正在测试和学习 ActiveMQ Artemis。
我能够 运行 使用 maven
.
随 Artemis 部署提供的示例代码示例
一个成功的示例部署如:
G:\apache-artemis-2.6.0\examples\features\standard\large-message> \apache-maven-3.6.2\bin\mvn.cmd -P noServer verify
示例运行良好,我理解代码。
问题是:如何在没有maven
的情况下部署示例代码。我需要找出部署示例代码时 maven
使用的 classpath
和其他 JVM
选项。
我尝试 运行 -X
选项和 maven
以获得详细的调试输出。但它并没有帮助我确定最终部署 JVM
options/configuration.
[INFO]
[INFO] --- artemis-maven-plugin:2.6.0:runClient (runClient) @ large-message ---
[DEBUG] Configuring mojo org.apache.activemq:artemis-maven-plugin:2.6.0:runClient from plugin realm ClassRealm[plugin>org.apache.activemq:artemis-maven-plugin:2.6.0,
parent: sun.misc.Launcher$AppClassLoader@4e25154f]
[DEBUG] Configuring mojo 'org.apache.activemq:artemis-maven-plugin:2.6.0:runClient' with basic configurator -->
[DEBUG] (f) args = [G:\apache-artemis-2.6.0\examples\features\standard\large-message/target/server0, true]
[DEBUG] (f) clientClass = org.apache.activemq.artemis.jms.example.LargeMessageExample
[DEBUG] (f) localRepository = id: local
url: file:///C:/Users/davidma/.m2/repository/
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => true, update => always]
[DEBUG] (f) remoteRepos = [apache.snapshots (https://repository.apache.org/content/repositories/snapshots/, default, releases+snapshots), central (https://repo.mave
n.apache.org/maven2, default, releases)]
[DEBUG] (f) repoSession = org.eclipse.aether.DefaultRepositorySystemSession@5a96f3cb
[DEBUG] -- end configuration --
args[0]=G:\apache-artemis-2.6.0\examples\features\standard\large-message/target/server0
args[1]=true
[DEBUG] Using SLF4J as the default logging framework
[DEBUG] Platform: Windows
[DEBUG] -Dio.netty.noUnsafe: false
[DEBUG] Java version: 8
[DEBUG] sun.misc.Unsafe.theUnsafe: available
[DEBUG] sun.misc.Unsafe.copyMemory: available
[DEBUG] java.nio.Buffer.address: available
[DEBUG] direct buffer constructor: available
[DEBUG] java.nio.Bits.unaligned: available, true
[DEBUG] jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
[DEBUG] java.nio.DirectByteBuffer.<init>(long, int): available
[DEBUG] sun.misc.Unsafe: available
[DEBUG] -Dio.netty.tmpdir: C:\Users\davidma\AppData\Local\Temp (java.io.tmpdir)
[DEBUG] -Dio.netty.bitMode: 64 (sun.arch.data.model)
[DEBUG] -Dio.netty.noPreferDirect: false
[DEBUG] -Dio.netty.maxDirectMemory: 7635730432 bytes
[DEBUG] -Dio.netty.uninitializedArrayAllocationThreshold: -1
[DEBUG] java.nio.ByteBuffer.cleaner(): available
[DEBUG] -Dio.netty.leakDetection.level: simple
[DEBUG] -Dio.netty.leakDetection.targetRecords: 4
[DEBUG] -Dio.netty.eventLoopThreads: 48
[DEBUG] -Dio.netty.noKeySetOptimization: false
[DEBUG] -Dio.netty.selectorAutoRebuildThreshold: 512
[DEBUG] org.jctools-core.MpscChunkedArrayQueue: available
[DEBUG] -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
[DEBUG] -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
[DEBUG] -Dio.netty.processId: 29964 (auto-detected)
[DEBUG] -Djava.net.preferIPv4Stack: false
[DEBUG] -Djava.net.preferIPv6Addresses: false
[DEBUG] Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
[DEBUG] Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200
[DEBUG] -Dio.netty.machineId: 00:00:00:00:00:00:00:e0 (auto-detected)
[DEBUG] -Dio.netty.allocator.numHeapArenas: 48
[DEBUG] -Dio.netty.allocator.numDirectArenas: 48
[DEBUG] -Dio.netty.allocator.pageSize: 8192
[DEBUG] -Dio.netty.allocator.maxOrder: 11
[DEBUG] -Dio.netty.allocator.chunkSize: 16777216
[DEBUG] -Dio.netty.allocator.tinyCacheSize: 512
[DEBUG] -Dio.netty.allocator.smallCacheSize: 256
[DEBUG] -Dio.netty.allocator.normalCacheSize: 64
[DEBUG] -Dio.netty.allocator.maxCachedBufferCapacity: 32768
[DEBUG] -Dio.netty.allocator.cacheTrimInterval: 8192
[DEBUG] -Dio.netty.allocator.useCacheForAllThreads: true
[DEBUG] -Dio.netty.allocator.type: pooled
[DEBUG] -Dio.netty.threadLocalDirectBufferSize: 0
[DEBUG] -Dio.netty.maxThreadLocalCharBufferSize: 16384
[DEBUG] -Dio.netty.recycler.maxCapacityPerThread: 4096
[DEBUG] -Dio.netty.recycler.maxSharedCapacityFactor: 2
[DEBUG] -Dio.netty.recycler.linkCapacity: 16
[DEBUG] -Dio.netty.recycler.ratio: 8
[DEBUG] -Dio.netty.buffer.bytebuf.checkAccessible: true
[DEBUG] Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@17d0d3d7
您无需 运行 maven
即可找到用于 运行 示例的类路径。类路径非常简单。
代理本身管理自己的类路径和 JVM 属性,因此您需要做的就是以正常方式启动代理(例如使用 ./artemis run
)。
至于客户端应用程序,它在类路径中唯一需要的 jar 是 lib/client
目录中代理附带的 artemis-jms-client-all-<version>.jar
。它不需要任何特定的 JVM 属性。
我正在测试和学习 ActiveMQ Artemis。
我能够 运行 使用 maven
.
一个成功的示例部署如:
G:\apache-artemis-2.6.0\examples\features\standard\large-message> \apache-maven-3.6.2\bin\mvn.cmd -P noServer verify
示例运行良好,我理解代码。
问题是:如何在没有maven
的情况下部署示例代码。我需要找出部署示例代码时 maven
使用的 classpath
和其他 JVM
选项。
我尝试 运行 -X
选项和 maven
以获得详细的调试输出。但它并没有帮助我确定最终部署 JVM
options/configuration.
[INFO]
[INFO] --- artemis-maven-plugin:2.6.0:runClient (runClient) @ large-message ---
[DEBUG] Configuring mojo org.apache.activemq:artemis-maven-plugin:2.6.0:runClient from plugin realm ClassRealm[plugin>org.apache.activemq:artemis-maven-plugin:2.6.0,
parent: sun.misc.Launcher$AppClassLoader@4e25154f]
[DEBUG] Configuring mojo 'org.apache.activemq:artemis-maven-plugin:2.6.0:runClient' with basic configurator -->
[DEBUG] (f) args = [G:\apache-artemis-2.6.0\examples\features\standard\large-message/target/server0, true]
[DEBUG] (f) clientClass = org.apache.activemq.artemis.jms.example.LargeMessageExample
[DEBUG] (f) localRepository = id: local
url: file:///C:/Users/davidma/.m2/repository/
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => true, update => always]
[DEBUG] (f) remoteRepos = [apache.snapshots (https://repository.apache.org/content/repositories/snapshots/, default, releases+snapshots), central (https://repo.mave
n.apache.org/maven2, default, releases)]
[DEBUG] (f) repoSession = org.eclipse.aether.DefaultRepositorySystemSession@5a96f3cb
[DEBUG] -- end configuration --
args[0]=G:\apache-artemis-2.6.0\examples\features\standard\large-message/target/server0
args[1]=true
[DEBUG] Using SLF4J as the default logging framework
[DEBUG] Platform: Windows
[DEBUG] -Dio.netty.noUnsafe: false
[DEBUG] Java version: 8
[DEBUG] sun.misc.Unsafe.theUnsafe: available
[DEBUG] sun.misc.Unsafe.copyMemory: available
[DEBUG] java.nio.Buffer.address: available
[DEBUG] direct buffer constructor: available
[DEBUG] java.nio.Bits.unaligned: available, true
[DEBUG] jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
[DEBUG] java.nio.DirectByteBuffer.<init>(long, int): available
[DEBUG] sun.misc.Unsafe: available
[DEBUG] -Dio.netty.tmpdir: C:\Users\davidma\AppData\Local\Temp (java.io.tmpdir)
[DEBUG] -Dio.netty.bitMode: 64 (sun.arch.data.model)
[DEBUG] -Dio.netty.noPreferDirect: false
[DEBUG] -Dio.netty.maxDirectMemory: 7635730432 bytes
[DEBUG] -Dio.netty.uninitializedArrayAllocationThreshold: -1
[DEBUG] java.nio.ByteBuffer.cleaner(): available
[DEBUG] -Dio.netty.leakDetection.level: simple
[DEBUG] -Dio.netty.leakDetection.targetRecords: 4
[DEBUG] -Dio.netty.eventLoopThreads: 48
[DEBUG] -Dio.netty.noKeySetOptimization: false
[DEBUG] -Dio.netty.selectorAutoRebuildThreshold: 512
[DEBUG] org.jctools-core.MpscChunkedArrayQueue: available
[DEBUG] -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
[DEBUG] -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
[DEBUG] -Dio.netty.processId: 29964 (auto-detected)
[DEBUG] -Djava.net.preferIPv4Stack: false
[DEBUG] -Djava.net.preferIPv6Addresses: false
[DEBUG] Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
[DEBUG] Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200
[DEBUG] -Dio.netty.machineId: 00:00:00:00:00:00:00:e0 (auto-detected)
[DEBUG] -Dio.netty.allocator.numHeapArenas: 48
[DEBUG] -Dio.netty.allocator.numDirectArenas: 48
[DEBUG] -Dio.netty.allocator.pageSize: 8192
[DEBUG] -Dio.netty.allocator.maxOrder: 11
[DEBUG] -Dio.netty.allocator.chunkSize: 16777216
[DEBUG] -Dio.netty.allocator.tinyCacheSize: 512
[DEBUG] -Dio.netty.allocator.smallCacheSize: 256
[DEBUG] -Dio.netty.allocator.normalCacheSize: 64
[DEBUG] -Dio.netty.allocator.maxCachedBufferCapacity: 32768
[DEBUG] -Dio.netty.allocator.cacheTrimInterval: 8192
[DEBUG] -Dio.netty.allocator.useCacheForAllThreads: true
[DEBUG] -Dio.netty.allocator.type: pooled
[DEBUG] -Dio.netty.threadLocalDirectBufferSize: 0
[DEBUG] -Dio.netty.maxThreadLocalCharBufferSize: 16384
[DEBUG] -Dio.netty.recycler.maxCapacityPerThread: 4096
[DEBUG] -Dio.netty.recycler.maxSharedCapacityFactor: 2
[DEBUG] -Dio.netty.recycler.linkCapacity: 16
[DEBUG] -Dio.netty.recycler.ratio: 8
[DEBUG] -Dio.netty.buffer.bytebuf.checkAccessible: true
[DEBUG] Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@17d0d3d7
您无需 运行 maven
即可找到用于 运行 示例的类路径。类路径非常简单。
代理本身管理自己的类路径和 JVM 属性,因此您需要做的就是以正常方式启动代理(例如使用 ./artemis run
)。
至于客户端应用程序,它在类路径中唯一需要的 jar 是 lib/client
目录中代理附带的 artemis-jms-client-all-<version>.jar
。它不需要任何特定的 JVM 属性。