Skip to content

Commit

Permalink
JENKINS-16426: back up only directorys in the job directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tofuatjava committed Jan 21, 2013
1 parent 9308ef1 commit cfe9e2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 24 additions & 1 deletion pom.xml
Expand Up @@ -111,6 +111,28 @@
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>1.409</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>1.409</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<distributionManagement>
<repository>
Expand All @@ -125,8 +147,9 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.0.0</version>
<executions>
<execution>
<id>default-testCompile</id>
Expand Down
Expand Up @@ -177,7 +177,7 @@ private void backupJobsDirectory(final File jobsDirectory, final File jobsBackup

for (final String jobName : jobNames) {
final File jobDirectory = new File(jobsDirectory, jobName);
if (jobDirectory.exists()) { // sub jobs e.g. maven modules need not be copied
if (jobDirectory.exists() && jobDirectory.isDirectory()) { // sub jobs e.g. maven modules need not be copied
if (jobDirectory.canRead()) {
File childJobsFolder = new File(jobDirectory, HudsonBackup.JOBS_DIR_NAME);
if (childJobsFolder.exists()) { // found CloudBeesFolder
Expand Down

0 comments on commit cfe9e2d

Please sign in to comment.