我在使用Appassembler时只针对Solaris,并在我的pom中使用它
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stackoverflow</groupId>
<artifactId>question</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>generate-jsw-scripts</id>
<phase>package</phase>
<goals>
<goal>generate-daemons</goal>
</goals>
</execution>
</executions>
<configuration>
<repositoryLayout>flat</repositoryLayout>
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
<target>${project.build.directory}</target>
<configurationDirectory>conf</configurationDirectory>
<daemons>
<daemon>
<id>${project.artifactId}</id>
<mainClass>org.apache.catalina.startup.Bootstrap</mainClass>
<jvmSettings>
<initialMemorySize>512</initialMemorySize>
<maxMemorySize>1024</maxMemorySize>
<extraArguments>
<extraArgument>-Dapp=${project.artifactId}</extraArgument>
<extraArgument>-XX:MaxPermSize=128m</extraArgument>
<extraArgument>-XX:+UseParNewGC</extraArgument>
<extraArgument>-XX:+CMSParallelRemarkEnabled</extraArgument>
<extraArgument>-XX:+UseConcMarkSweepGC</extraArgument>
</extraArguments>
</jvmSettings>
<platforms>
<platform>jsw</platform>
</platforms>
<generatorConfigurations>
<generatorConfiguration>
<generator>jsw</generator>
<includes>
<include>solaris-x86-32</include>
</includes>
<configuration>
<!--Logging-->
<property>
<name>wrapper.logfile.maxsize</name>
<value>10m</value>
</property>
<property>
<name>wrapper.logfile.maxfiles</name>
<value>10</value>
</property>
</configuration>
</generatorConfiguration>
</generatorConfigurations>
</daemon>
</daemons>
</configuration>
</plugin>
</plugins>
</build>
</project>
但是,仍会生成bat文件,并且生成的conf中有一个Windows特定部分。
两者都不会阻止我运行 - 例如我在使用程序集插件时可以排除bat文件,我不认为Windows部分会影响我在Solaris上。
然而,为了整洁起见,我宁愿不在第一时间生成。
有没有办法防止它们被生成?
编辑:添加完整示例pom
EDIT2:我认为这是一个错误,因此问题here