По первому вопросу: мой подход был следующим: 1. Создайте папку lib для третьей библиотеки 2. Создайте скрипт, который добавляет в UIMACLASSPATH папку lib
@ set UIMA_CLASSPATH =% UIMA_CLASSPATH%; ../../lib;../../bin Вызовите deployAsyncService.cmd для второго вопроса: я использую плагин maven для генерации файла pear.
Выдержка из pom.xml (относится к maven)
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Copy the dependencies to the lib folder for the PEAR to
copy -->
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/lib</outputDirectory>
<overWriteSnapshots>true</overWriteSnapshots>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.uima</groupId>
<artifactId>PearPackagingMavenPlugin</artifactId>
<version>2.3.1</version>
<!-- if version is omitted, then -->
<!-- version is inherited from parent's pluginManagement section -->
<!-- otherwise, include a version element here -->
<!-- says to load Maven extensions (such as packaging and type
handlers) from this plugin -->
<extensions>true</extensions>
<executions>
<execution>
<configuration>
<classpath>
<!-- PEAR file component classpath settings -->
$main_root/lib/*.jar
</classpath>
<mainComponentDesc>
<!-- PEAR file main component descriptor -->
</mainComponentDesc>
<componentId>
<!-- PEAR file component ID -->
${project.artifactId}
</componentId>
<datapath>
<!-- PEAR file UIMA datapath settings -->
$main_root/
</datapath>
</configuration>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- Clean the libraries after packaging -->
<execution>
<id>CleanLib</id>
<phase>clean</phase>
<configuration>
<tasks>
<delete quiet="false" failOnError="false">
<fileset dir="${basedir}/lib" includes="**/*.jar" />
</delete>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>