-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to Use Jar as a Library Bundled in Other Tools (#113)
* Changes and improvements to make this jar make sense to be callable as a library. * Delay initial report or progress. * Expose duration via MirrorStats * Up version number * Created separate profile for uberjar so default can be used for regular jar
- Loading branch information
Showing
20 changed files
with
224 additions
and
72 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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@echo off | ||
java -Ds3s3mirror.version=2.1.4 -jar target/s3s3mirror-2.1.4-SNAPSHOT.jar %* | ||
java -Ds3s3mirror.version=2.1.5 -jar target/s3s3mirror-2.1.4-SNAPSHOT.jar %* |
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
17 changes: 17 additions & 0 deletions
17
src/main/java/org/cobbzilla/s3s3mirror/BucketMirrorMaker.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,17 @@ | ||
package org.cobbzilla.s3s3mirror; | ||
|
||
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain; | ||
import org.cobbzilla.s3s3mirror.stats.MirrorStats; | ||
|
||
public class BucketMirrorMaker { | ||
|
||
public MirrorStats makeCopy(MirrorOptions options) { | ||
options.initDerivedFields(); | ||
options.setAwsCredentialProviders(new DefaultAWSCredentialsProviderChain()); | ||
|
||
MirrorContext context = new MirrorContext(options); | ||
MirrorMaster mirrorMaster = new MirrorMaster(context); | ||
|
||
return mirrorMaster.mirror(); | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package org.cobbzilla.s3s3mirror; | ||
|
||
public interface KeyJob extends Runnable { | ||
|
||
String getSource(); | ||
String getDestination(); | ||
} |
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
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
Oops, something went wrong.