How to associate additional (data) files with Netbeans module?

I want to associate some data files with the Netbeans module I'm working on. I know that I can link resources by adding them to a subfolder /srcso that they are packed in a jar. But I do not want the files displayed in the archive. Files should appear “free” in subfolders of the RCP application directory.

Is there any way to achieve this?

Thanks in advance,

David

+5
source share
3 answers

I got the solution from the NB platform email list: I just need to create a directory called releaseand copy additional files to this folder or subdirectory. After installing the module, this data is displayed in the root folder of the applications.

+3

NetBeans .nbm, JAR .

- .nbm, /src, maven, /resources, NBM

+4

If you use maven, you can configure the plugin to add addition files to nbm.

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>nbm-maven-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        <nbmResources>
            <nbmResource>
                <directory>release/test</directory>    <!-- This is the sourcedir -->
                <targetPath>modules/test</targetPath>  <!-- This is the path relative to the installed module -->
                <includes>
                    <include>**/*.*</include>          <!-- Pattern of files to include -->
                </includes>
            </nbmResource>
        </nbmResources>
    </configuration>
</plugin>

This should also give you tips for solving ant (which I don’t know by heart).

+4
source

All Articles