karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Filtered version of files not included in zip
Date Mon, 05 Jan 2015 16:44:34 GMT
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
> and added in a property <my.var>value</my.var>:
>
> 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é <jb@nanthrax.net
> <mailto:jb@nanthrax.net>> 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>
>
>     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> , 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é
>     jbonofre@apache.org <mailto:jbonofre@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message