无法使用MFP v7中的适配器构建器任务(ANT)编译Java适配器

时间:2015-06-11 01:44:32

标签: java ant ibm-mobilefirst mobilefirst-adapters

我们一直在使用适配器构建器任务(com.worklight.ant.builders.AdapterBuilderTask)来编译我们的MFP适配器数周。我们刚开始在MFP应用程序中采用Java适配器,但我们无法使用适配器构建器任务编译它们。

查看输出中的编译错误,似乎适配器构建器任务没有正确的编译类路径;它可能缺少worklight-jee-library.jar。

这是一个已知问题吗?有没有可用的修复程序?以下是使用适配器构建器任务进行编译时获得的输出:

$ gradle -b build-mfp.gradle deployMFPNativeProject -PmfpProjectFolder=/Users/olivieri/git/Ready.App.5.Loyalty/LoyaltyReadyApp -PoutputFolder=/Users/olivieri/tmp -PmfpServerURL=http://localhost:8080 -PiOSProjectFolder=/Users/olivieri/git/Ready.App.5.Loyalty/LoyaltyReadyAppiOS -PmfpHybridFlag=false
MFP CLI path: /Applications/IBM/MobileFirst-CLI
Path to ant builder JAR: /Applications/IBM/MobileFirst-CLI/public/worklight-ant-builder.jar
MFP project folder: /Users/olivieri/git/Ready.App.5.Loyalty/LoyaltyReadyApp
outputFolder: /Users/olivieri/tmp
MFP server: http://localhost:8080
MFP project name: LoyaltyReadyApp
MFP apps folder: /Users/olivieri/git/Ready.App.5.Loyalty/LoyaltyReadyApp/apps
:deriveProperties UP-TO-DATE
:loadAntTasks UP-TO-DATE
:buildMFPArtifacts
[ant:war-builder] Ignoring contents of 'server/java' folder. To include this folder, set the 'compileJava' property to true. 
mfpHybridFlag: false
About to build native app named: Loyalty
Adapters found.
About to build adapter named: LoyaltyUserAdapter
[ant:echo] Worklight Ant task version 7.0.0.00.20150608-1356
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterApplication.java:11: error: package com.worklight.wink.extensions does not exist
[ant:adapterBuilder] import com.worklight.wink.extensions.MFPJAXRSApplication;
[ant:adapterBuilder]                                     ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterApplication.java:13: error: cannot find symbol
[ant:adapterBuilder] public class LoyaltyUserAdapterApplication extends MFPJAXRSApplication{
[ant:adapterBuilder]                                                    ^
[ant:adapterBuilder]   symbol: class MFPJAXRSApplication
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:13: error: package javax.ws.rs does not exist
[ant:adapterBuilder] import javax.ws.rs.GET;
[ant:adapterBuilder]                   ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:14: error: package javax.ws.rs does not exist
[ant:adapterBuilder] import javax.ws.rs.Path;
[ant:adapterBuilder]                   ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:15: error: package javax.ws.rs does not exist
[ant:adapterBuilder] import javax.ws.rs.PathParam;
[ant:adapterBuilder]                   ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:16: error: package javax.ws.rs does not exist
[ant:adapterBuilder] import javax.ws.rs.Produces;
[ant:adapterBuilder]                   ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:17: error: package javax.ws.rs.core does not exist
[ant:adapterBuilder] import javax.ws.rs.core.MediaType;
[ant:adapterBuilder]                        ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:19: error: package org.apache.commons.codec.binary does not exist
[ant:adapterBuilder] import org.apache.commons.codec.binary.Base64;
[ant:adapterBuilder]                                       ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:20: error: package org.apache.http does not exist
[ant:adapterBuilder] import org.apache.http.HttpHost;
[ant:adapterBuilder]                       ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:21: error: package org.apache.http does not exist
[ant:adapterBuilder] import org.apache.http.HttpResponse;
[ant:adapterBuilder]                       ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:22: error: package org.apache.http does not exist
[ant:adapterBuilder] import org.apache.http.HttpStatus;
[ant:adapterBuilder]                       ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:23: error: package org.apache.http.client.methods does not exist
[ant:adapterBuilder] import org.apache.http.client.methods.HttpPost;
[ant:adapterBuilder]                                      ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:24: error: package org.apache.http.client.methods does not exist
[ant:adapterBuilder] import org.apache.http.client.methods.HttpUriRequest;
[ant:adapterBuilder]                                      ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:25: error: package org.apache.http.entity does not exist
[ant:adapterBuilder] import org.apache.http.entity.StringEntity;
[ant:adapterBuilder]                              ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:26: error: package org.apache.http.impl.client does not exist
[ant:adapterBuilder] import org.apache.http.impl.client.CloseableHttpClient;
[ant:adapterBuilder]                                   ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:27: error: package org.apache.http.impl.client does not exist
[ant:adapterBuilder] import org.apache.http.impl.client.HttpClients;
[ant:adapterBuilder]                                   ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:28: error: package org.apache.http.util does not exist
[ant:adapterBuilder] import org.apache.http.util.EntityUtils;
[ant:adapterBuilder]                            ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:39: error: cannot find symbol
[ant:adapterBuilder] @Path("/")
[ant:adapterBuilder]  ^
[ant:adapterBuilder]   symbol: class Path
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:44: error: cannot find symbol
[ant:adapterBuilder]     private static CloseableHttpClient client;
[ant:adapterBuilder]                    ^
[ant:adapterBuilder]   symbol:   class CloseableHttpClient
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:45: error: cannot find symbol
[ant:adapterBuilder]     private static HttpHost host;
[ant:adapterBuilder]                    ^
[ant:adapterBuilder]   symbol:   class HttpHost
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:135: error: cannot find symbol
[ant:adapterBuilder]     private HttpPost getHttpPost() throws UnsupportedEncodingException {
[ant:adapterBuilder]             ^
[ant:adapterBuilder]   symbol:   class HttpPost
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:163: error: cannot find symbol
[ant:adapterBuilder]     private String execute(HttpUriRequest req) throws Exception {
[ant:adapterBuilder]                            ^
[ant:adapterBuilder]   symbol:   class HttpUriRequest
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/utils/JsonReader.java:19: error: package com.google.gson does not exist
[ant:adapterBuilder] import com.google.gson.JsonParser;
[ant:adapterBuilder]                       ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:68: error: cannot find symbol
[ant:adapterBuilder]     public ServerResponse<String> getUserData(@PathParam("phone_number") String phoneNumber, 
[ant:adapterBuilder]                                                ^
[ant:adapterBuilder]   symbol:   class PathParam
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:69: error: cannot find symbol
[ant:adapterBuilder]             @PathParam("locale") String locale){
[ant:adapterBuilder]              ^
[ant:adapterBuilder]   symbol:   class PathParam
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:65: error: cannot find symbol
[ant:adapterBuilder]     @GET
[ant:adapterBuilder]      ^
[ant:adapterBuilder]   symbol:   class GET
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:66: error: cannot find symbol
[ant:adapterBuilder]     @Path("/user-data/{phone_number}/{locale}")
[ant:adapterBuilder]      ^
[ant:adapterBuilder]   symbol:   class Path
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:67: error: cannot find symbol
[ant:adapterBuilder]     @Produces(MediaType.APPLICATION_JSON)
[ant:adapterBuilder]      ^
[ant:adapterBuilder]   symbol:   class Produces
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:105: error: cannot find symbol
[ant:adapterBuilder]     @GET
[ant:adapterBuilder]      ^
[ant:adapterBuilder]   symbol:   class GET
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:106: error: cannot find symbol
[ant:adapterBuilder]     @Path("/watson-data")
[ant:adapterBuilder]      ^
[ant:adapterBuilder]   symbol:   class Path
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:107: error: cannot find symbol
[ant:adapterBuilder]     @Produces(MediaType.APPLICATION_JSON)
[ant:adapterBuilder]      ^
[ant:adapterBuilder]   symbol:   class Produces
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterApplication.java:17: error: method does not override or implement a method from a supertype
[ant:adapterBuilder]     @Override
[ant:adapterBuilder]     ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterApplication.java:22: error: method does not override or implement a method from a supertype
[ant:adapterBuilder]     @Override
[ant:adapterBuilder]     ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterApplication.java:31: error: cannot find symbol
[ant:adapterBuilder]         return getClass().getPackage().getName();
[ant:adapterBuilder]                ^
[ant:adapterBuilder]   symbol:   method getClass()
[ant:adapterBuilder]   location: class LoyaltyUserAdapterApplication
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterApplication.java:27: error: method does not override or implement a method from a supertype
[ant:adapterBuilder]     @Override
[ant:adapterBuilder]     ^
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:114: error: cannot find symbol
[ant:adapterBuilder]             HttpPost httpPost = getHttpPost();
[ant:adapterBuilder]             ^
[ant:adapterBuilder]   symbol:   class HttpPost
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:137: error: cannot find symbol
[ant:adapterBuilder]         HttpPost httpPost = new HttpPost(watsonPath);
[ant:adapterBuilder]         ^
[ant:adapterBuilder]   symbol:   class HttpPost
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:137: error: cannot find symbol
[ant:adapterBuilder]         HttpPost httpPost = new HttpPost(watsonPath);
[ant:adapterBuilder]                                 ^
[ant:adapterBuilder]   symbol:   class HttpPost
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:140: error: cannot find symbol
[ant:adapterBuilder]             httpPost.setEntity(new StringEntity(watsonString));
[ant:adapterBuilder]                                    ^
[ant:adapterBuilder]   symbol:   class StringEntity
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:144: error: cannot find symbol
[ant:adapterBuilder]         httpPost.setHeader("Accept", MediaType.APPLICATION_JSON);
[ant:adapterBuilder]                                      ^
[ant:adapterBuilder]   symbol:   variable MediaType
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:149: error: cannot find symbol
[ant:adapterBuilder]         String encoding = Base64.encodeBase64String(creds.getBytes("UTF-8"));
[ant:adapterBuilder]                           ^
[ant:adapterBuilder]   symbol:   variable Base64
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:164: error: cannot find symbol
[ant:adapterBuilder]         client = HttpClients.createDefault();
[ant:adapterBuilder]                  ^
[ant:adapterBuilder]   symbol:   variable HttpClients
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:166: error: cannot find symbol
[ant:adapterBuilder]         host = new HttpHost(watsonHost, 443, "https");
[ant:adapterBuilder]                    ^
[ant:adapterBuilder]   symbol:   class HttpHost
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:168: error: cannot find symbol
[ant:adapterBuilder]         HttpResponse JSONResponse = client.execute(host, req);
[ant:adapterBuilder]         ^
[ant:adapterBuilder]   symbol:   class HttpResponse
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:169: error: cannot find symbol
[ant:adapterBuilder]         String message = EntityUtils.toString(JSONResponse.getEntity());
[ant:adapterBuilder]                          ^
[ant:adapterBuilder]   symbol:   variable EntityUtils
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/LoyaltyUserAdapterResource.java:171: error: cannot find symbol
[ant:adapterBuilder]         if (JSONResponse.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
[ant:adapterBuilder]                                                             ^
[ant:adapterBuilder]   symbol:   variable HttpStatus
[ant:adapterBuilder]   location: class LoyaltyUserAdapterResource
[ant:adapterBuilder] /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/AdapterBuilderTask1333430620761865396/src/com/ibm/mil/utils/JsonReader.java:81: error: cannot find symbol
[ant:adapterBuilder]                 contents = new JsonParser().parse(reader).toString();
[ant:adapterBuilder]                                ^
[ant:adapterBuilder]   symbol:   class JsonParser
[ant:adapterBuilder]   location: class JsonReader
[ant:adapterBuilder] 47 errors
:buildMFPArtifacts FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/olivieri/Development/eclipse-luna-workspaces/workspace-mil-common-assets/MIL_Common_Assets/gradle_assets/build-deploy-assets/build-mfp.gradle' line: 117

* What went wrong:
Execution failed for task ':buildMFPArtifacts'.
> Build of the adapter 'LoyaltyUserAdapter' failed. The failure message is: 'Compile failed; see the compiler error output for details.'. The failure may have been caused due to incorrect Java code, incompatible JDK level, JAVA_HOME not pointing to the location of a valid JDK or missing dependencies. Note that the worklight-jee-library.jar must be in the classpath when building Java adapters.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.726 secs
$ 

1 个答案:

答案 0 :(得分:2)

你错了JEE库。 可能是你没有在Ant任务中声明它吗?

请参阅此用户文档主题:Building applications and adapters&gt;构建适配器

构建不带libs的Java适配器

<path id="my.path">
  <pathelement path="/opt/IBM/Worklight/WorklightServer/worklight-jee-library.jar"/>
</path>

<adapter-builder
  folder="adapterRootFolder"
  destinationfolder="destination-folder"
  classpathref="my.path"/>

使用类路径中的server / lib和adapter / lib文件夹构建Java适配器

<path id="my.path">
  <pathelement path="/opt/IBM/Worklight/WorklightServer/worklight-jee-library.jar"/>
  <fileset dir="adapterRootFolder/lib">
    <include name="*.jar" />
  </fileset>
  <fileset dir="projectRootFolder/server/lib">
    <include name="*.jar" />
  </fileset>
</path>

<adapter-builder
  folder="adapterRootFolder"
  destinationfolder="destination-folder"
  classpathref="my.path"/>