NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
kraeusen@gmx.de Posted via mailing list.
|
Posted: Tue Apr 24, 2012 3:12 pm Post subject: Maven additionalArguments not set in <branding-name>.conf / Persist desired commandline-arguments with maven |
|
|
Dear List,
I'd like to distribute my netbeans rcp application in a way that allows
several jvm arguments to be passed when starting.
Something similar to -J-Xmx2048m, but actually it's a javaagent.
I don't want to create a custom launcher, but use the standard generated
netbeans-launcher.
Usually, you'd put these arguments into nbproject/project.properties (or
platform.properties?).
From my understanding, the properties are then expected to be written to
the etc/<branding-name>.conf file, and when you distribute the
application, this config-file will be used by the launcher.
Now, I'm using maven (there's no nbproject-folder) and researched that
issue for a while, but I can't get it working.
In my parent pom.xml I defined under pluginManagement plugin:
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.5</version>
<extensions>true</extensions>
<configuration>
<brandingToken>${brandingToken}</brandingToken>
<cluster>${brandingToken}</cluster>
<additionalArguments>-J-noverify
-J-javaagent:"myproject\modules\ext\my.package\agent-1.0-SNAPSHOT.jar"</additionalArguments>
</configuration>
When I run the application from the ide, everything is working just as
expected. Duh, the ide actually adds these parameters as
commandline-arguments as I can see in the output:
Executing: cmd.exe /X /C
"{path-to-my-project}\application\target\{project-name}\bin\{project-name}.exe
--console suppress --userdir
{path-to-my-project}\application\target\userdir
-J-Dnetbeans.logger.console=true -J-ea --branding {project-name}
--jdkhome "C:\Program Files\Java\jdk1.7.0" -J-noverify
-J-javaagent:myproject\modules\ext\my.package\agent-1.0-SNAPSHOT.jar"
However, these arguments are not written to <branding-name>.conf and
when I run the application standalone, they will not be passed.
Does anyone know how to get this working with maven (netbeans 7.x, maven2)?
Thanks in advance,
Thomas |
|
| 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
|
|