我连接到Unix服务器,我试图通过FTP删除其中dir包含多个文件的目录.如果我使用
dir
我明白了
dir
我用的时候
ftp> delete dir/*
Run Code Online (Sandbox Code Playgroud)
我还是得到的
dir
当我尝试
ftp> prompt off
Interactive mode off.
ftp> mdelete dir/*
Run Code Online (Sandbox Code Playgroud)
我被提示输入每个文件.
如何在不提示每个文件的情况下轻松删除/ emptyAndDelete目录?
/谢谢
我正在尝试使用Mac OSX开始为Jenkins开发插件.
首先,当我运行'mvn hpi:create'时,下载所有文件需要相当长的时间,每个文件最多需要几分钟.这是很多文件.总时间是4-5小时!为什么这么慢?
然后,当我运行'mvn package'时,我收到此错误:
[ERROR]
[ERROR] The project org.sample.jenjondev:firstplugin:1.0-SNAPSHOT
(/Users/jonatanekstedt/Developer/jenkins/firstplugin/pom.xml) has 1 error
[ERROR] Unknown packaging: hpi @ line 12, column 14
Run Code Online (Sandbox Code Playgroud)
为什么maven不知道hpi?我使用Maven 3.0.4.
这是我的pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.448</version><!-- which Jenkins version is this plugin
built against? -->
</parent>
<groupId>org.sample.jenjondev</groupId>
<artifactId>firstplugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<repositories>
<repository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</project>
Run Code Online (Sandbox Code Playgroud)
我已将Jenkins的<version>更改为我的计算机上的版本,1.448.我该如何解决这个错误?
我正在使用Ruby开发一个Jenkins插件.您应该能够配置连接到服务器的每个节点,以便在节点失去与主服务器的连接时将电子邮件发送到指定的地址.EmailNodeProperty添加一个字段以输入电子邮件地址:
#
# Save an email property for every node
#
class EmailNodeProperty < Jenkins::Slaves::NodeProperty
require 'java'
import 'hudson.util.FormValidation'
display_name "Email notification"
attr_accessor :email
def initialize(attrs = {})
@email = attrs['email']
end
def doCheckEmail value
puts " ENP.doCheckEmail:#{value}"
end
end
Run Code Online (Sandbox Code Playgroud)
配置节点时,会有一个名称email,您可以在其中输入电子邮件地址.我希望在您输入地址时验证此字段.
保存配置时,EmailNodeProperty会创建一个(可以访问)电子邮件地址.
MyComputerListener的offline当一个节点的连接丢失,被称为:
class MyComputerListener
include Jenkins::Slaves::ComputerListener
include Jenkins::Plugin::Proxy
def online(computer, listener)
end
def offline(computer)
#Do nothing when the Master shuts down
if computer.to_s.match('Master') == nil
list = computer.native.getNode().getNodeProperties()
proxy = …Run Code Online (Sandbox Code Playgroud) 在用Vim打开的文本文件中,我试图匹配两个字符串DRIVER_ACTIVITY和DriverGroup的出现,其间有任意数量的行:
2013-07-01 05:06:23,801 DRIVER_ACTIVITY
2013-07-01 05:06:23,804 text
2013-07-01 05:06:23,804 more text
2013-07-01 05:06:23,805 DriverGroup
Run Code Online (Sandbox Code Playgroud)
使用:
/DRIVER_ACTIVITY(.*)DriverGroup/s
/DRIVER_ACTIVITY((.|\n|\r)*)DriverGroup
/\vDRIVER_ACTIVITY((.|\n|\r)*)DriverGroup
/DRIVER_ACTIVITY\[\S\s\]*DriverGroup
Run Code Online (Sandbox Code Playgroud)
什么都不匹配.如何匹配所有行/新行?