Where is JBOSS_HOME variable set for Intellij - intellij-idea

So I'm trying to run JBoss server in Intellij, but there's a conflict between JBOSS_HOME path that Intellij reads from somewhere and the actual path to Jboss folder that is set in Run/Debug Configuration.
The Run/Debug Configuration Jboss path used to be the same as JBOSS_HOME, but it has changed, and it looks like JBOSS_HOME didn't get updated.
There is no environmental variable called JBOSS_HOME, so I guess Intellij stores it's own variables somewhere.
I've already checked File->Settings->Appearance & Behaviour->Path Variables
but there's no JBOSS_HOME variable set. I've tried restarting Intellij with no luck.
Any ideas guys?

Those are set individually per each application server defined, be it JBoss, Tomcat or something else. You can access and create/modify/remove them in 2 ways:
File -> Settings -> Build, Execution, Deployment -> Application servers
From the Run/Debug configuration window. From the dropdown list in your upper right corner where the run/debug buttons are, select Edit configurations..., select your JBoss run configuration from the tree on the left and click on the Config button (which will open a window pretty much identical to the one at point 1.)

Related

Is there a way to fix the used Run/Debug configuration in IntelliJ?

I often switch between running/debugging tests locally in IntelliJ and using remote debugging my server. Therefore I have multiple run/debug configurations (the gradle ones were created automatically):
Whenever I execute a local test like PdfA...en.ttete this profile is selected by default in that combobox. But I want it to stay default on entry Remote...Debugging 5050 so that I can easily run this profile. Is there a fix?
Other solution would be to define a Hotkey for my favourite configuration. But I couldn't find it.

IntelliJ switching between JBOSS_HOME

Using intelliJ 15 Ultimate on MAC Yosemite.
I have two Jboss installation, jboss-eap-6.4 and wildfly-10.1.0.Final.
Depending on what project I am working on I need the "Run/Debug Configuration" to choose the correct JBOSS_HOME.
My bash_profile :
export JBOSS_HOME=/usr/local/jboss-eap-6.4
I also added convenience way to change in the terminal
alias setEAP='JBOSS_HOME=/usr/local/jboss-eap-6.4'
alias setWILDFLY='export JBOSS_HOME=/usr/local/wildfly-10.1.0.Final'
In Intellij I have :
Every time I run one of the Run/Debug it chooses the JBOSS_HOME set in bash_profile.
/usr/local/wildfly-10.1.0.Final/bin/standalone.sh
WARNING: JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
JBOSS_HOME: /usr/local/jboss-eap-6.4
I tried to create an External Tool where I export JBOSS_HOME, but this does not work. Anyway I can switch between JBOSS installation ? This could also be applicable to JAVA_HOME
You do not need to create scripts, just go to the Startup/Connection tab and add the value to the list of environment variables.

IntelliJ 14 missing HOME env. variable

Whenever I start IntelliJ I see a notification balloon pointing out that I have an undeclared HOME variable. I can remove it but the same thing happens when I open IntelliJ again. I would like to fix it but I have no idea which HOME variable it is referring to.
The project is a Grails 2.4 project with a JDK7 on Windows 7.
Any suggestions?
Have you tried to set this enviroment variable in your windows system settings?
I think the name of this variable must be M2_HOME and must point to the path of your maven installation.
start -> right click on computer -> extended system settings -> enviroment
See also: http://maven.apache.org/download.cgi under section "Installation Instructions" and "Windows".

Can I commit and share VM options in IntelliJ?

To execute my application, or run or debug unit tests, I need to enable various VM options, include -javaagent:<aspectjweaver-path> or -Djava.library.path=<some native lib path>
I can see how to change these configurations manually in IntelliJ IDEA under "Edit Configurations..."
What, if anything, do I need to check in to my VCS to share these settings with other members of my team, and ensure they pick them up automatically whenever someone changes them in the VCS?
Alternatively is there a way to set these automatically in IntelliJ without even touching the edit configurations? Especially the aspectjweaver. When I build/test my project from the command line using maven this is all handled for me by specifying argLine arguments to the surefire plugin, but IntelliJ doesn't respect these settings. Perhaps there are alternative plugins that can help me out?
First, you need to share your run configuration. It's simply done by checking the Share box right to the configuration name in the run configuration dialog:
Your run configuration will then be saved to .idea/runConfiguration (or whatever your settings folder name is).
From Jetbrains Web Help:
If this check box is selected, the run/debug configurations become available to the other team members.
The shared run/debug configurations are kept in separate xml files under .idea\runConfigurations folder, while the local run/debug configurations are kept in the .idea\workspace.xml.
This field does not appear for the default run/debug configurations.

Using Netbeans to configure context-root for JBoss

I have a Spring application that is being deployed to JBoss 4.2. I can manually edit the generated WAR file and alter the jboss-web.xml file to set the context-root value and that works perfectly well. I would like to be able to do the samething via netbeans (6.9.1), but I have been unable to locate where to make the adjustment. I've tried tweaking the project's properties and setting the Context Path value. When I Run the application that value is reset to the Project's name. I've located the jboss-web.xml file in the project and changed it there, also reset upon run. So it appears that Netbeans is deciding that the value need to be set but I can't locate where. If it's of any use, the project also uses Maven2, but all the controls I can find for impacting context-root are geared towards EAR files instead of WAR.
Has anyone been able to do this or am I just in a world of making the change post build?
I had a similar problem once where netbeans was sometimes removing the context-root element from the glassfish-web.xml configuration. I have not been able to track it down exactly but you could try to remove the file nb-configuration.xml in the project root folder and see if that helps.