Hi,

> I'm using appassembler-maven-plugin and I want to set into the JSW file
the value of the JAVA_HOME because the servers where I have to install
not always has the JAVA_HOME available.

Is there any way to do it into the plugin?

If not you can define a pre wrapper script part which is inserted at the beginning of the wrapper.conf file.

  <configuration>
          <configurationDirectory>conf</configurationDirectory>
          <daemons>
            <daemon>
              <id>daemon-1</id>

<mainClass>org.codehaus.mojo.appassembler.example.helloworld.HelloWorld</mainClass>
              <platforms>
                <platform>jsw</platform>
              </platforms>
              <endorsedDir>test</endorsedDir>

<preWrapperConf>${project.basedir}/src/pre-wrapper/snippet.txt</preWrapperConf>
            </daemon>
          </daemons>
        </configuration>

which will result in having in the wrapper.conf:

#include me^M
#include metoo
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java
wrapper.working.dir=..
...

where you can define the JAVA_HOME as far as i know (I don't know the JSW so good...)...

May be the following is simpler:

You can also define configuration elements like the following:

 <generatorConfigurations>
                <generatorConfiguration>
                  <generator>jsw</generator>
                  <includes>
                    <include>linux-x86-32</include>
                    <include>linux-x86-64</include>
                  </includes>
                  <configuration>
                    <property>

<name>configuration.directory.in.classpath.first</name>
                      <value>etc</value>
                    </property>
                    <property>
                      <name>set.default.REPO_DIR</name>
                      <value>lib</value>
                    </property>

...
where you can of course change entries or overwrite them with appropriate values.
http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/usage-daemon-generatorconfig.html


Kind regards
Karl Heinz Marbaise
Mojo Team


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to