Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: ymattica on March 31, 2016, 01:14:12 PM

Title: Composer 8.1.4 - How Create a war by including only some libraries ??
Post by: ymattica on March 31, 2016, 01:14:12 PM
hi
I would like to exclude some libraries (such as log4j, etc.) when I create a war of a voice application. How can I do ? In WebIni folder -> lib of the project, there are no libraries, but in the war that is created ( Export-->Java Composer Project as war file.. )  , there are many. How can I do ?

Regards
Title: Re: Composer 8.1.4 - How Create a war by including only some libraries ??
Post by: cavagnaro on March 31, 2016, 01:29:55 PM
Exclude? Even if they are not used on your code they are called from the GVP application itself on many JSP pages. So if you exclude them will have many errors. Not a clever idea.
Title: Re: Composer 8.1.4 - How Create a war by including only some libraries ??
Post by: ymattica on March 31, 2016, 01:39:01 PM
Yes I agree.
The problem is linked to the use of log4j made from a library that used in a JSP page. This library works correctly with only one copy of log4j library in the common / lib folder of tomcat
So I was wondering if you can exclude libraries that are associated by default to the war
Title: Re: Composer 8.1.4 - How Create a war by including only some libraries ??
Post by: cavagnaro on March 31, 2016, 03:01:19 PM
Not that I am aware of. That process is automatic by Eclipse
Maybe a google Search will help but definitively will better if your DEV env is as equal as possible as your PRD one.

http://stackoverflow.com/questions/13950012/how-to-exclude-jars-from-being-added-in-the-war-file
Title: Re: Composer 8.1.4 - How Create a war by including only some libraries ??
Post by: ymattica on March 31, 2016, 03:15:26 PM
thanks a lot  ;)
Title: Re: Composer 8.1.4 - How Create a war by including only some libraries ??
Post by: jerry_jeremiah on September 04, 2017, 11:09:51 PM
The files that are automatically included are located in:

C:\Program Files (x86)\GCTI\Composer 8.1\tomcat\lib

The actual build.xml is found in:

C:\Program Files (x86)\GCTI\Composer 8.1\plugins\com.genesyslab.composer.voice.project.java_8.1.0.201303051505.jar

It contains the following:

<target name="create-war" depends="init">
<echo>Creating war file...</echo>
<war destfile="dist/${filename}.war" duplicate="fail" webxml="${webxml}" >
<fileset dir="${voiceProjDir}" excludes="dist/* dist/*/* Callflows/* debugging-results/*/* .project .settings/*">
</fileset>
<lib dir="${tomcat.lib}">
<include name="json.jar"/>
<include name="gvpbackend.jar"/>
<include name="commons-fileupload-1.2.1.jar"/>
<include name="commons-codec-1.3.jar"/>
<include name="commons-io-1.4.jar" />
<include name="ojdbc6.jar"/>
<include name="sqljdbc4.jar"/>
    <include name="c3p0-0.9.1.2.jar"/>
<include name="xmltooling-1.3.1.jar"/>
<include name="xmlsec-1.4.5.jar"/>
<include name="xml-apis-1.3.04.jar"/>
<include name="wss4j-1.6.1.jar"/>
<include name="commons-logging-1.1.1.jar"/>
<include name="log4j-1.2.14.jar"/>
<include name="log4j.xml"/>
</lib>
<lib dir="dist/lib"  />
<webinf dir="${webInfDir}"></webinf>
</war>

So you can try to delete the files from the tomcat\lib directory or you can change the build.xml in the jar file.