It looks that you found a regression or somewhat as indeed it doesn't
work: in Karaf internally, we don't use filtered resources.
Let me investigate and reopen KARAF-2742 (the user confirmed that it
worked).
I keep you posted.
Regards
JB
On 01/05/2015 07:13 PM, Jean-Baptiste Onofré wrote:
I don't think it's correct: you will have two files in the zip (it will
work for tar.gz).
On 01/05/2015 06:37 PM, Mark Work wrote:
Hi,
That didn't fix it I'm afraid.
After reading what you said about where the file was being written to I
tried reverting to the original pom and adding:
<configuration>
<outputDirectory>${basedir}/target/assembly</outputDirectory>
</configuration>
to the maven-resources-plugin.
This looks like it's worked, but I need to check further.
Thanks for your help, I'll let you know if it's ok now.
On Mon, Jan 5, 2015 at 4:44 PM, Jean-Baptiste Onofré <[email protected]
<mailto:[email protected]>> wrote:
It's a different thing ;)
I talked about including the file, not filtering it ;)
By the way, we use it in Karaf internally, so it should work.
The problem is that your filtered file goes into target/classes
folder, and the zip file is created based on target/system folder.
You should try to define the execution of the plugin like this:
<plugin>
<groupId>org.apache.karaf.__tooling</groupId>
<artifactId>karaf-maven-__plugin</artifactId>
<executions>
<execution>
<id>install-kar</id>
<phase>compile</phase>
<goals>
<goal>install-kars</goal>
</goals>
</execution>
<execution>
<id>package</id>
<goals>
<goal>instance-create-archive<__/goal>
</goals>
</execution>
</executions>
<configuration>
<bootFeatures>
<feature>standard</feature>
<feature>management</feature>
</bootFeatures>
</configuration>
</plugin>
Does it work for you ?
Regards
JB
On 01/05/2015 05:26 PM, Mark Work wrote:
Thanks,
Yes, I've copied the pom from
http://karaf.apache.org/__manual/latest/developers-__guide/custom-distribution.html
<http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html>
and added in a property <my.var>value</my.var>:
https://gist.github.com/__anonymous/9184e149d222e592db19
<https://gist.github.com/anonymous/9184e149d222e592db19>
I then created a file in the filtered directory with the line:
target=${my.var}
In target/classes I see:
target=value
but in the zip & tar file I can see the file, but it still
contains:
target=${my.var}
On Mon, Jan 5, 2015 at 4:10 PM, Jean-Baptiste Onofré
<[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>> wrote:
Hi Mark,
Did you try the pom as in the archetype:
https://git-wip-us.apache.org/____repos/asf?p=karaf.git;a=__blob___plain;f=archetypes/__assembly/__src/main/resources/__archetype-__resources/pom.xml;__hb=karaf-3.__0.x
<https://git-wip-us.apache.org/__repos/asf?p=karaf.git;a=blob___plain;f=archetypes/assembly/__src/main/resources/archetype-__resources/pom.xml;hb=karaf-3.__0.x>
<https://git-wip-us.apache.__org/repos/asf?p=karaf.git;a=__blob_plain;f=archetypes/__assembly/src/main/resources/__archetype-resources/pom.xml;__hb=karaf-3.0.x
<https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=blob_plain;f=archetypes/assembly/src/main/resources/archetype-resources/pom.xml;hb=karaf-3.0.x>>
Especially the <execution/> ?
I just tried, and it works fine for me: my resources are
included in
the distro.
Can you share your pom ?
Regards
JB
On 01/05/2015 05:04 PM, Mark Work wrote:
Hi,
I'm having trouble with creating a custom distribution
using
karaf-assembly target when trying to include filtered
property
files.
I can reproduce it using the latest example POM from
the custom
distribution page with the maven-resources-plugin
included.
When I try to build with the filtered file, the version
with
replacements makes it into target/classes, but the
version in
the zip
file is the version prior to variable substitutions.
I have seen
https://issues.apache.org/____jira/browse/KARAF-2742
<https://issues.apache.org/__jira/browse/KARAF-2742>
<https://issues.apache.org/__jira/browse/KARAF-2742
<https://issues.apache.org/jira/browse/KARAF-2742>> , but I'm
still seeing a problem. Is this working for anyone else?
This is with karaf 3.0.2, building on Windows.
Thanks,
---
Mark
--
Jean-Baptiste Onofré
[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected] <mailto:[email protected]>
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com