How to generate .ear which includes all modules as .jars

Answered

Hi Experts, 

Here is my IDE details. 

IntelliJ IDEA 2018.1.5 (Ultimate Edition)
Build #IU-181.5281.24, built on June 12, 2018

JRE: 1.8.0_152-release-1136-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

 

I am new bee to intelleJ as well. I was working in enterprise application. It's existing production application and now i made small change in one of the module, and i need to build the .ear for the application. 

I am facing few challenges here:

1. It's old eclipse and websphere based application. 

2. Application has 6 modules , however when i open project settings I could only see one module which is the showing as root application under source tab. 

3. There is no Artifacts nor libraries nothing has configured. 

Looking at the production .ear file , I could have imagine that file structure should be something like 

MyApp.ear

 --META-INF
      ---application.xml
      ----jboss-app.xml
      ----Manifest.mf
--MyApp.war
--HibernateStartup.sar
--xxx.jar
--yyy.jar

 

How should I need to setup my modules here, and how do i need to add my dependency jar's to application here. Please help me. 

Any inputs are highly appreciate. 

0
3 comments

Could you please provide a demo project, or at least .idea folder?

0
Avatar
Permanently deleted user

As I mentioned earlier, this is my folder structure

--META-INF
      ---application.xml
      ----jboss-app.xml
      ----Manifest.mf
--MyApp.war
--HibernateStartup.sar
--xxx.jar
--yyy.jar

 

Also this application is built on 2015 , using Eclipse. Now when I try to open the application using Eclipse i couldn't able to open at all. With intelleJ I could at least. Also i try to compile one of the .java file but its not compiling. Also Recompile option is disable on the IDE. 

 

0

Your project is misconfigured, looks like module source roots are not set correctly.

Please see https://www.jetbrains.com/help/idea/configuring-content-roots.html and https://stackoverflow.com/a/43319356/104891 .

Then you can configure the artifact to include the files you need: https://www.jetbrains.com/help/idea/artifacts.html .

0

Please sign in to leave a comment.