cancel
Showing results for 
Search instead for 
Did you mean: 

Jar Files included as Variables in NWDS getting included in EAR File

former_member200339
Participant
0 Kudos

Dear All,

I am creating a Adapter Module to read an Excel File. I have created an EJB project and an EAR project for this. The Bean class requires 3 type of jar files.

1. SAP JAR Files

2. EJB JAR Files

3. EXCEL Jar Files.

We do not need the first two category to be included when creating the EAR file. I have included them into the project  as Variables. The EXCEL related jar files are included as External Jar Files.

But while generating the EAR files all the jars are getting included making it 15 MB of size.

Please suggest how can I remove the first two category.

Thanks and Regards,

Rana Brata De

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi Rana

Include the JAR for the two categories in a User Library, and add the library to the build path. This way, those JAR files will not be included in the EAR file.

Rgds

Eng Swee

former_member200339
Participant
0 Kudos

Dear Eng,

I have made a two variable entry in the Window --> Preferences --> New Variable and pointed them to two folders having the jar files of category 1 and category 2

Next I included them in the Project --> Properties --> Java Build Path --> Libraries via Add Variable.

The jar files for category-3 are included through Add External Jars.

Though the compilation is correct but while creating the EAR all the jar files are getting included.

Any Idea.

Rana

former_member181985
Active Contributor
0 Kudos

Hi,

If you don't need jar files in EAR file, open EAR file with winzip application and then delete unnecessary jar files (as in your case) and close the winzip app to save the EAR file. Consider, the latest saved EAR file for deployment

Thanks,

Praveen

engswee
Active Contributor
0 Kudos

Dear Rana

Don't use Variable to add the JAR files to the project build path. As mentioned above, use User Library.

A user library can be created via Windows -> Preferences -> Java -> Build Path -> User Libraries. Create a new library and add the JAR files to it. Example below.

After that, you can add the User Library to the Project build path.

Rgds

Eng Swee

former_member200339
Participant
0 Kudos

Hi Yeoh,

It worked. Thanks a lot. Your help was much needed.

Regards,

Rana Brata De

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

Which version of NWDS do you have? In version 7.3 you can use the libraries in NWDS. Add Library -> XPI Library -> XPI Adapter Libraries Then the libraries are not added to the EAR.

Libraries for PI 7.1 and PI 7.3 are the same, so I recommend usding the latest NWDS version, unless you work on PI 7.0.