繁体   English   中英

从命令行编译 vaadin widgetset

[英]Compile vaadin widgetset from command line

在 Eclipse 中有一个 vaadin 插件。 在此处输入图片说明

当在您的项目中标记*.wi​​dgetset文件并单击Compile vaading widgetset 时,它会编译 WebContent\\VAADIN\\widgetsets 下的 widgetset。 所以我的问题是如何在没有 Eclipse 的情况下从命令行执行此操作? 请注意:我已经搜索过,但有 maven 的例子。 这是旧项目,其中没有 maven 配置

您没有说您使用的是哪个 Vaadin 版本,但至少在 Vaadin7 中的编译器类似乎是这样的: https ://vaadin.com/api/framework/7.6.8/com/vaadin/tools/WidgetsetCompiler.html

不确定命令行,但我有这种用于 Vaadin7 的 ANT 脚本,也许它会有所帮助:

<target name="compile-widgetset" depends="init,resolve">
    <delete includeEmptyDirs="true">
        <fileset dir="${basedir}/WebContent/VAADIN/gwt-unitCache/" includes="**/*" defaultexcludes="no"/>
    </delete>
    <java classname="com.vaadin.tools.WidgetsetCompiler" failonerror="yes" fork="yes" maxmemory="600m">     
        <jvmarg value="-Xms512M"/>
        <jvmarg value="-Xmx1024M"/>
        <jvmarg value="-Xss8M"/>
        <jvmarg value="-Djava.awt.headless=true" />
        <arg value="-war"/>
        <arg value="WebContent/VAADIN/widgetsets"/>
        <arg value="${widgetset}"/>
        <arg value="-logLevel"/>
        <arg value="DEBUG"/>
        <arg value="-style"/>
        <arg value="OBF"/>

        <classpath>         
            <pathelement path="${module.src.dir}"/>
            <pathelement path="${module.build.dir}/WebContent/WEB-INF/classes" />
            <pathelement path="${module.build.dir}/WebContent/WEB-INF/lib" />
            <path refid="widgetset.path"/>
        </classpath>
    </java>
</target>

编译说明: https : //vaadin.com/docs/v7/framework/clientside/clientside-compiling.html

我想出了使用这个网址

https://github.com/canthony/simple-vaadin-7-compile-widgetset-ivy

我只添加了清单标签以在META-INF/MANIFEST.MF文件中包含依赖项

<war destfile="${artifacts}/${warfilename}"
     basedir="${workdir}"
     webxml="${webroot}/WEB-INF/web.xml"
    >
  <manifest>
    <attribute name="Dependencies" value="org.jboss.xnio, org.hibernate"/>
  </manifest>

  <lib dir="${webroot}/WEB-INF/lib" erroronmissingdir="no">
    <include name="*.jar"/>
  </lib>
  <lib dir="${libraries}" erroronmissingdir="no">
    <include name="*.jar"/>
  </lib>
</war>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM