0

I am only targeting Solaris when using Appassembler and have this in my 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>

However, a bat file is still generated and there is a Windows specific section in the generated conf.

Neither are going to stop me running - for instance I can exclude the bat file when using the assembly plugin and I don't think the Windows section will affect me on Solaris.

However, for neatness sake I would rather not generate either in the first place.

Is there a way to prevent them being generated?

EDIT: Added full example pom

EDIT2: I think this is a bug so opened an issue here

opticyclic
  • 7,412
  • 12
  • 81
  • 155
  • Please post your whole `pom.xml`. The [`platforms`](http://www.mojohaus.org/appassembler/appassembler-maven-plugin/assemble-mojo.html#platforms) ought to work, but `jws` is not a valid value. Try `unix`. – Tunaki Aug 28 '15 at 18:18
  • Actually `jsw` IS valid http://www.mojohaus.org/appassembler/appassembler-maven-plugin/usage-daemon-platforms.html and `unix` throws NullPointerException – opticyclic Aug 28 '15 at 18:57
  • try to add only solaris-x86-32, see on the link is written jws -> "which will generate for the following platforms by default: ... " – Babu Sep 29 '16 at 11:15

0 Answers0