我的理解是,当使用-P选项显式设置配置文件时,它是独占的,无论发生什么情况,该配置文件都应该被激活。
在我的例子中,在运行命令mvn clean compile -Pcross-compile之后,cross-compile配置文件被忽略,build-linux-amd64被激活。
这里发生了什么,为什么没有调用cross-compile?
我的配置文件配置如下:
<profiles>
<!-- Cross-compile profile (can only be run under linux os) -->
<profile&g
我正在将中型Java应用程序的构建从Ant迁移到Maven。我可以轻松地迁移基本的构建工具,但我也希望从Maven构建中创建安装程序包。最简单的方法是通过Ant插件调用原始Ant脚本,但我想也许我应该先看看Maven的支持。
我需要为不同的平台创建几个不同的安装程序:
Windows 32/64位
Linux 32/64位
MacOS 32/64位
对于现在的Linux,我认为我们只有一个tar.gz和一些Bash脚本来启动守护进程-- Debian/RPM包会好得多,可能还有依赖的包定义。对于Windows,我们使用NullSoft安装程序。我不知道MacOS包现在是如何
我试图在Fedora 25上运行mvn package,但是我一直收到这个错误:
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.12.4/surefire-junit4-2.12.4.pom
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fb46a290711, pid=20263, tid=0x00