Intellij exploded deploy to JBoss EAP - intellij-idea

I would like to deploy a maven based multi project to Jboss EAP. According to several article I configured output directory to end with ear, like: C:\project\module-ear\target\module-ear-1.0-SNAPSHOT.ear. Ear project contains a war and jar projects
First deploy works fine, although I'm not able to refresh classes and resources directly. If I modify something in war project, I cannot see deployed.

Related

idea cannot hot deploy files under src/main/resources

i am using idea ultimate 2020.3
i created a maven web project.
when i changed java or jsp files and choose update class and resources, they can be hot deploy.
however, if i changed files under src/main/resources, e.g. mybatis xml file under src/main/resouces/config/mapper, they cannot be hot deploy.
how can i fix it?
Make sure you are deploying an exploded artifact, see Update applications on application servers
Also make sure the module has configured Web resources (has the Web facet with Web Resource Directories and Source Roots configured:

configuring my java EE project in intelij with wildfly

I am trying to figure what configuration I should have for my Java EE project so that I can run it inside IntelliJ and instead of packaging with maven and uploading my war file manually, I want to use WildFly plugin to do that inside the IntelliJ for me.
My project is empty and I initially uploaded the war file into deployments in WildFly manually.
For configuring inside IntelliJ I selected a JBoss server configuration. I have a problem with choosing an artifact here. If the artifact tab is empty, my changes will not show when I run this configuration.
(my IntelliJ is the ultimate version)
What should I do so that I don't need to run
mvn package
before building my configuration
Plugin name is wildfly-maven-plugin. You can find more details in below link
https://docs.jboss.org/wildfly/plugins/maven/latest/examples/deployment-example.html

More then one project with log4j2 on Glassfish

I'm having an EAR project, consisting from 3 modules/projects: WEB, EJB and JPA. In WEB project, i have added log4j2 for logging. Therefore i've putted log4j2.xml file into WebContent/WEB-INF/ direcotry.
Now, i have made two projects out of one: the developer version and the test version. The differs mainly in project name. They also have different file location configured in log4j2.xml file, to which to write logs.
When i deploy only one project (for instance developer version), everything works fine. However, when im deploying both projects, then, both of them are logging to the same file (it is always the file configured in log4j2 from the project that was deployed first).
My Glassfish version is 3.1.2.2 and Log4j2 version is 2.0.2.
Does any one konws how to solve it?
The log4j2 manual has details on configuration for web applications.
Are the log4j2 jar files also in the WebProject1/WEB-INF/lib and WebProject2/WEB-INF/lib folders (and not in some shared location)? That way the log4j2 classes will be loaded by separate webapp class loaders and they can have separate configurations.

Can we deploy web application as a folder instead of war file in JBoss AS 7

I am having two queries
1. Can I deploy web application as a folder instead of war file in JBoss AS 7?
2. If not ,how to update the JSP or html or js files with out building/deploying the war file again?
JBoss supports the ability to deploy an archive file or as an exploded directory. To explode a Java EE archive, unzip the archive to a directory that is named the same as the archive file. As long as the directory name has the correct extension (.war, .ear, etc.) JBoss will deploy the directory normally. So if your war file has name HelloWorld.war, your exploded directory name should be HelloWorld.war too.
Please also note that it is recommended to edit your deployment-scanner in the standalone.xml configuration file and changing auto-deploy-exploded property back to false for exploded deployment. Quote from JBoss 7.1 Documentation:
Manual deploy mode is strongly recommended for exploded content, as
exploded content is inherently vulnerable to the scanner trying to
auto-deploy partially copied content.
Edit:
Please see link https://community.jboss.org/thread/200114. Looks like this is a confirmed bug in JBoss 7.1.1 that JBoss ignores the configuration in jsp-configuration and does not reload modified jsp. It is fixed in 7.1.2. You need to build 7.1.2 nightly build yourself. Or talk to JBoss Support if you have Enterprise support.

Is it possible to deploy an exploded war file to JBoss 4.2.3?

I'm trying to use IntelliJ to deploy exploded wars to JBoss 4.2.3. I seem to have no problem with doing this with 5.0.1.
But when I switch the server to 4.2.3, IntelliJ tells me that the extension for the exploded war is invalid, which makes very little sense, given that it is an exploded war. It seems to be expecting a .war file extension.
It seems that JBoss 4.2.3 can only take compressed war files, though I haven't found documentation to prove it.
Is there a way to configure JBoss 4.2.3 to accept exploded wars?
JBoss 4.x requires the exploded directory to have .war in the end of its name, adjust IDEA artifact settings and it will work fine.