我想用Maven结账项目.但是由于此错误,我无法使用Subclipse设置我的Maven配置:
Operation details
Cannot complete the install because one or more required items could not be found.
Software being installed: Maven SCM handler for Subclipse 0.13.0.201303011221 (org.sonatype.m2e.subclipse.feature.feature.group 0.13.0.201303011221)
Missing requirement: Maven SCM Handler for Subclipse 0.13.0.201303011221 (org.sonatype.m2e.subclipse 0.13.0.201303011221) requires 'bundle org.tigris.subversion.subclipse.core [1.6.0,1.9.0)' but it could not be found
Cannot satisfy dependency:
From: Maven SCM handler for Subclipse 0.13.0.201303011221 (org.sonatype.m2e.subclipse.feature.feature.group 0.13.0.201303011221)
To: org.sonatype.m2e.subclipse [0.13.0.201303011221]
Run Code Online (Sandbox Code Playgroud)
我尝试过的事情
更多细节
版本信息用于Web开发人员的Eclipse Java EE IDE.版本:Kepler Service Release 1 Build id:20130919-0819
我目前安装的插件是:Subclipse 1.10.3 SonarQube …
我想接受的社会安全号码是:
xxx-xx-xxxx (ex. 123-45-6789)
xxxxxxxxx (ex. 123456789)
xxx xx xxxx (ex. 123 45 6789)
Run Code Online (Sandbox Code Playgroud)
我不是正则表达式专家,但我写了这个(它有点难看)
^(\d{3}-\d{2}-\d{4})|(\d{3}\d{2}\d{4})|(\d{3}\s{1}\d{2}\s{1}\d{4})$
Run Code Online (Sandbox Code Playgroud)
然而,当它实际上应该失败时,这个社会安全号码会通过,因为只有一个空格
12345 6789
Run Code Online (Sandbox Code Playgroud)
所以我需要一个更新的正则表达式,拒绝像这样的东西
12345 6789
123 456789
Run Code Online (Sandbox Code Playgroud)
为了使事情变得更复杂,似乎SSN不能以000或666开始并且可以达到899,第二和第三组数字也不能全部为0.
我想出了这个
^(?!000|666)[0-8][0-9]{2}[ \-](?!00)[0-9]{2}[ \-](?!0000)[0-9]{4}$
Run Code Online (Sandbox Code Playgroud)
哪个用空格或破折号验证,但如果数字是这样的话,它就会失败
123456789
Run Code Online (Sandbox Code Playgroud)
理想情况下,这些SSN应该通过
123456789
123 45 6789
123-45-6789
899-45-6789
001-23-4567
Run Code Online (Sandbox Code Playgroud)
这些都应该失败
12345 6789
123 456789
123x45x6789
ABCDEEEEE
1234567890123
000-45-6789
123-00-6789
123-45-0000
666-45-6789
Run Code Online (Sandbox Code Playgroud) 我正在尝试删除X个月以上的git标签
我们有需要保留的发行标签,它们都标记release-*在* = date
我知道如何删除单数标签 git push origin :refs/tags/<tagName>
所以我推断出要删除所有远程标签
git ls-remote --tags origin | xargs git push origin :$1
要跳过我计划使用的发布标签,请使用egrep -v以下命令
git ls-remote --tags origin | egrep -v "(^\*|release*)" | xargs git push origin :$1
但是我至今还没有弄清楚如何做到这一点。
我可以在本地按日期排序,例如,git for-each-ref --sort=taggerdate --format '%(refname)' refs/tags | egrep -v "(^\*|release*)"但这对远程标记没有帮助。
如果有帮助,我不介意删除或不删除本地标签以删除远程标签。
最后,如果它提供了更好的清除方法,我们将使用gitlab?
无论如何,这都需要通过Jenkins像脚本一样运行,以帮助满足git清理的需要。
更新资料
因为我们有成千上万个git标签,所以我意识到xargs将会变得非常慢。
我相信删除的方式更有可能是
git push origin $(< git tag | <sorting_by_date + exclude release> \
| sed -e 's/^/:/' | paste -sd " …
我有一个方法返回一个多行的字符串.我想解析String并得到每行的第一个单词.
方法getText()返回:
Lorem ipsum dolor
sit amet odio
magnis vitae iaculis
Run Code Online (Sandbox Code Playgroud)
我只想得到
Lorem
sit
magnis
Run Code Online (Sandbox Code Playgroud)
我目前的代码是
def projectString = getText()
def projects = projectString.substring(0, projectString.indexOf(' '))
Run Code Online (Sandbox Code Playgroud)
当然,这只会得到第一行的第一个字.我可以在字符串上使用while循环基于新行,并使用substring上面的方法获得第一个单词,但我感觉Groovy有一种更加流行的方式.
最初我正在考虑在方法调用结果上使用管道,就像这样
def projects = getText() | sh "awk '{print $1}'"
Run Code Online (Sandbox Code Playgroud)
但我无法让它发挥作用.