maven install不会复制所有launch4j创建的可执行文件

时间:2014-09-23 13:19:07

标签: maven launch4j

使用POM时,如下面的答案( https://stackoverflow.com/a/6194218/2764459)maven install只将名为$ {project.artifactId} .exe的可执行文件复制到repo。

因此,如果我有两个执行来创建单独的Windows可执行文件(CLI和GUI)

<executions>
    <execution>
        <id>l4j-cli</id>
        <phase>package</phase>
        <goals>
            <goal>launch4j</goal>
        </goals>
        <configuration>
            <headerType>console</headerType>
            <outfile>target/${project.artifactId}-cli.exe</outfile>
    ...
</execution>
<execution>
    <id>l4j-gui</id>
    <phase>package</phase>
    <goals>
        <goal>launch4j</goal>
    </goals>
    <configuration>
        <headerType>gui</headerType>
        <outfile>target/${project.artifactId}-gui.exe</outfile>
    ...
</execution>
</executions>

存储库中没有可执行文件!

我可以为install-plugin配置一些东西吗?

1 个答案:

答案 0 :(得分:0)

  

或者,您可以省略launch4j-plugin上的'jar'标记并删除shade-plugin的额外配置,但请注意,这将替换阴影jar中的主jar(没有嵌入依赖项) (带有嵌入式依赖项),这个将安装在您的本地仓库中,或者在需要时在反应堆中使用。

当我试图在那里解释时,我在https://stackoverflow.com/a/6194218/2764459上提供的设置将可执行工件创建为副工件,而不是主工件。这可以解释为什么它不会被复制到回购。尝试从标记中删除true和shaded以及“-shaded”后缀,看看它是否有效。