小编yan*_*yan的帖子

如何摆脱ESC [在Mac OS X Mavericks上使用git diff时的角色?

由于我安装了OS X Mavericks,该命令的结果git diff是渲染如下ESC[xxx字符:

ESC[1mdiff --git a/console/org.linkedin.glu.console-webapp/decorate-grails-methods-plugin/plugin.xml b/console/org.linkedin.glu.console-webapp/decorate-grails-methods-plugin/plugin.xmlESC[m
ESC[1mindex 3b65cf1..0ca5d7e 100644ESC[m
ESC[1m--- a/console/org.linkedin.glu.console-webapp/decorate-grails-methods-plugin/plugin.xmlESC[m
ESC[1m+++ b/console/org.linkedin.glu.console-webapp/decorate-grails-methods-plugin/plugin.xmlESC[m
ESC[36m@@ -15,14 +15,14 @@ESC[m ESC[mThe purpose of this plugin is to decorate various grails methods.ESC[m
Run Code Online (Sandbox Code Playgroud)

这用于在安装Mavericks之前正确呈现.我不知道有什么不同,所以任何帮助的故障排除将非常感激.

请注意,使用的寻呼机是less从我点击后h我得到以下内容:

             SUMMARY OF LESS COMMANDS

Commands marked with * may be preceded by a number, N.
Notes in parentheses indicate the behavior if N is given.
Run Code Online (Sandbox Code Playgroud)

git macos

47
推荐指数
4
解决办法
1万
查看次数

如何使用gradle中的maven ant任务?

我试图将一些工件发布到maven中央仓库并且由于当前版本的gradle(0.9-rc2)不处理pgp我以为我会尝试通过'移植'ant xml 版本同时等待gradle 1.0来尝试希望能够开箱即用.

我在gradle中写了以下内容:

def mvn = 
    groovy.xml.NamespaceBuilder.newInstance(ant, 'antlib:org.apache.maven.artifact.ant')

  mvn.mvn {
    arg(value: 'org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file')
    arg(value: '-Durl=file:///tmp/repo2')
    arg(value: '-DrepositoryId=sonatype-nexus-staging')
    arg(value: '-DpomFile=pom.xml')
    arg(value: '-Dfile=myjar.jar')
    arg(value: '-Dfile=-Pgpg')
  }
Run Code Online (Sandbox Code Playgroud)

不幸的是它没有用,我得到了这个:

Cause: Problem: failed to create task or type antlib:org.apache.maven.artifact.ant:mvn
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.
No types or tasks have been defined in this namespace yet
Run Code Online (Sandbox Code Playgroud)

我尝试了各种组合,包括在我的脚本顶部添加以下内容:

buildscript {
  repositories {
    mavenCentral() …
Run Code Online (Sandbox Code Playgroud)

groovy gradle maven

7
推荐指数
1
解决办法
1680
查看次数

如何使用动态查找器使用GORM排除某些列?

我有以下域对象:

 class DbDeployment 
 { 
   static constraints = { 
    startDate(nullable: false) 
    endDate(nullable: true) 
    username(nullable: true) 
    fabric(nullable: false) 
    description(nullable: true) 
    status(nullable: true) 
    details(nullable: true) 
   } 

   static mapping = { 
    columns { 
     details type: 'text' 
     } 
   } 

  Date startDate = new Date() 
  Date endDate 
  String username 
  String fabric 
  String description 
  String status 
  String details // xml representation of the plan 
} 
Run Code Online (Sandbox Code Playgroud)

我希望能够运行这样的查询:

DbDeployment.findAllByFabric("f1", params)
Run Code Online (Sandbox Code Playgroud)

但我想确保details不检索列(可能很大).

有没有办法做到这一点?

grails grails-orm

3
推荐指数
1
解决办法
1674
查看次数

标签 统计

git ×1

gradle ×1

grails ×1

grails-orm ×1

groovy ×1

macos ×1

maven ×1