我刚刚创建了一个Java项目.我想在SVNKit的帮助下将此项目签到SVN位置.
我使用下面的代码,它将一个文件夹添加到SVN存储库.但它没有.svn在文件夹中创建任何文件夹/Users/test/svnAddDirCheck.
我希望文件被取消,并且我希望将来提交一些更改的文件.没有查看源代码,我该怎么做?我可以在SVN中添加这些文件,还可以直接提交任何更改的文件?
@Test
public void importWholeDir() throws Exception {
try {
DAVRepositoryFactory.setup();
SVNRepositoryFactoryImpl.setup();
FSRepositoryFactory.setup();
String svnUrl = "https://abc.com/svn/repos/projects/test/CREATE2";
File dir = new File("/Users/test/svnAddDirCheck");
SVNURL url = SVNURL.parseURIDecoded(svnUrl);
String userName = "XXXXXXX";
String userPassword = "XXXXXXXXX";
importDirectoryContentToSubversion(svnUrl, dir.getPath(), userName, userPassword, "directory and file added");
} catch (Exception e) {
e.printStackTrace();
}
}
public static SVNCommitInfo importDirectoryContentToSubversion(final String repositoryURL, final String subVersionedDirectory, final String userName, final String hashedPassword, final String commitMessage) throws SVNException {
final SVNClientManager cm …Run Code Online (Sandbox Code Playgroud) 我将jasper报告版本从4.5.0 升级到5.1.0.当我安装我的插件时,它会抛出错误,就像缺少某些依赖项一样.我想用Maven配置JasperReports 5.1.0.
Execution default of goal org.codehaus.mojo:jasperreports-maven-plugin:1.0-beta-2:compile-reports failed: Plugin org.codehaus.mojo:jasperreports-maven-plugin:1.0-beta-2 or one of its dependencies could not be resolved: Failure to find com.lowagie:itext:jar:2.1.7.js2
Run Code Online (Sandbox Code Playgroud)
我有两个问题.
1)我想知道什么是所有的依赖,我必须要在POM添加使用碧玉报告5.1.0.
2)我使用下面的插件将我的jrxml文件编译为jasper文件.我在这个插件中看到了这个问题.这个插件可能是什么问题.我应该添加任何镜子吗?
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<version>1.0-beta-2</version>
Run Code Online (Sandbox Code Playgroud)
我的完整pom是,jasper报告可能还有额外的依赖关系,我将其用于我的内部目的.
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.plugins</groupId>
<artifactId>report-test-plugin</artifactId>
<version>2.2.1.1001-SNAPSHOT</version>
<packaging>jar</packaging>
<name>report-test-plugin</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${maven-artifact.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>${maven-artifact-manager.version}</version>
</dependency> …Run Code Online (Sandbox Code Playgroud) 是否有任何开源库可以使用java解析junit xml并获取testuite名称所执行的信息,对应于测试套件的测试用例,失败次数和成功次数?我刚看到junit样式报表工具,是否有任何开源库可以在java中获取这些信息.
我想知道,如何使用webservice检查jenkins是否完全正常运行?
我想用jenkins webservice来检查这个.有没有办法做到这一点?
谢谢.
在JqueryUI可排序中,当用户拖动项目时,更改名为的事件.我在下面的例子中得到了这个.
stop: function(event, ui) {
console.log("New position: " + ui.item.index());
},
change: function(event, ui) {
// When the item postion is changed while dragging a item, I want it's position
console.log("New position: " + ui.item.index());
}
Run Code Online (Sandbox Code Playgroud)
在我的代码中当用户拖动项目(Item7)并更改位置时,拖动项目并更改位置.我想获得一个拖动项目的位置.
我刚看到答案:jQuery UI可排序位置
在上面的链接中,在停止功能上访问位置值(ui.item.index()),在拖动项目时,我想要它的位置(在更改功能上)?任何的想法 ?
我需要这个,因为当用户试图在item2之后放置一个item7时,我会做一些验证从前一个Item2获取值(如果我知道拖动项目的当前位置,那么只有我可以访问前一个项目).如果验证成功,可以放置它或者我必须显示一些消息.
当我使用查询
var NewMatchs = (from x in entity.matches select x).LastOrDefault();
Run Code Online (Sandbox Code Playgroud)
我得到这样的错误
LINQ to Entities无法识别方法'SocialSports.Models.match LastOrDefaultmatch'方法,并且此方法无法转换为商店表达式.
我的代码有什么问题???
谢谢...
我使用hudson.cli.CLI jar创建 Jenkins 工作。我在“构建后步骤”部分选择了“归档工件”选项。它在每次成功构建时存档工件。我正在使用jenkins 远程访问 api来获取有关工作的详细信息。并获取有关构建的详细信息。 http://localhost:8080/job/job_name/api/jsonhttp://localhost:8080/job/job_name/job_number/api/json
当我删除构建时,不会删除相应的存档工件。我想确保它们被删除。
当我使用 jenkins 远程访问 apihttp://localhost:8080/job/[job_name]/[job_number]/api/json进行构建时,它返回 json 数据,其中包含所有先前存档的工件(其他成功的构建工件)以及此(运行构建)构建工件。我如何获得构建的相关工件(成功的构建应该返回其工件,而不是所有以前成功的工件)。任何建议或想法?
我通过java 使用jenkins和hudson cli.我想在每次构建之前清理一个特定的目录.任何的想法 ?我提供了maven命令清理包,它清理每个构建的目标文件夹.我想要的是我想在每次构建之前清理一些其他目录.这该怎么做 ?
在jenkins中,我指定了maven项目的URL,在构建时将文件下载到工作区.当我提供干净的包命令时,它会在每次构建时清除目标文件夹.还有另一个与目标文件夹并行的文件夹.我想明确的是文件夹,这是Maven的项目中.
我正在使用以下代码从github中检出一个存储库。
private String url = "https://github.com/organization/project.git";
Git repo = Git.cloneRepository().setURI(url).setDirectory(directory).setCloneAllBranches(true).call();
for (Ref b : repo.branchList().call()) {
System.out.println("(standard): cloned branch " + b.getName());
}
Run Code Online (Sandbox Code Playgroud)
我正在使用代码
Git git = Git.open(checkout); //checkout is the folder with .git
git.pull().call(); //succeeds
Run Code Online (Sandbox Code Playgroud)
如果我去支店
Git git = Git.open(new File(checkout)); //checkout is the folder with .git
System.out.println(git.getRepository().getFullBranch());
CheckoutCommand checkout = git.checkout();
Ref call = checkout.setName("kalees").call();
Run Code Online (Sandbox Code Playgroud)
引发org.eclipse.jgit.api.errors.RefNotFoundException:引用kalees无法解析。
这是什么问题,如果我指定“ master”而不是“ kalees”,它可以正常工作。结帐特定分支我应该怎么做?
如果我使用代码
git.checkout().setCreateBranch(true).setName("refs/remotes/origin/kalees");
Run Code Online (Sandbox Code Playgroud)
它签出kalees分支。但是当我做拉动操作时
git.pull().call();
Run Code Online (Sandbox Code Playgroud)
它抛出org.eclipse.jgit.api.errors.DetachedHeadException:HEAD被分离。这是结帐问题还是出库问题,可能是什么?
我正在创建一个数据库连接,并在多个线程(大约 100 到 1000 个线程)之间共享它,我收到如下错误,
1)我的代码有什么问题?
这是我的示例代码,我将针对以下场景更改此代码: 基于一些 SQL 结果,它将创建最多 1000 个线程。 如果我为每个线程创建数据库连接,它将创建更多的数据库连接。为了避免这种情况,我在所有线程中使用了相同的数据库连接,我只有插入和更新操作。
2)这种多线程场景有没有更好的方法?
错误:
Worker: 0
Create Notification called for userid abcxyz and message is Test Message : Worker: 0 Attempt: 0
Sleeping ...
Worker: 1
Create Notification called for userid abcxyz and message is Test Message : Worker: 1 Attempt: 0
Partial insertedID 43
Traceback (most recent call last):
File "T:\work\Testing\src\notification_data_feeder.py", line 58, in createNotification
db.commit()
OperationalError: (2006, 'MySQL server has gone away')
Error on createNotification
Traceback (most …Run Code Online (Sandbox Code Playgroud) python multithreading mysql-python threadpool python-multithreading
hudson ×3
jenkins ×3
java ×2
api ×1
asp.net-mvc ×1
build ×1
github ×1
integration ×1
jgit ×1
jobs ×1
jquery ×1
jquery-ui ×1
junit ×1
linq ×1
mysql-python ×1
python ×1
report ×1
svn ×1
svnkit ×1
threadpool ×1
xml ×1
xml-parsing ×1