Discussion:
6.1.x custom distribution questions
sekaijin
2016-05-12 09:39:56 UTC
Permalink
Hi,

I do not understand how to make a custom distribution with smx 6.1.x.
The documentation refers to an older version of the assembly, which uses
karaf 2.x
http://servicemix.apache.org/docs/6.x/developers-guide/custom-distribution.html

see
<karaf.version>*2.2.2*</karaf.version>
<groupId>org.apache.karaf.assemblies.features</groupId>
<artifactId>standard</artifactId>
<version>*2.3.0*</version>

<directory>/x1/asf/*karaf-2.3.x*/target/checkout/manual/src/main/filtered-resources</directory>

The karaf documentation says it should no longer use the old method but
karaf-maven-plugin.
https://karaf.apache.org/manual/latest-3.0.x/#_custom_distributions

What I do not understand with this new method is how to modify files in etc
and how to add native library into lib.

I've watched the assembly of ServiceMix. It uses well karaf-maven-plugin.
But in the pon also has unpack and an assembly with the old method.

With the new method only, it does not seem possible to add custom folders,
conf files, or modify the files in etc.
A + JYT




--
View this message in context: http://servicemix.396122.n5.nabble.com/6-1-x-custom-distribution-questions-tp5723682.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
t***@wellsfargo.com
2016-05-12 12:34:06 UTC
Permalink
I'm not an expert but I recently migrated to the 6.1.x build and here are a
few of the customizations I made:

First the "assembly" folder was renamed to "assemblies" and you can find the
resources and filtered-resources under the apache-servicemix directory. You
can copy any files that you want to filter, over to the
filtered-resources/etc folder.

You can also add a reference to your own filters file to provide further
customizations.

<build>
* <filters>

<filter>${project.basedir}/src/main/filters/${env}/filter.properties</filter>
</filters>
* <resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>src/main/filtered-resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>${project.basedir}/../..</directory>
<filtering>false</filtering>
<includes>
<include>README</include>
<include>RELEASE*</include>
</includes>
</resource>
<resource>

<directory>${project.build.directory}/dependencies</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.i??</exclude>
<exclude>**/.target</exclude>
<exclude>**/.classpath</exclude>
</excludes>
</resource>
</resources>

To filter contents of other folders like bin or deploy, you have to add
those filesets to the common-unix-bin.xml example to add bin directory:

<fileSet>
<directory>${project.build.outputDirectory}/bin</directory>
<outputDirectory>/bin/</outputDirectory>
<includes>
<include>*</include>
</includes>
<lineEnding>unix</lineEnding>
<fileMode>0755</fileMode>
<directoryMode>0775</directoryMode>
</fileSet>






--
View this message in context: http://servicemix.396122.n5.nabble.com/6-1-x-custom-distribution-questions-tp5723682p5723684.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Loading...