NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
clebaudy
Joined: 06 Oct 2009 Posts: 34
|
Posted: Tue Mar 02, 2010 12:18 pm Post subject: filtering copy with maven nbm-maven-plugin of etc app.conf file |
|
|
Hello,
anybody knows if filtering is supported when specifying use of a custom etc file in a netbeans application platform when using maven nbm-maven-plugin ?
I need to replace some values inside my (branding).conf file set to etc directory, so I used the maven-resources-plugin to perform it before the branding app but I am not satisfied of the workaround :
| Code: |
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<configuration>
<finalName>${parent.artifactId}</finalName>
<etcConfFile>${basedir}/target/${brandingToken}.conf</etcConfFile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>generate-app-conf-file</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/</outputDirectory>
<resources>
<resource>
<directory>src/main/etc</directory>
<includes>
<include>${brandingToken}.conf</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
|
Is there any more simplier way to do it by specifying filtering directly through the nbm-maven-plugin ? |
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Tue Mar 02, 2010 12:39 pm Post subject: [platform-dev] Re: filtering copy with maven nbm-maven-plugin of etc app.conf file |
|
|
there no special handling within the nbm-maven-plugin. The solution you found is IMHo the correct way to approach the issue.
Milos
On Tue, Mar 2, 2010 at 1:19 PM, clebaudy <address-removed ([email]address-removed[/email])> wrote:
| Quote: | Hello,
anybody knows if filtering is supported when specifying use of a custom etc file in a netbeans application platform when using maven nbm-maven-plugin ?
I need to replace some values inside my (branding).conf file set to etc directory, so I used the maven-resources-plugin to perform it before the branding app but I am not satisfied of the workaround :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<configuration>
<finalName>${parent.artifactId}</finalName>
<etcConfFile>${basedir}/target/${brandingToken}.conf</etcConfFile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>generate-app-conf-file</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/</outputDirectory>
<resources>
<resource>
<directory>src/main/etc</directory>
<includes>
<include>${brandingToken}.conf</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Is there any more simplier way to do it by specifying filtering directly through the nbm-maven-plugin ?
|
|
|
| Back to top |
|
 |
bakers
Joined: 01 Apr 2010 Posts: 1
|
|
| Back to top |
|
 |
clebaudy
Joined: 06 Oct 2009 Posts: 34
|
Posted: Thu Apr 01, 2010 2:02 pm Post subject: |
|
|
thanks bakers but all is ok since my first post.
resource copy plugin does all needed, I only wanted a more simplier way to do it. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|