Besides your maven projects for development that produce artifacts like jars, wars, ears, etc. you create a maven projects for your deployment packages. There you set the packaging to "solaris" and add dependencies to your development project(s) as needed. If you have more than one deployment package, you should use a parent project with packaging "pom" where each deployment package is inherited from.
Typically there are resources such as start-/stop-skripts, additional
config files, license files, etc. that should be deployed without
modification. Such files should be put under
src/main/resources/ROOT/<PATH> where
PATH is the absolute installation path on the deployment
machine (e.g. opt/foo or var/log/bar).
Templates are like resources but contain variables that will be
replaced by maven when building the package. This can be done in the same
way as for regular resources using filtered resources
(see here).
You may want to create a configuration package from a single maven project with different results for various target systems. Be aware that this is agains the philosophy of maven that says "one artifact per project". Anyways you can use a varibale in the declaration of the according filter:
<filter>src/main/filters/filter-${package.profile}.properties</filter>
mvn -Dpackage.profile=linux-test
In any case you will need the following templates located at "src/main/templates":
CLASSES="none"
PKG=${project.artifactId}
NAME="${project.name}"
DESC="${project.description}"
VERSION=${project.version}
ARCH=none
CATEGORY=application
ISTATES="S s 1 2 3"
RSTATES="S s 1 2 3"
i pkginfo=${project.build.outputDirectory}/pkginfo
d none / 0755 root root
d none /opt 0755 root sys
d none /var 0755 root sys
s none /opt/foo/var=/var/foo
${project.build.outputDirectory}/ROOT/<PATH>
where PATH is the absolute installation path on the deployment
machine (e.g. opt/foo/lib).
The parent POM for the deployment packages should look similar to this example:
<project>
<modelVersion>4.0.0</modelVersion>
<!-- fill out the ... with real values -->
<groupId>...</groupId>
<artifactId>...</artifactId>
<name>...</name>
<version>...</version>
<description>...</description>
<packaging>solaris</packaging>
<build>
<outputDirectory>target/package</outputDirectory>
<!-- if you want to separate templates from resources -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/templates</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>solaris-maven-plugin</artifactId>
<!-- IMPORTANT: the extensions flag is required to activate the 'solaris' packaging -->
<extensions>true</extensions>
<!-- these are all the defaults and should fit -->
<configuration>
<!-- <packageName>${project.artifactId}</packageName> -->
<!-- <packageFilename>${project.artifactId}-${project.version}.pkg</packageFilename> -->
<!-- <outputDirectory>${project.build.outputDirectory}</outputDirectory> -->
<!-- <outputRootFolder>ROOT</outputRootFolder> -->
<!-- <packageRoot>/</packageRoot> -->
</configuration>
</plugin>
</plugins>
</build>
</project>