【问题标题】:i am getting an error while using app bundler in ant在 ant 中使用 app bundler 时出现错误
【发布时间】:2013-02-19 07:53:53
【问题描述】:

当我要在 ant 中使用 app bundler 创建 .app 文件时,会出现以下错误:

/Users/vijaygupta/NetBeansProjects/Screen Grabber/build.xml:14: Problem: failed to create task or type bundleapp
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

我的 build.xml 文件是:

<?xml version="1.0" encoding="UTF-8"?>
<project name="Screen_Project" default="default" basedir=".">        
<import file="nbproject/build-impl.xml"/>

<taskdef name="Screen_Project"
         classname="com.oracle.appbundler.AppBundlerTask"   
         classpath="lib/appbundler-1.0.jar" />

<target name="ScreenProject">
    <bundleapp outputdirectory="dist"
        name="ScreenProject"
        displayname="ScreenGrabber"
        identifier="Main.MainIconPage"
        mainclassname="Main.MainIconPage">
        <classpath file="dist/Screen_Project.jar" />
    </bundleapp>
</target>

</project>

【问题讨论】:

    标签: java macos ant app-bundle


    【解决方案1】:

    问题是您的 build.xml 不包含 bundleapp 标签的 taskdef。从上面的示例中可以清楚地看出,您已将其更改为 Screen_Project,您只需将 taskdef 替换为:

    <taskdef name="bundleapp"
         classname="com.oracle.appbundler.AppBundlerTask"   
         classpath="lib/appbundler-1.0.jar" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-27
      • 2019-03-23
      • 1970-01-01
      • 2013-06-19
      • 1970-01-01
      • 2020-12-15
      • 1970-01-01
      相关资源
      最近更新 更多