自定义Netbeans平台应在哪里配置.文件是为了让Maven找到它? [英] Where should a custom Netbeans Platform conf. file be so that maven finds it?

查看:69
本文介绍了自定义Netbeans平台应在哪里配置.文件是为了让Maven找到它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于NetBeans平台构建的应用程序具有一个<myappdir>/etc/<myapp>.conf文件,该文件除其他因素外还确定了应用程序JVM参数.从历史上看,此文件是NetBeans IDE安装的一部分(据我所知),但是从NB 6.9开始,自定义文件现在为

Applications built on top of the NetBeans platform have a <myappdir>/etc/<myapp>.conf file determining, among other things, application JVM parameters. Historically, this file was a part of the NetBeans IDE installation (as far as I could tell), but starting with NB 6.9, custom files are now supported.

我无法使用Maven打包自定义配置文件来构建应用程序.

I am having trouble packaging a custom configuration file using Maven to build the application.

我想app.conf属性应该已经在project的pom中的project/build/pluginManagement/plugins下设置,如下所示:

I imagine the app.conf property should have been set in the project's pom under project/build/pluginManagement/plugins like so:

<plugin>
 ...
    <configuration>
        <brandingToken>${brandingToken}</brandingToken>
        <cluster>${brandingToken}</cluster>
        <appConf>myapp.conf</appConf>
    </configuration>

代表我的应用程序的maven模块不包含任何先前的源代码,因此我创建了src/main/nbm文件夹并将myapp.conf放置在src/main/nbm中. nbm-maven-plugin无法识别此问题.并将conf文件放入src/main/resources并没有影响.

The maven module representing my application contained no prior source, so I created the src/main/nbm folder and placed myapp.conf in src/main/nbm. This isn't picked up by nbm-maven-plugin. and putting the conf file into src/main/resources doesn't make a difference.

那么,谁能解释一下如何使用maven构建带有自定义配置文件的NetBeans平台应用程序?

So, can anyone explain how a NetBeans Platform application with a custom configuration file can be built using maven?

更新:

在Tim的产品指向正确的方向上,我找到了记录在 Geertjan博客上的答案 .解决方案是像在application模块pom中那样配置nbm-maven-plugin:

With Tim's prod in the right direction, I found the answer documented on Geertjan's blog. The solution is to configure the nbm-maven-plugin like so in the application module pom:

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>nbm-maven-plugin</artifactId>
            <configuration>
                <etcConfFile>src/main/resources/my.conf</etcConfFile>
            </configuration>
        </plugin>
    </plugins>
</build>

顺便说一句,如果您需要在Geertjan中使用第二个名字,那么您实际上不是NetBeans平台开发人员. ;)

BTW, if you need a second name with Geertjan, you're not really a NetBeans platform developer. ;)

推荐答案

看看根据我的理解,您应该使用自己创建的自定义商品替换默认商品.

As per my understanding that should allow you to replace the default one with a custom one that you create.

这篇关于自定义Netbeans平台应在哪里配置.文件是为了让Maven找到它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆