NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Maven additionalArguments not set in <branding-name>.conf / Persist desired commandline-arguments with maven

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
kraeusen@gmx.de
Posted via mailing list.





PostPosted: Tue Apr 24, 2012 3:12 pm    Post subject: Maven additionalArguments not set in <branding-name>.conf / Persist desired commandline-arguments with maven Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo