我有一个jazz构建服务器,我用来使用提供的ant脚本构建我的应用程序。构建在我们的AIX构建服务器上运行良好。但是,我迁移到运行z / Linux的另一台服务器,并且不会加载该应用程序。
我比较了两个wlapp文件,它们之间只有一个区别。
在AIX(工作)上,index.html中出现以下代码:
<script>
// Define WL namespace.
var WL = WL ? WL : {};
/**
* WLClient configuration variables.
* Values are injected by the deployer that packs the gadget.
*/
在z / Linux(不工作)上,以下代码出现在index.html 中
<script>
// Define WL namespace.
var WL = WL ? WL : {};
/**
* WLClient configuration variables.
* Values are injected by the deployer that packs the gadget.
*/
这部分代码由worklight ant任务注入。这不是我们的代码。
有什么建议吗?
答案 0 :(得分:0)
再次尝试:
wslnx029:/home/wl # cat build.xml
<project basedir="." name="build-tools" default="build-application">
<taskdef resource="com/worklight/ant/defaults.properties">
<classpath>
<pathelement location="/home/wl/worklight-ant-builder-6.1.0.jar" />
</classpath>
</taskdef>
<target name="build-application">
<app-builder applicationfolder="/home/wl/proj6101/apps/app6101"
worklightserverhost="http://localhost:9080/worklight"
outputfolder="/home/wl/proj6101/bin"/>
</target>
</project>
wslnx029:/home/wl # ./apache-ant-1.7.1/bin/ant -verbose
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.6 in: /home/wl/ibm-java-s390x-60/jre
Detected OS: Linux
parsing buildfile /home/wl/build.xml with URI = file:/home/wl/build.xml
Project base dir set to: /home/wl
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Build sequence for target(s) `build-application' is [build-application]
Complete build sequence is [build-application, ]
build-application:
[echo] Worklight Ant Task version 6.1.0.01.20140801-1626
[app-builder] Aug 4, 2014 9:43:19 AM com.worklight.builder.sourcemanager.handlers.android.AndroidManifestSourceHandler checkBuildTarget
[app-builder] WARNING: FWLST1119W: Android build will fail because the API level used to compile the project is not supported by the Worklight Studio.
[app-builder] It is recommended to use Android API level 18 which is the latest API level supported by the Worklight Studio. Use the Android SDK Manager to install API level 18, configure your project to build with API level 18 by updating the Project Build Target in Project / Properties / Android dialog.
[app-builder] Aug 4, 2014 9:43:19 AM com.worklight.ant.builders.ApplicationBuilderTask execute
[app-builder] SUCCESS: FWLST2001I: Successfully built environments: [android, common]
BUILD SUCCESSFUL
Total time: 1 second
这是生成的HTML部分:
<script>
// Define WL namespace.
var WL = WL ? WL : {};
/**
* WLClient configuration variables.
* Values are injected by the deployer that packs the gadget.
*/
WL.StaticAppProps = {
"APP_DISPLAY_NAME": "app6101",
"APP_ID": "app6101",
"APP_SERVICES_URL": "\/apps\/services\/",
"APP_VERSION": "1.0",
"ENVIRONMENT": "android",
"LOGIN_DISPLAY_TYPE": "embedded",
"WORKLIGHT_NATIVE_VERSION": "3180588129",
"WORKLIGHT_PLATFORM_VERSION": "6.1.0.01.20140716-1751",
"WORKLIGHT_ROOT_URL": "\/apps\/services\/api\/app6101\/android\/"
};</script>