This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEXUS-3056: added task and some cleanups.
git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/trunk/nexus@5705 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
- Loading branch information
cstamas
committed
Dec 10, 2009
1 parent
4805750
commit 6cab966
Showing
3 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...e-plugins/nexus-buup-plugin/src/main/java/org/sonatype/nexus/buup/BundleDownloadTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package org.sonatype.nexus.buup; | ||
|
||
import java.io.File; | ||
|
||
import org.codehaus.plexus.component.annotations.Component; | ||
import org.sonatype.nexus.scheduling.AbstractNexusTask; | ||
import org.sonatype.scheduling.SchedulerTask; | ||
|
||
@Component( role = SchedulerTask.class, hint = "BundleDownloadTask", instantiationStrategy = "per-lookup" ) | ||
public class BundleDownloadTask | ||
extends AbstractNexusTask<Object> | ||
{ | ||
private boolean successful; | ||
|
||
private File targetDirectory; | ||
|
||
public boolean isSuccessful() | ||
{ | ||
return successful; | ||
} | ||
|
||
public File getTargetDirectory() | ||
{ | ||
return targetDirectory; | ||
} | ||
|
||
public void setTargetDirectory( File targetDirectory ) | ||
{ | ||
this.targetDirectory = targetDirectory; | ||
} | ||
|
||
@Override | ||
protected Object doRun() | ||
throws Exception | ||
{ | ||
// downloads bundle from somewhere (from where?) | ||
// checks it's checksum (similar is applied as to maven artifacts) | ||
// unzip it to targetDirectory | ||
|
||
return null; | ||
} | ||
|
||
@Override | ||
protected String getAction() | ||
{ | ||
return "BUUP"; | ||
} | ||
|
||
@Override | ||
protected String getMessage() | ||
{ | ||
return "Downloading bundle for OneClickUpgrade"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters