-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73d3520
commit 916c1ea
Showing
188 changed files
with
9,683 additions
and
14,160 deletions.
There are no files selected for viewing
785 changes: 312 additions & 473 deletions
785
wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
Large diffs are not rendered by default.
Oops, something went wrong.
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,3 @@ | ||
package org.apache.maven.wagon; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
|
@@ -18,31 +16,27 @@ | |
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.maven.wagon; | ||
|
||
/** | ||
* Exception which should be thrown when a command fails to execute on the repository. | ||
* | ||
* @author <a href="[email protected]">Brett Porter</a> | ||
* | ||
*/ | ||
public class CommandExecutionException | ||
extends WagonException | ||
{ | ||
public class CommandExecutionException extends WagonException { | ||
|
||
/** | ||
* @see org.apache.maven.wagon.WagonException | ||
*/ | ||
public CommandExecutionException( String message ) | ||
{ | ||
super( message ); | ||
public CommandExecutionException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* @see org.apache.maven.wagon.WagonException | ||
*/ | ||
public CommandExecutionException( String message, Throwable cause ) | ||
{ | ||
super( message, cause ); | ||
public CommandExecutionException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
} |
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,3 @@ | ||
package org.apache.maven.wagon; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
|
@@ -18,19 +16,16 @@ | |
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.maven.wagon; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Brett Porter</a> | ||
* | ||
*/ | ||
public interface CommandExecutor | ||
extends Wagon | ||
{ | ||
public interface CommandExecutor extends Wagon { | ||
String ROLE = CommandExecutor.class.getName(); | ||
|
||
void executeCommand( String command ) | ||
throws CommandExecutionException; | ||
void executeCommand(String command) throws CommandExecutionException; | ||
|
||
Streams executeCommand( String command, boolean ignoreFailures ) | ||
throws CommandExecutionException; | ||
Streams executeCommand(String command, boolean ignoreFailures) throws CommandExecutionException; | ||
} |
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,3 @@ | ||
package org.apache.maven.wagon; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
|
@@ -18,6 +16,7 @@ | |
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.maven.wagon; | ||
|
||
/** | ||
* The exception is thrown when a connection | ||
|
@@ -26,25 +25,19 @@ | |
* @author <a href="[email protected]">Michal Maczka</a> | ||
* | ||
*/ | ||
public class ConnectionException | ||
extends WagonException | ||
{ | ||
|
||
public class ConnectionException extends WagonException { | ||
|
||
/** | ||
* @see org.apache.maven.wagon.WagonException | ||
*/ | ||
public ConnectionException( final String message ) | ||
{ | ||
super( message ); | ||
public ConnectionException(final String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* @see org.apache.maven.wagon.WagonException | ||
*/ | ||
public ConnectionException( final String message, final Throwable cause ) | ||
{ | ||
super( message, cause ); | ||
public ConnectionException(final String message, final Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
} |
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,3 @@ | ||
package org.apache.maven.wagon; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
|
@@ -18,39 +16,34 @@ | |
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import org.apache.maven.wagon.resource.Resource; | ||
package org.apache.maven.wagon; | ||
|
||
import java.io.InputStream; | ||
|
||
import org.apache.maven.wagon.resource.Resource; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Michal Maczka</a> | ||
* | ||
*/ | ||
public class InputData | ||
{ | ||
public class InputData { | ||
private InputStream inputStream; | ||
|
||
private Resource resource; | ||
|
||
public InputStream getInputStream() | ||
{ | ||
public InputStream getInputStream() { | ||
return inputStream; | ||
} | ||
|
||
public void setInputStream( InputStream inputStream ) | ||
{ | ||
public void setInputStream(InputStream inputStream) { | ||
this.inputStream = inputStream; | ||
} | ||
|
||
public Resource getResource() | ||
{ | ||
public Resource getResource() { | ||
return resource; | ||
} | ||
|
||
public void setResource( Resource resource ) | ||
{ | ||
public void setResource(Resource resource) { | ||
this.resource = resource; | ||
} | ||
|
||
} |
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,3 @@ | ||
package org.apache.maven.wagon; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
|
@@ -18,6 +16,7 @@ | |
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.maven.wagon; | ||
|
||
import java.io.File; | ||
import java.io.FileDescriptor; | ||
|
@@ -27,130 +26,94 @@ | |
import java.io.OutputStream; | ||
import java.nio.channels.FileChannel; | ||
|
||
|
||
/** | ||
* Variant of FileOutputStream which creates the file only when first portion | ||
* of data is written. | ||
* | ||
* @author <a href="mailto:[email protected]">Michal Maczka</a> | ||
* | ||
*/ | ||
public class LazyFileOutputStream | ||
extends OutputStream | ||
{ | ||
public class LazyFileOutputStream extends OutputStream { | ||
|
||
private File file; | ||
|
||
private FileOutputStream delegee; | ||
|
||
|
||
public LazyFileOutputStream( String filename ) | ||
{ | ||
this.file = new File( filename ); | ||
public LazyFileOutputStream(String filename) { | ||
this.file = new File(filename); | ||
} | ||
|
||
public LazyFileOutputStream( File file ) | ||
{ | ||
public LazyFileOutputStream(File file) { | ||
this.file = file; | ||
} | ||
|
||
|
||
public void close() | ||
throws IOException | ||
{ | ||
if ( delegee != null ) | ||
{ | ||
public void close() throws IOException { | ||
if (delegee != null) { | ||
delegee.close(); | ||
} | ||
} | ||
|
||
|
||
public boolean equals( Object obj ) | ||
{ | ||
return delegee.equals( obj ); | ||
public boolean equals(Object obj) { | ||
return delegee.equals(obj); | ||
} | ||
|
||
|
||
public void flush() | ||
throws IOException | ||
{ | ||
if ( delegee != null ) | ||
{ | ||
public void flush() throws IOException { | ||
if (delegee != null) { | ||
delegee.flush(); | ||
} | ||
} | ||
|
||
|
||
public FileChannel getChannel() | ||
{ | ||
public FileChannel getChannel() { | ||
return delegee.getChannel(); | ||
} | ||
|
||
|
||
public FileDescriptor getFD() | ||
throws IOException | ||
{ | ||
public FileDescriptor getFD() throws IOException { | ||
return delegee.getFD(); | ||
} | ||
|
||
public int hashCode() | ||
{ | ||
public int hashCode() { | ||
return delegee.hashCode(); | ||
} | ||
|
||
|
||
public String toString() | ||
{ | ||
public String toString() { | ||
return delegee.toString(); | ||
} | ||
|
||
public void write( byte[] b ) | ||
throws IOException | ||
{ | ||
if ( delegee == null ) | ||
{ | ||
public void write(byte[] b) throws IOException { | ||
if (delegee == null) { | ||
initialize(); | ||
} | ||
|
||
delegee.write( b ); | ||
delegee.write(b); | ||
} | ||
|
||
/** | ||
* @see java.io.OutputStream#write(byte[], int, int) | ||
*/ | ||
public void write( byte[] b, int off, int len ) | ||
throws IOException | ||
{ | ||
if ( delegee == null ) | ||
{ | ||
public void write(byte[] b, int off, int len) throws IOException { | ||
if (delegee == null) { | ||
initialize(); | ||
} | ||
|
||
delegee.write( b, off, len ); | ||
delegee.write(b, off, len); | ||
} | ||
|
||
/** | ||
* @param b | ||
* @throws java.io.IOException | ||
*/ | ||
public void write( int b ) | ||
throws IOException | ||
{ | ||
if ( delegee == null ) | ||
{ | ||
public void write(int b) throws IOException { | ||
if (delegee == null) { | ||
initialize(); | ||
} | ||
|
||
delegee.write( b ); | ||
delegee.write(b); | ||
} | ||
|
||
|
||
/** | ||
* | ||
* | ||
*/ | ||
private void initialize() | ||
throws FileNotFoundException | ||
{ | ||
delegee = new FileOutputStream( file ); | ||
private void initialize() throws FileNotFoundException { | ||
delegee = new FileOutputStream(file); | ||
} | ||
} |
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,3 @@ | ||
package org.apache.maven.wagon; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
|
@@ -18,38 +16,34 @@ | |
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import org.apache.maven.wagon.resource.Resource; | ||
package org.apache.maven.wagon; | ||
|
||
import java.io.OutputStream; | ||
|
||
import org.apache.maven.wagon.resource.Resource; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Michal Maczka</a> | ||
* | ||
*/ | ||
public class OutputData | ||
{ | ||
public class OutputData { | ||
private OutputStream outputStream; | ||
|
||
private Resource resource; | ||
|
||
public OutputStream getOutputStream() | ||
{ | ||
public OutputStream getOutputStream() { | ||
return outputStream; | ||
} | ||
|
||
public void setOutputStream( OutputStream outputStream ) | ||
{ | ||
public void setOutputStream(OutputStream outputStream) { | ||
this.outputStream = outputStream; | ||
} | ||
|
||
public Resource getResource() | ||
{ | ||
public Resource getResource() { | ||
return resource; | ||
} | ||
|
||
public void setResource( Resource resource ) | ||
{ | ||
public void setResource(Resource resource) { | ||
this.resource = resource; | ||
} | ||
} |
Oops, something went wrong.