首页 \ 问答 \ 为我的web项目使用ant build(Using ant build for my web project)

为我的web项目使用ant build(Using ant build for my web project)

我有我的个人网站,它几乎是静态的,只有几个动态服务器端代码实例。 使用Ant脚本构建项目是个好主意吗? 如果是,如何在Windows环境中执行此操作? 在阅读Html5BolilerPlate相关的构建脚本时 ,我想在H5BP上迁移并使用它们的脚本。 这是可取的吗?


I have my personal website and it is almost static with only a few instances of dynamic server-side code. Is it a good idea to build my project using Ant script? If yes, how to do it on an windows environment? While reading Html5BolilerPlate related build script,I thought to migrate on H5BP and use their script. Is that advisable?


原文:https://stackoverflow.com/questions/9339203
更新时间:2021-09-05 14:09

最满意答案

事实证明,创建一个只有一个字段的新记录类型模式并不困难 - 我想用作关键字段,就像我上面的例子:

{"name":"TestRecordKey", "type":"record", "fields":[
  {"name":"id", "type":"long"}
]}

我在运行时这样做,因为我使用有效负载模式初始化我的Schema.Parser - 我只是以编程方式基于有效负载模式创建密钥模式。

希望不那么长期的解决方案,但这是有效的。 我仍然会投票并接受任何更清洁的解决方案。


As it turns out, it wasn't that difficult just to create a new record-type schema with only one field -- the field I want to use as the key, like the example I have above:

{"name":"TestRecordKey", "type":"record", "fields":[
  {"name":"id", "type":"long"}
]}

I do it on the fly, as I initialize my Schema.Parser with the payload schemas -- I just create the key schema based on the payload schema programmatically.

Was hoping for a less long-hand solution, but this works. I'll still upvote and accept any solution that is cleaner.

相关问答

更多
  • record
  • 怀疑,问题实际上是以AvroStorage的方式使用。 用法是: a = LOAD'/ etl / out'USING org.apache.pig.builtin.AvroStorage('test',' - schemafile file:///etl/test.avsc') ,假设test.avsc在本地文件系统中。 保持hdfs中的avsc也应该可以工作,但我没有到处去测试。 我不确定为什么没有这些清晰的文档! As suspected, the issue is actually in the w ...
  • 根据文档( http://thedersen.com/projects/backbone-validation/#isvalid),isValid还接受属性名称(或属性名称数组)以验证各个字段: var modelValidUsername = this.model.isValid('username'); console.log('model username valid', modelValidUsername); var modelValidEmail = this.model.is ...
  • 您无法使用'。'设置内部值。 因此,您必须手动创建内部对象(emailAddresses)并将其设置为顶级记录的字段。 final GenericData.Record emailAddresses = new GenericData.Record(schema.getField("emailAddresses").schema()); emailAddresses.put("email", "sumit@gmail.com"); emailAddresses.put("address", true); a ...
  • 我不确定您使用的是哪个版本的FileMaker,或者您是否有权访问表结构,但如果您确实有访问权限并且使用的是最新版本(撰写本文时版本为13),则可以创建计算base64编码(Base64Encode函数)容器字段的字段。 我相信你可以在Swift中解码base64。 因此,不要将容器字段放在PHP正在访问的布局上,而是将此计算字段放在布局上。 那么你在PHP中需要做的就是回显base64字符串,所以应该一起处理你的步骤3,4和5。 希望有所帮助! I'm not sure which version of ...
  • 最后,我找到了答案和映射器代码如下。 我没有使用GenericData发出AvroKey,而是更改为发出GenericData.Record。 public static class AvroMapper extends Mapper, NullWritable, AvroKey, NullWritable> { @Override public void map(AvroKey ...
  • 事实证明,创建一个只有一个字段的新记录类型模式并不困难 - 我想用作关键字段,就像我上面的例子: {"name":"TestRecordKey", "type":"record", "fields":[ {"name":"id", "type":"long"} ]} 我在运行时这样做,因为我使用有效负载模式初始化我的Schema.Parser - 我只是以编程方式基于有效负载模式创建密钥模式。 希望不那么长期的解决方案,但这是有效的。 我仍然会投票并接受任何更清洁的解决方案。 As it turns ...
  • 您需要将输入值与base64解码的存储值进行比较,因此请稍微反转您的尝试以对存储的值调用FROM_BASE64()并与普通输入值进行比较。 如果编码,则无法比较$term的部分匹配,因为部分值永远不会产生与完整存储值相同或甚至相似的base64字符串。 SELECT * FROM `table` WHERE FROM_BASE64(`field`) LIKE '%$term%' 在这种情况下, $term是一个普通字符串,而不是base64编码。 当然建议$term是一个绑定参数,而不是连接到查询中的普通 ...
  • 乍一看,这似乎是对aws cli的巨大疏忽。 但是,深入了解CLI文档是如何在命令行上提供二进制数据的一个模糊。 http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-file 这确实对我有用...... aws s3 cp --sse-c AES256 --sse-c-key fileb://key.bin large_file s3://mybucket/ fileb://部分就是答案 A ...
  • 将它添加到Record中时不会失败,它在尝试序列化时会失败,因为它正在尝试匹配类型时。 据我所知,这是它进行类型检查的唯一地方。 It won't fail when adding it into the Record, it will fail when it tries to serialize because it is at that point when it is trying to match the type. As far as I'm aware that is the only pla ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)