最终生成的 JAR 包在 boot/target 和 engine/target 目录下,aka: $openrasp_path/agent/java/boot/target/rasp.jar和$openrasp_path/agent/java/engine/target/rasp.jar
方案3 - 使用 build-java.sh 生成安装包
如果你使用 Linux 进行编译,可以执行源代码目录下面的 build-java.sh 进行编译和打包操作。这个脚本会在源代码根目录,生成 rasp-java.tar.gz 和 rasp-java.zip 两个文件
常见问题
1. maven 超时
如果总是出现超时错误,你可以考虑使用阿里云的镜像。
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.0.2: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:3.0.2 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: Operation timed out (Connection timed out) -> [Help 1]
修改方法是编辑 ~/.m2/settings.xml,并填写如下内容
2. git-commit-id-plugin 错误
如果你使用 JDK 1.6 编译,可能会遇到如下错误:
[ERROR] Plugin pl.project13.maven:git-commit-id-plugin:2.1.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for pl.project13.maven:git-commit-id-plugin:jar:2.1.5: Could not transfer artifact pl.project13.maven:git-commit-id-plugin:pom:2.1.5 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [Help 1]