Apache Camel Jbang的dep和classpath 及-O 简单记录

在Apache Camel Jbang 官网主要提到的deps的用法,classpath的较少。

deps 适用于环境上有maven repository或者git 的场景,对于传统发布jar/war的模式下,classpath更适用。

DEPS和CP都支持文件内或者命令行指定,文件内写法为

  • //DEPS org.apache.camel:camel-core:3.12.0,即标准group:artifact:version
  • //CP file:///ws/picocli-4.6.3.jar 指定文件路径

命令行写法

  • jbang --verbose -o --class-path=./picocli-4.6.3.jar hello.java
  • jbang --verbose --DEPS info.picocli:picocli:4.6.3 hello.java

同时建议在生产环境使用-o,避免网络访问导致的安全问题,在-o模式下,deps方式需要事先做好cache,或者编辑好/jbang/.jbang/cache/dependency_cache.json文件

相关推荐
小宇的天下11 小时前
Cadence allegro---assign net
服务器·php·apache
软件派1 天前
Apache Paimon终极教程——流批一体存储引擎深度解析(附Flink集成案例+性能调优代码)
apache·性能调优·流批一体·实时数据处理·paimon教程·flink集成·湖仓架构
三水不滴1 天前
Apache RocketMQ的原理与实践
经验分享·apache·rocketmq
whale fall2 天前
celery -A tool.src.main worker --loglevel=info --queues=worker1_queue & 什么意思
python·学习·apache
TracyCoder1232 天前
ElasticSearch核心引擎Apache Lucene(五):相关性算分 (Scoring)
elasticsearch·apache·lucene
码上上班2 天前
一文学会apache httpd
apache
野生技术架构师2 天前
Spring Boot 3 集成 Apache Calcite:多数据源查询的终极解决方案
spring boot·后端·apache
TracyCoder1233 天前
ElasticSearch核心引擎Apache Lucene(四):段 (Segment) 的设计与合并
elasticsearch·apache·lucene
TracyCoder1233 天前
ElasticSearch核心引擎Apache Lucene(三):数值与空间数据索引
elasticsearch·apache·lucene
Elastic 中国社区官方博客3 天前
Elasticsearch:Apache Lucene 2025 年终总结
大数据·人工智能·elasticsearch·搜索引擎·apache·lucene