You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wagon-commits@maven.apache.org by br...@apache.org on 2004/12/15 12:29:46 UTC
cvs commit: maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/observers ChecksumObserver.java
brett 2004/12/15 03:29:46
Modified: wagon-provider-api/src/main/java/org/apache/maven/wagon
AbstractWagon.java LazyFileOutputStream.java
WagonUtils.java
wagon-provider-api/src/main/java/org/apache/maven/wagon/authentication
AuthenticationInfo.java
wagon-provider-api/src/main/java/org/apache/maven/wagon/observers
ChecksumObserver.java
Log:
cleanup and comments
Revision Changes Path
1.12 +2 -4 maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
Index: AbstractWagon.java
===================================================================
RCS file: /home/cvs/maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- AbstractWagon.java 13 Dec 2004 21:57:07 -0000 1.11
+++ AbstractWagon.java 15 Dec 2004 11:29:45 -0000 1.12
@@ -135,7 +135,7 @@
}
}
- String msg = "GET request of: " + resource + " from " + repository.getName() + "failed";
+ String msg = "GET request of: " + resource.getName() + " from " + repository.getName() + " failed";
throw new TransferFailedException( msg, e );
@@ -204,8 +204,6 @@
{
break;
}
-
- // @todo probably new event should be created!!
fireTransferProgress( transferEvent, buffer, n );
1.5 +2 -2 maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/LazyFileOutputStream.java
Index: LazyFileOutputStream.java
===================================================================
RCS file: /home/cvs/maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/LazyFileOutputStream.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LazyFileOutputStream.java 10 Aug 2004 20:35:52 -0000 1.4
+++ LazyFileOutputStream.java 15 Dec 2004 11:29:45 -0000 1.5
@@ -130,7 +130,7 @@
*
*/
private void initialize() throws FileNotFoundException
- {
+ {
delegee = new FileOutputStream( file );
}
}
1.11 +4 -1 maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/WagonUtils.java
Index: WagonUtils.java
===================================================================
RCS file: /home/cvs/maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/WagonUtils.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- WagonUtils.java 10 Aug 2004 20:35:52 -0000 1.10
+++ WagonUtils.java 15 Dec 2004 11:29:45 -0000 1.11
@@ -167,6 +167,8 @@
authInfo.setPassphrase( "" );
}
+ // TODO: what about modes?
+
authInfo.setGroup( getUserGroup() );
return authInfo;
@@ -174,6 +176,7 @@
private static String getUserGroup()
{
+ // TODO: this isn't a normal system property
String retValue = System.getProperty( "user.group" );
return retValue;
1.5 +53 -25 maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/authentication/AuthenticationInfo.java
Index: AuthenticationInfo.java
===================================================================
RCS file: /home/cvs/maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/authentication/AuthenticationInfo.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AuthenticationInfo.java 13 Dec 2004 21:57:07 -0000 1.4
+++ AuthenticationInfo.java 15 Dec 2004 11:29:45 -0000 1.5
@@ -21,7 +21,9 @@
/**
* This class holds the set of properties used when instance of the <code>Wagon</code>
- * will use during login opreration
+ * will use during login opreration.
+ *
+ * @todo group, mode and directory mode do not belong here - they are repository info.
*
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id$
@@ -37,20 +39,21 @@
/** Password associated with the login */
private String password;
- /** Repository group name */
+ /** Repository group name. */
private String group;
+ /** Repository directory mode. Modes can be in either textual (ugo+rx) or octal (755) form. */
+ private String directoryMode;
+
+ /** Repository file mode. Modes can be in either textual (ugo+rx) or octal (644) form. */
+ private String fileMode;
+
/** Passphrase of the user's private key file */
private String passphrase;
/** The absolute path to private key file */
private String privateKey;
- private String directoryMode;
-
- private String fileMode;
-
-
/**
* Get the passphrase of the private key file. The passphrase is used only
* when host/protocol supports authentication via exchange of
@@ -116,6 +119,48 @@
}
/**
+ * Get the repository directory mode to which an artifact will belong to after
+ * deployment. Not all protolcols permit the changing of the mode.
+ *
+ * @return mode
+ */
+ public String getDirectoryMode()
+ {
+ return directoryMode;
+ }
+
+ /**
+ * Set the repository directory mode for the deployed artifact.
+ *
+ * @param directoryMode repository directory mode for deployed artifacts
+ */
+ public void setDirectoryMode( final String directoryMode )
+ {
+ this.directoryMode = directoryMode;
+ }
+
+ /**
+ * Get the repository file mode to which an artifact will belong to after
+ * deployment. Not all protolcols permit the changing of the artifact mode.
+ *
+ * @return repository group name
+ */
+ public String getFileMode()
+ {
+ return fileMode;
+ }
+
+ /**
+ * Set the repository file mode for the deployed artifact.
+ *
+ * @param fileMode repository file mode for deployed artifacts
+ */
+ public void setFileMode( final String fileMode )
+ {
+ this.fileMode = fileMode;
+ }
+
+ /**
* Get the user's password which is used when connecting to the repository.
*
* @return password of user
@@ -153,22 +198,5 @@
public void setUserName( final String userName )
{
this.userName = userName;
- }
-
-
- public String getDirectoryMode() {
- return directoryMode;
- }
-
- public void setDirectoryMode(String directoryMode) {
- this.directoryMode = directoryMode;
- }
-
- public String getFileMode() {
- return fileMode;
- }
-
- public void setFileMode(String fileMode) {
- this.fileMode = fileMode;
}
}
1.7 +3 -2 maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/observers/ChecksumObserver.java
Index: ChecksumObserver.java
===================================================================
RCS file: /home/cvs/maven-wagon/wagon-provider-api/src/main/java/org/apache/maven/wagon/observers/ChecksumObserver.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ChecksumObserver.java 13 Dec 2004 21:57:07 -0000 1.6
+++ ChecksumObserver.java 15 Dec 2004 11:29:46 -0000 1.7
@@ -171,7 +171,8 @@
}
catch ( Exception e )
{
- // TODO: handle differently!
+ // TODO: handle differently! No Exception catching....
+ e.printStackTrace();
}
finally
{
---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-cvs-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-cvs-help@maven.apache.org