Author Message
MichaelNorman
Joined: Jun 3, 2015
Messages: 448
Offline
I have reviewed the previous posts about moving to a Maven model. My question is, how would we go about activating the Application Simulator for debugging purposes from a Mavenized AAOD project?

RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
The same as always switch to the speech perspectice and run the application.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Also see https://www.devconnectprogram.com/forums/posts/list/0/21338.page#p150730
MichaelNorman
Joined: Jun 3, 2015
Messages: 448
Offline
Thanks Ross. However I get alot of errors on the Avaya jars when I attempt to use mvn install on that pom. They likely just need to be registered to the local repo and added via dependency. Can you advise?

package com.avaya.sce.runtime does not exist
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Here is what I did,

I created a new project (or use an existing one) Using Eclipse 4.6. I switch to the java perspective. Then select the project, and use the context menu to select Configure -> Convert to Maven Project.

Open the pom.xml and replace
<build>

<sourceDirectory>WEB-INF/src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source/>
<target/>
</configuration>
</plugin>
</plugins>
</build>


with

<build>

<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>install</phase>
<configuration>
<tasks>
<ant antfile="build.xml" dir="." target="deploy.project.war" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>


Now switch back to the Speech perspective and export the project and on the "Specify Deployment Parameters" page od the export wizard select "Save build file after exporting the project". This creates the build.xml. No you should be able to run a maven install or (mvn install) and the ant script is invoked and the war built.
MichaelNorman
Joined: Jun 3, 2015
Messages: 448
Offline
I guess I should clarify. I'm looking to use Maven not just for deploying the war file but for compilation and dependency management as well. We are getting to the point where the built in WSOP don't really work for us (custom objects, etc) and it is easier to just use things such as Jersey/Jackson for consuming web services, and likewise much easier to use Maven to manage those dependencies instead of manually downloading JARs adding to classpath, etc.

When I use your method I am able to create an exported war file, but using application simulator does not allow for complete compilation since the required jars are not available.


Sep 06, 2017 12:17:12 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet ValidateServiceability-callServiceJersey as unavailable
Sep 06, 2017 12:17:12 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Allocate exception for servlet ValidateServiceability-callServiceJersey
java.lang.Error: Unresolved compilation problems:
The import com.sun.jersey cannot be resolved



This is the pom I am currently using, but I believe what needs to happen is that the app simulator needs to trigger the maven build.


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Prepaid</groupId>
<artifactId>Prepaid</artifactId>
<version>1.0.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>install</phase>
<configuration>
<tasks>
<ant antfile="C:\Users\mnorma001\Box Sync\My Documents\AvayaAnt\build.xml" dir="." target="deploy.project.war" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

<dependencies>

<dependency>
<groupId>serilogj</groupId>
<artifactId>serilogj</artifactId>
<version>0.3</version>
</dependency>

<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.19.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.16</version>
</dependency>
</dependencies>
</project>


Kirthika.Chandru
Joined: Feb 18, 2014
Messages: 50
Offline
Can any one provide Avaya build.xml, while create POM.xml classes folder not getting included. need list of repo to be used to downloans the Avaya dependencies
Reegz
Joined: Dec 3, 2019
Messages: 24
Offline
There's an option within OD to save the generated build.xml file.

You can find this option during the export phase. Ensure that you tick the highlighted check box.

Please also comment on whether you achieve success in porting to Maven as this is something we would like to do as well to ensure our OD projects are in alignment with the rest of our code base.
  • [Thumb - OD-Build-XML.png]
[Disk] Download
Go to:   
Mobile view