diff --git a/README.md b/README.md
index db7b30e2046545a86866b6f3a2fe4275d8ba823e..86ffb8eaa57b0886cbf3e828d78e4e9c7c02b2cc 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,156 @@
-Ferhat HOCINE GL02
\ No newline at end of file
+Projet nº1 - Application «Tree FTP»
+Ferhat HOCINE GL02
+2021
+
+*** 1/ Introduction
+I)objectif:
+L'Application «Tree FTP» a pour résultat l'affichage de l'arborescence d'un répertoire accessible via le protocole applicatif (FTP) depuis un shell graçe a une commande.
+cette commande prend en paramètre obligatoirement l'adresse du serveur FTP + en option un nom d'utilisateur et un mot de passe
+
+II)exécution:
+Dans le fichier racine on exécute la commande :
+->>> mvn package      
+//pour compliler le projet
+puis la commande :
+->>> mvn javadoc:javadoc
+//pour générer la documentation:
+puis la commande :
+java -jar target/projet1.sr-1.0-SNAPSHOT.jar ftp.ubuntu.com
+//pour lancer l'application sur le server FTP ubuntu 
+ou la commande :
+java -jar target/projet1.sr-1.0-SNAPSHOT.jar ftp.free.fr
+//pour le server FTP Free
+
+
+*** 2/ Architecture
+la gestion d'erreur:
+La plus part des méthodes de la classe connection renvoie IOException avec un message en cas d'erreur.
+exemple:
+la méthode envoyerPWD() qui envoie la commande "PWD"
+
+	public void envoyerPWD()  throws IOException {
+		if (this.socket==null) {
+			System.out.println("Erreur connection FTP Server !!");
+		}
+		else {
+		printer.write("PWD\r\n");
+		printer.flush();
+		try {
+		String r = this.bfR.readLine();
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
+		}
+	}
+	
+Dans la méthode envoyerPWD lors de la lecture de la réponse par le buffer reader en cas de IOException il sera attraper par le catch et renvera un new IOException avec le message "Buffer reader error".
+la capture d'erreure est de même pour toutes les méthode de la classe connection
+
+
+*** 3/ Parcours du code (code samples)
+
+
+a) la méthode envoyerCWD(String dossier) de la classe Connection::
+
+cette méthode utilise le String dossier passé en paramètre pour envoyé un cammande  CWD +dossier afin de savoir si on peut accédé ou dossier dant le nom est passé en paramètre ou l'accès est interdit et la réponse est renvoyé sous forme de boolean par la méthode.
+	
+	public boolean envoyerCWD(String dossier) throws IOException  {
+		if (this.socket==null) {
+			System.out.println("Erreur connection FTP Server !!");
+		}
+		else {
+			try {
+				printer.write("CWD "+dossier+"\r\n");
+				printer.flush();
+				String r = this.bfR.readLine();
+				return r.startsWith("250");
+				
+				}
+				catch(IOException e) {
+						throw new IOException("Buffer reader error");
+					}
+				catch (NullPointerException e){
+					return false;
+			}
+		}
+		return false;
+	}
+	
+	
+b) la méthode envoyerPASV() de la classe Connection:
+cette méthode envoie la commande PASV afin de passer au mode passive. en cas de réussite les information récupérer sont renvoyé dans le cas contraire l'exception est levée.
+
+ 	public String envoyerPASV() throws IOException  {
+		if (this.socket==null) {
+			System.out.println("Erreur connection FTP Server !!");
+			return "";
+		}
+		else {
+		try {
+			printer.write("PASV\r\n");
+			printer.flush();
+			String r = this.bfR.readLine();
+			return r;
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
+		}
+	}
+	
+	
+c) la méthode getAdressePasv() de la classe Connection:
+cette méthode utilise le string (PASV) passé en paramètre qui représente une réponse de la commande PASV et extrait l'adresse IP compris dans le message.
+
+
+	public String getAdressePasv(String PASV) {
+		int i = PASV.indexOf("(");
+		int j = PASV.indexOf(")");
+		PASV= PASV.substring(i+1,j);
+		String [] str=PASV.split(",");
+		String res="";
+		for (i=0; i<4; i++) {
+			res+=str[i]+".";
+		}
+		res=res.substring(0,res.length()-1);
+		return res;
+		}	
+
+d) la méthode envoyerList(String adrs, int port) de la classe Connection:
+cette methode utilise l'adresse ip et le port (passées en paramètre )extrait depuis la réponse de la commande PASV afin de retourner la liste des élements contenu dans la dossier encours
+
+	public ArrayList<String> envoyerList(String adrs, int port) throws IOException  {
+		ArrayList<String> Readl=new ArrayList<String>();
+		if (this.socket==null) {
+			System.out.println("Erreur connection FTP Server !!");
+			return Readl;
+		}
+		else {
+			try {
+				printer.write("LIST\r\n");
+				printer.flush();
+				Readl=this.newConnection(adrs, port);
+				String r = this.bfR.readLine();
+				r = this.bfR.readLine();
+				
+				return Readl;
+			}
+		
+			catch(IOException e) {
+				throw new IOException("Buffer reader error");
+			}
+		}
+	}
+
+
+e)la méthode NameOperation(String s)de la classe Arbre:
+cette méthode transforme le string passé en paramètre qui représentre un ligne d'information d'un élement(fichier, dossier, lien ...) en liste avec les partie séparées et dans espace.
+
+	public String[] NameOperation(String s){
+		s=s.replaceAll(" ",",");
+		while(s.indexOf(",,")!=-1) {
+			s=s.replaceAll(",,",",");
+		}
+		return s.split(",");
+	}	
diff --git a/projet1.sr/bin/.project b/projet1.sr/bin/.project
deleted file mode 100644
index 99705b3a9a2b36a4bd365133dd42c3d71deb54f4..0000000000000000000000000000000000000000
--- a/projet1.sr/bin/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>projet1.sr</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.m2e.core.maven2Builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.m2e.core.maven2Nature</nature>
-	</natures>
-</projectDescription>
diff --git a/projet1.sr/bin/.settings/org.eclipse.core.resources.prefs b/projet1.sr/bin/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 99f26c0203a7844de00dbfc56e6a35d8ed3c022c..0000000000000000000000000000000000000000
--- a/projet1.sr/bin/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/projet1.sr/bin/pom.xml b/projet1.sr/bin/pom.xml
deleted file mode 100644
index e2e9d1b4603ddac8ba3c76b389de4b4622e3d172..0000000000000000000000000000000000000000
--- a/projet1.sr/bin/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>systemes.repartie.tree.ftp</groupId>
-  <artifactId>projet1.sr</artifactId>
-  <version>1.0-SNAPSHOT</version>
-
-  <name>projet1.sr</name>
-  <!-- FIXME change it to the project's website -->
-  <url>http://www.example.com</url>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>1.7</maven.compiler.source>
-    <maven.compiler.target>1.7</maven.compiler.target>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.11</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-      <plugins>
-        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-        <plugin>
-          <artifactId>maven-clean-plugin</artifactId>
-          <version>3.1.0</version>
-        </plugin>
-        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-        <plugin>
-          <artifactId>maven-resources-plugin</artifactId>
-          <version>3.0.2</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-compiler-plugin</artifactId>
-          <version>3.8.0</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.22.1</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-jar-plugin</artifactId>
-          <version>3.0.2</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-install-plugin</artifactId>
-          <version>2.5.2</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-deploy-plugin</artifactId>
-          <version>2.8.2</version>
-        </plugin>
-        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-        <plugin>
-          <artifactId>maven-site-plugin</artifactId>
-          <version>3.7.1</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-project-info-reports-plugin</artifactId>
-          <version>3.0.0</version>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-</project>
diff --git a/projet1.sr/bin/src/main/java/systemes/repartie/tree/ftp/App.class b/projet1.sr/bin/src/main/java/systemes/repartie/tree/ftp/App.class
deleted file mode 100644
index fabf06dcaa22e940a7ccb4d65a676f7aecca7c1a..0000000000000000000000000000000000000000
Binary files a/projet1.sr/bin/src/main/java/systemes/repartie/tree/ftp/App.class and /dev/null differ
diff --git a/projet1.sr/bin/src/test/java/systemes/repartie/tree/ftp/AppTest.class b/projet1.sr/bin/src/test/java/systemes/repartie/tree/ftp/AppTest.class
deleted file mode 100644
index ab615f83c553c2763942f81ba2e116d9a043b618..0000000000000000000000000000000000000000
Binary files a/projet1.sr/bin/src/test/java/systemes/repartie/tree/ftp/AppTest.class and /dev/null differ
diff --git a/projet1.sr/doc/Diagram.jpg b/projet1.sr/doc/Diagram.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c8ef8beb796de1652f3435e18aafe0d93f714d9f
Binary files /dev/null and b/projet1.sr/doc/Diagram.jpg differ
diff --git a/projet1.sr/doc/Diagram.ucls b/projet1.sr/doc/Diagram.ucls
new file mode 100644
index 0000000000000000000000000000000000000000..175e692d14294c82ff74d7b31f741778338f04ca
--- /dev/null
+++ b/projet1.sr/doc/Diagram.ucls
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<class-diagram version="1.2.4" icons="true" automaticImage="JPEG" always-add-relationships="false" 
+  generalizations="true" realizations="true" associations="true" dependencies="false" nesting-relationships="true" 
+  router="FAN">  
+  <class id="1" language="java" name="systemes.repartie.tree.ftp.Main" project="projet1.sr" 
+    file="/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Main.java" binary="false" corner="BOTTOM_RIGHT">    
+    <position height="97" width="118" x="138" y="115"/>    
+    <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" 
+      sort-features="false" accessors="true" visibility="true">      
+      <attributes public="true" package="true" protected="true" private="true" static="true"/>      
+      <operations public="true" package="true" protected="true" private="true" static="true"/>    
+    </display>  
+  </class>  
+  <class id="2" language="java" name="systemes.repartie.tree.ftp.Arbre.Arbre" project="projet1.sr" 
+    file="/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Arbre/Arbre.java" binary="false" corner="BOTTOM_RIGHT">    
+    <position height="151" width="175" x="296" y="115"/>    
+    <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" 
+      sort-features="false" accessors="true" visibility="true">      
+      <attributes public="true" package="true" protected="true" private="true" static="true"/>      
+      <operations public="true" package="true" protected="true" private="true" static="true"/>    
+    </display>  
+  </class>  
+  <class id="3" language="java" name="systemes.repartie.tree.ftp.ParametreConnection.ConnectionParametre" 
+    project="projet1.sr" 
+    file="/projet1.sr/src/main/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.java" 
+    binary="false" corner="BOTTOM_RIGHT">    
+    <position height="223" width="243" x="228" y="731"/>    
+    <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" 
+      sort-features="false" accessors="true" visibility="true">      
+      <attributes public="true" package="true" protected="true" private="true" static="true"/>      
+      <operations public="true" package="true" protected="true" private="true" static="true"/>    
+    </display>  
+  </class>  
+  <class id="4" language="java" name="systemes.repartie.tree.ftp.FtpConnection.Connection" project="projet1.sr" 
+    file="/projet1.sr/src/main/java/systemes/repartie/tree/ftp/FtpConnection/Connection.java" binary="false" 
+    corner="BOTTOM_RIGHT">    
+    <position height="385" width="243" x="228" y="306"/>    
+    <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" 
+      sort-features="false" accessors="true" visibility="true">      
+      <attributes public="true" package="true" protected="true" private="true" static="true"/>      
+      <operations public="true" package="true" protected="true" private="true" static="true"/>    
+    </display>  
+  </class>  
+  <association id="5">    
+    <end type="SOURCE" refId="4" navigable="false">      
+      <attribute id="6" name="connect"/>      
+      <multiplicity id="7" minimum="0" maximum="1"/>    
+    </end>    
+    <end type="TARGET" refId="3" navigable="true"/>    
+    <display labels="true" multiplicity="true"/>  
+  </association>  
+  <association id="8">    
+    <end type="SOURCE" refId="2" navigable="false">      
+      <attribute id="9" name="connect"/>      
+      <multiplicity id="10" minimum="0" maximum="1"/>    
+    </end>    
+    <end type="TARGET" refId="4" navigable="true"/>    
+    <display labels="true" multiplicity="true"/>  
+  </association>  
+  <classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" 
+    sort-features="false" accessors="true" visibility="true">    
+    <attributes public="true" package="true" protected="true" private="true" static="true"/>    
+    <operations public="true" package="true" protected="true" private="true" static="true"/>  
+  </classifier-display>  
+  <association-display labels="true" multiplicity="true"/>
+</class-diagram>
\ No newline at end of file
diff --git a/projet1.sr/pom.xml b/projet1.sr/pom.xml
index e2e9d1b4603ddac8ba3c76b389de4b4622e3d172..ac48748b0d2ba06b70c0fc2bb624aa3b03171b96 100644
--- a/projet1.sr/pom.xml
+++ b/projet1.sr/pom.xml
@@ -35,10 +35,20 @@
           <artifactId>maven-clean-plugin</artifactId>
           <version>3.1.0</version>
         </plugin>
+        <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-javadoc-plugin</artifactId>
+              <version>3.0.0</version>
+              <configuration>
+                  <reportOutputDirectory>${project.build.directory}/docs</reportOutputDirectory>
+                  <destDir>docs</destDir>
+                  <nohelp>true</nohelp>
+              </configuration>
+         </plugin>
         <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
         <plugin>
           <artifactId>maven-resources-plugin</artifactId>
-          <version>3.0.2</version>
+          <version>3.1.0</version>
         </plugin>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
@@ -50,7 +60,8 @@
         </plugin>
         <plugin>
           <artifactId>maven-jar-plugin</artifactId>
-          <version>3.0.2</version>
+          <version>3.0.2</version><configuration><archive><manifest><mainClass>systemes.repartie.tree.ftp.Main</mainClass></manifest></archive></configuration>
+          
         </plugin>
         <plugin>
           <artifactId>maven-install-plugin</artifactId>
@@ -65,10 +76,12 @@
           <artifactId>maven-site-plugin</artifactId>
           <version>3.7.1</version>
         </plugin>
+        
         <plugin>
           <artifactId>maven-project-info-reports-plugin</artifactId>
           <version>3.0.0</version>
         </plugin>
+        
       </plugins>
     </pluginManagement>
   </build>
diff --git a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Arbre/Arbre.java b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Arbre/Arbre.java
index 754b363931cd74b1eab7edff896e6a337dbb88ea..74c0b1cbc62a7dd52f5fe222a25e19bd8d582a31 100644
--- a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Arbre/Arbre.java
+++ b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Arbre/Arbre.java
@@ -4,17 +4,29 @@ import java.io.IOException;
 import java.util.ArrayList;
 
 import systemes.repartie.tree.ftp.FtpConnection.Connection;
-
+/**
+ * class to display the tree of our repetory
+ * @author hocine
+ *
+ */
 public class Arbre {
+	// variable declaration
 	private Connection connect;
+	//constructor
 	public Arbre(Connection connect) {
 		this.connect=connect;
 	}
+	//getter
 	public Connection getConnection() {
 		return this.connect;
 	}
 	
 	
+	/*
+	 * brows our repertory and display the tree of every file, directory or link using TypeOf methode
+	 * params space : to put space between parent and children files 
+	 * @throws IOException
+	 */
 	public void getTree(String space) throws IOException {
 		this.connect.envoyerType();
 		String mySTring = this.connect.envoyerPASV();
@@ -28,6 +40,13 @@ public class Arbre {
 			}
 		}
 	}
+	
+	/*
+	 * Display the type of file in the param given (file "F",Directory "D" or Link "L"
+	 * param space : to put space between parent and children files 
+	 * param s : pemission and type of file 
+	 * @throws IOException
+	 */
 	public void TypeOf(String s,String space) throws IOException {
 		String[] myline=NameOperation(s);
 		
@@ -48,6 +67,13 @@ public class Arbre {
 		}
 	}
 	
+	
+	
+	/*
+	 * Operation on String param to delete space and put "," between parts and finaly make it String[] 
+	 * params s 
+	 * @return String[]
+	 */
 	public String[] NameOperation(String s){
 		s=s.replaceAll(" ",",");
 		while(s.indexOf(",,")!=-1) {
diff --git a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/FtpConnection/Connection.java b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/FtpConnection/Connection.java
index 8a61e2dfb409fea793fa7462033c1c270bcf0b92..57a673303d56fff25ff9119695bcf0ee677b53c5 100644
--- a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/FtpConnection/Connection.java
+++ b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/FtpConnection/Connection.java
@@ -18,7 +18,7 @@ import systemes.repartie.tree.ftp.ParametreConnection.ConnectionParametre;
  *
  */
 public class Connection {
-	// parames
+	// variable declaration
 	private ConnectionParametre connect;
 	private Socket socket;
 	private BufferedReader bfR;
@@ -32,18 +32,17 @@ public class Connection {
 
 	}
 	
-	/*
+	/**
 	 * return the instance of ConnectionParametre used by our class
 	 */
 	public ConnectionParametre getConnectionParam() {
 		return this.connect;
 	}
 	
-	/*
+	/**
 	 * Connexion to ftp server methode
 	 * this methode uses our instance of ConnectionParametre to connect to ftp server
 	 * @throws IOException
-	 * @return void
 	 */
 	public void OperationConnection() throws IOException{
 		//creating a new instance of socket using ConnectionParametre adress and port
@@ -90,26 +89,29 @@ public class Connection {
 		}
 		}
 	
-	/*
+	/**
 	 * executing PWD commande to get repertory root 
 	 * @throws IOException
-	 * @return void
 	 */
 	public void envoyerPWD()  throws IOException {
 		if (this.socket==null) {
 			System.out.println("Erreur connection FTP Server !!");
 		}
 		else {
-		printer.write("PWD\r\n");
-		printer.flush();
-		String r = this.bfR.readLine();
-		//System.out.println(r);
+		try {
+			printer.write("PWD\r\n");
+			printer.flush();
+			String r = this.bfR.readLine();
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
 		}
 	}
 	
-	/*
+	/**
 	 * executing CWD command using the directory given in param to access to it
-	 * @param String : dossier
+	 * @param dossier 
 	 * @throws IOException
 	 * @return boolean : True if it succeed to access to the directory or False if it failed
 	 */
@@ -118,15 +120,24 @@ public class Connection {
 			System.out.println("Erreur connection FTP Server !!");
 		}
 		else {
-		printer.write("CWD "+dossier+"\r\n");
-		printer.flush();
-		String r = this.bfR.readLine();
-		return r.startsWith("250");
+			try {
+				printer.write("CWD "+dossier+"\r\n");
+				printer.flush();
+				String r = this.bfR.readLine();
+				return r.startsWith("250");
+				
+				}
+				catch(IOException e) {
+						throw new IOException("Buffer reader error");
+					}
+				catch (NullPointerException e){
+					return false;
+			}
 		}
 		return false;
 	}
 	
-	/*
+	/**
 	 * executing PASV command to enter to passive mode
 	 * @throws IOException
 	 * @return String : the information received in passive mode
@@ -137,11 +148,15 @@ public class Connection {
 			return "";
 		}
 		else {
-		printer.write("PASV\r\n");
-		printer.flush();
-		String r = this.bfR.readLine();
-		//System.out.println(r);
-		return r;
+		try {
+			printer.write("PASV\r\n");
+			printer.flush();
+			String r = this.bfR.readLine();
+			return r;
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
 		}
 	}
 	
@@ -177,17 +192,20 @@ public class Connection {
 	/*
 	 * executing  TYPE I command to switch to the binary mode
 	 * @throws IOException
-	 * @return void
 	 */
 	public void envoyerType() throws IOException  {
 		if (this.socket==null) {
 			System.out.println("Erreur connection FTP Server !!");
 		}
 		else {
-		printer.write("TYPE I\r\n");
-		printer.flush();
-		String r = this.bfR.readLine();
-		//System.out.println(r);
+		try {
+			printer.write("TYPE I\r\n");
+			printer.flush();
+			String r = this.bfR.readLine();
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
 		}
 	}
 	
@@ -200,56 +218,70 @@ public class Connection {
 		ArrayList<String> Readl=new ArrayList<String>();
 		if (this.socket==null) {
 			System.out.println("Erreur connection FTP Server !!");
+			return Readl;
 		}
 		else {
-		printer.write("LIST\r\n");
-		printer.flush();
-		Readl=this.newConnection(adrs, port);
-		String r = this.bfR.readLine();
-		r = this.bfR.readLine();
+			try {
+				printer.write("LIST\r\n");
+				printer.flush();
+				Readl=this.newConnection(adrs, port);
+				String r = this.bfR.readLine();
+				r = this.bfR.readLine();
+				
+				return Readl;
+		}
+		
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
 		}
-		return Readl;
+	}
 	}
 	
 	
 	/*
 	 * executing  Cdup To change directory
 	 * @throws IOException
-	 * @return void
 	 */
 	public void envoyerCdup() throws IOException  {
 		if (this.socket==null) {
 			System.out.println("Erreur connection FTP Server !!");
 		}
 		else {
-		printer.write("CDUP\r\n");
-		printer.flush();
-		String r = this.bfR.readLine();
-		//System.out.println(r);
+		try {
+			printer.write("CDUP\r\n");
+			printer.flush();
+			String r = this.bfR.readLine();
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
 		}
 	}
 	
 	/*
 	 * executing  Quit To QUIT socket
 	 * @throws IOException
-	 * @return void
 	 */
 	public void envoyerQuit() throws IOException  {
 		if (this.socket==null) {
 			System.out.println("Erreur connection FTP Server !!");
 		}
 		else {
-		printer.write("QUIT\r\n");
-		printer.flush();
-		String r = this.bfR.readLine();
-		//System.out.println(r);
+		try {
+			printer.write("QUIT\r\n");
+			printer.flush();
+			String r = this.bfR.readLine();
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
 		}
 	}
 	
 	/*
 	 * Staring new socket the to get the List of file,directory and link in our repertory from IP Address and Port
-	 * @param String Adresse : IP address
-	 * @param STring Port : port
+	 * @param  Adresse : IP address
+	 * @param  Port : port
 	 * @throws IOException
 	 * @return ArrayList<String> : The List of file,directory and link in our repertory from IP Address and Port
 	 */
@@ -259,6 +291,7 @@ public class Connection {
 		BufferedReader bfR1 = new BufferedReader(new InputStreamReader(socket1.getInputStream()));
 		OutputStream outPut1 = socket1.getOutputStream();
 		PrintWriter printer1 = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket1.getOutputStream())));
+		try {
 		String r = bfR1.readLine();
 		while (r!=null) {
 			liste.add(r);
@@ -267,6 +300,10 @@ public class Connection {
 		printer1.write("QUIT\r\n");
 		printer1.flush();
 		return liste;	
+		}
+		catch(IOException e) {
+			throw new IOException("Buffer reader error");
+		}
 	}
 	
 	/*
diff --git a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Main.java b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Main.java
index ccf2f73d758eae07ee685dac173972d2387f1308..b4630db0e47ae1126c6189f8f4eeffc45237f3c6 100644
--- a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Main.java
+++ b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Main.java
@@ -12,10 +12,22 @@ import java.net.Socket;
 import systemes.repartie.tree.ftp.Arbre.Arbre;
 import systemes.repartie.tree.ftp.FtpConnection.Connection;
 import systemes.repartie.tree.ftp.ParametreConnection.ConnectionParametre;
-
+/**
+ * Main
+ * @author hocine
+ *
+ */
 public class Main {
 	public static void main(String[] args) throws IOException {
-		ConnectionParametre connectPar= new ConnectionParametre("anonymous","anonymous",21,args[0]);
+		String user="anonymous";
+		String pass="anonymous";
+		if(args.length>1) {
+			user=args[1];
+		}
+		if(args.length>2) {
+			pass=args[2];
+		}
+		ConnectionParametre connectPar= new ConnectionParametre(user,pass,21,args[0]);
 		Connection connect= new Connection(connectPar);
 		System.out.println("-------------Connection-------------");
 		connect.OperationConnection();
diff --git a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.java b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.java
index 544715a05ed136e9b1ccaa03c209b3ab1f5933b3..175904093fdd6b9f803a953760ea24fa9f6fb845 100644
--- a/projet1.sr/src/main/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.java
+++ b/projet1.sr/src/main/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.java
@@ -1,11 +1,17 @@
 package systemes.repartie.tree.ftp.ParametreConnection;
 
+/**
+ * Params class to identify user
+ * @author hocine
+ *
+ */
 public class ConnectionParametre {
+	// variable declaration
 	private String identifiant;
 	private String motdepasse;
 	private String adresse;
 	private int port;
-
+	//Constructor
 	public ConnectionParametre(String identifiant,String motdepasse,int port,String adresse) {
 		this.identifiant=identifiant;
 		this.motdepasse=motdepasse;
@@ -13,6 +19,8 @@ public class ConnectionParametre {
 		this.adresse=adresse;
 	}
 	
+	//getters
+	
 	public String getIdentifiant() {
 		return this.identifiant;
 	}
diff --git a/projet1.sr/src/test/java/systemes/repartie/tree/ftp/FtpConnection/ConnectionTest.java b/projet1.sr/src/test/java/systemes/repartie/tree/ftp/FtpConnection/ConnectionTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..543280648aabf70f27e6010cabcc06483ac52751
--- /dev/null
+++ b/projet1.sr/src/test/java/systemes/repartie/tree/ftp/FtpConnection/ConnectionTest.java
@@ -0,0 +1,37 @@
+package systemes.repartie.tree.ftp.FtpConnection;
+import org.junit.Test;
+
+import systemes.repartie.tree.ftp.ParametreConnection.ConnectionParametre;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+
+public class ConnectionTest {
+	public static ConnectionParametre connect=new ConnectionParametre("anonymous","anonymous",21,"ftp.ubuntu.com");
+	public static Connection connectFtp= new Connection(connect);
+	
+	
+	
+	@Test
+	public void getConnectionParamTest() {
+		assertEquals(connectFtp.getConnectionParam().getIdentifiant(), "anonymous");
+	}
+	
+	@Test
+	public void envoyerCWD()  throws IOException {
+		connectFtp.OperationConnection();
+		assertFalse(connectFtp.envoyerCWD("nonExistingRepertory"));
+	}
+	
+	@Test
+	public void envoyerPASV_envoyerType()  throws IOException {
+		connectFtp.OperationConnection();
+		connectFtp.envoyerType();
+		connectFtp.OperationConnection();
+		String line =connectFtp.envoyerPASV();
+		assertTrue(line.startsWith("227 Entering Passive Mode"));
+
+	}
+	
+}
diff --git a/projet1.sr/src/test/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametreTest.java b/projet1.sr/src/test/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametreTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..5a83a08503af5142e6c30ead741b2758e7bdca66
--- /dev/null
+++ b/projet1.sr/src/test/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametreTest.java
@@ -0,0 +1,28 @@
+package systemes.repartie.tree.ftp.ParametreConnection;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class ConnectionParametreTest {
+	public static ConnectionParametre connect=new ConnectionParametre("anonymous","anonymous",21,"ftp.ubuntu.com");
+	
+	
+	@Test
+	public void getIdentifiantTest() {
+		assertEquals(connect.getIdentifiant(), "anonymous");
+	}
+	
+	@Test
+	public void getMotdepasseTest() {
+		assertEquals(connect.getMotdepasse(), "anonymous");
+	}
+	
+	@Test
+	public void getAdresseTest() {
+		assertEquals(connect.getAdresse(), "ftp.ubuntu.com");
+	}
+	
+	@Test
+	public void getPortTest() {
+		assertEquals(connect.getPort(), 21);
+	}
+}
diff --git a/projet1.sr/target/classes/systemes/repartie/tree/ftp/Arbre/Arbre.class b/projet1.sr/target/classes/systemes/repartie/tree/ftp/Arbre/Arbre.class
deleted file mode 100644
index 0cfa5c1edc1b2afc56c20538395c1e69cff78a51..0000000000000000000000000000000000000000
Binary files a/projet1.sr/target/classes/systemes/repartie/tree/ftp/Arbre/Arbre.class and /dev/null differ
diff --git a/projet1.sr/target/classes/systemes/repartie/tree/ftp/FtpConnection/Connection.class b/projet1.sr/target/classes/systemes/repartie/tree/ftp/FtpConnection/Connection.class
deleted file mode 100644
index e735c80fd235fe973e7613002bc9e3596c6e5430..0000000000000000000000000000000000000000
Binary files a/projet1.sr/target/classes/systemes/repartie/tree/ftp/FtpConnection/Connection.class and /dev/null differ
diff --git a/projet1.sr/target/classes/systemes/repartie/tree/ftp/Main.class b/projet1.sr/target/classes/systemes/repartie/tree/ftp/Main.class
deleted file mode 100644
index 03172c9e14c76daa1822f6aa46df35fec02dc375..0000000000000000000000000000000000000000
Binary files a/projet1.sr/target/classes/systemes/repartie/tree/ftp/Main.class and /dev/null differ
diff --git a/projet1.sr/target/classes/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.class b/projet1.sr/target/classes/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.class
deleted file mode 100644
index c39b92cac0ef1fb33a526fa815fd2f4c8bf65cdc..0000000000000000000000000000000000000000
Binary files a/projet1.sr/target/classes/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.class and /dev/null differ
diff --git a/projet1.sr/target/maven-archiver/pom.properties b/projet1.sr/target/maven-archiver/pom.properties
deleted file mode 100644
index aabb671c4d997aef417a80b057e8375c0a2eb120..0000000000000000000000000000000000000000
--- a/projet1.sr/target/maven-archiver/pom.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#Created by Apache Maven 3.6.3
-groupId=systemes.repartie.tree.ftp
-artifactId=projet1.sr
-version=1.0-SNAPSHOT
diff --git a/projet1.sr/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/projet1.sr/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
deleted file mode 100644
index 5612e047a003aa19daf75dc88b8d0a4748a0765b..0000000000000000000000000000000000000000
--- a/projet1.sr/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
+++ /dev/null
@@ -1,4 +0,0 @@
-systemes/repartie/tree/ftp/FtpConnection/Connection.class
-systemes/repartie/tree/ftp/Arbre/Arbre.class
-systemes/repartie/tree/ftp/Main.class
-systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.class
diff --git a/projet1.sr/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/projet1.sr/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
deleted file mode 100644
index 40863bac613b0135c72e292d858546085182f0d0..0000000000000000000000000000000000000000
--- a/projet1.sr/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
+++ /dev/null
@@ -1,4 +0,0 @@
-/home/hocine/eclipse-workspace/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Main.java
-/home/hocine/eclipse-workspace/projet1.sr/src/main/java/systemes/repartie/tree/ftp/ParametreConnection/ConnectionParametre.java
-/home/hocine/eclipse-workspace/projet1.sr/src/main/java/systemes/repartie/tree/ftp/FtpConnection/Connection.java
-/home/hocine/eclipse-workspace/projet1.sr/src/main/java/systemes/repartie/tree/ftp/Arbre/Arbre.java
diff --git a/projet1.sr/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/projet1.sr/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
deleted file mode 100644
index 46ca8b9e1b6781dd195db38b422dcb27c60b86d0..0000000000000000000000000000000000000000
--- a/projet1.sr/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
+++ /dev/null
@@ -1 +0,0 @@
-systemes/repartie/tree/ftp/AppTest.class
diff --git a/projet1.sr/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/projet1.sr/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
deleted file mode 100644
index 0960a7afb60a083f0586e43ede7bb98eafcb0fc1..0000000000000000000000000000000000000000
--- a/projet1.sr/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
+++ /dev/null
@@ -1 +0,0 @@
-/home/hocine/eclipse-workspace/projet1.sr/src/test/java/systemes/repartie/tree/ftp/AppTest.java
diff --git a/projet1.sr/target/projet1.sr-1.0-SNAPSHOT.jar b/projet1.sr/target/projet1.sr-1.0-SNAPSHOT.jar
deleted file mode 100644
index 6159e211bcc4621dcf8f5c4774322fd02fbf8a95..0000000000000000000000000000000000000000
Binary files a/projet1.sr/target/projet1.sr-1.0-SNAPSHOT.jar and /dev/null differ
diff --git a/projet1.sr/target/surefire-reports/TEST-systemes.repartie.tree.ftp.AppTest.xml b/projet1.sr/target/surefire-reports/TEST-systemes.repartie.tree.ftp.AppTest.xml
deleted file mode 100644
index 6ace96f1fd218ae1427b06b0bb670c5b83ab7f02..0000000000000000000000000000000000000000
--- a/projet1.sr/target/surefire-reports/TEST-systemes.repartie.tree.ftp.AppTest.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="systemes.repartie.tree.ftp.AppTest" time="0.029" tests="1" errors="0" skipped="0" failures="0">
-  <properties>
-    <property name="sun.desktop" value="gnome"/>
-    <property name="awt.toolkit" value="sun.awt.X11.XToolkit"/>
-    <property name="java.specification.version" value="11"/>
-    <property name="sun.cpu.isalist" value=""/>
-    <property name="sun.jnu.encoding" value="UTF-8"/>
-    <property name="java.class.path" value="/home/hocine/eclipse-workspace/projet1.sr/target/test-classes:/home/hocine/eclipse-workspace/projet1.sr/target/classes:/home/hocine/.m2/repository/junit/junit/4.11/junit-4.11.jar:/home/hocine/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:"/>
-    <property name="java.vm.vendor" value="Ubuntu"/>
-    <property name="sun.arch.data.model" value="64"/>
-    <property name="java.vendor.url" value="https://ubuntu.com/"/>
-    <property name="user.timezone" value=""/>
-    <property name="java.vm.specification.version" value="11"/>
-    <property name="os.name" value="Linux"/>
-    <property name="sun.java.launcher" value="SUN_STANDARD"/>
-    <property name="user.country" value="FR"/>
-    <property name="sun.boot.library.path" value="/usr/lib/jvm/java-11-openjdk-amd64/lib"/>
-    <property name="sun.java.command" value="/home/hocine/eclipse-workspace/projet1.sr/target/surefire/surefirebooter12294673392553916757.jar /home/hocine/eclipse-workspace/projet1.sr/target/surefire 2021-02-03T12-42-24_160-jvmRun1 surefire7600803984115398973tmp surefire_012456435499636066475tmp"/>
-    <property name="jdk.debug" value="release"/>
-    <property name="surefire.test.class.path" value="/home/hocine/eclipse-workspace/projet1.sr/target/test-classes:/home/hocine/eclipse-workspace/projet1.sr/target/classes:/home/hocine/.m2/repository/junit/junit/4.11/junit-4.11.jar:/home/hocine/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:"/>
-    <property name="sun.cpu.endian" value="little"/>
-    <property name="user.home" value="/home/hocine"/>
-    <property name="user.language" value="fr"/>
-    <property name="java.specification.vendor" value="Oracle Corporation"/>
-    <property name="java.version.date" value="2020-11-04"/>
-    <property name="java.home" value="/usr/lib/jvm/java-11-openjdk-amd64"/>
-    <property name="file.separator" value="/"/>
-    <property name="basedir" value="/home/hocine/eclipse-workspace/projet1.sr"/>
-    <property name="java.vm.compressedOopsMode" value="32-bit"/>
-    <property name="line.separator" value="&#10;"/>
-    <property name="java.specification.name" value="Java Platform API Specification"/>
-    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
-    <property name="java.awt.graphicsenv" value="sun.awt.X11GraphicsEnvironment"/>
-    <property name="surefire.real.class.path" value="/home/hocine/eclipse-workspace/projet1.sr/target/surefire/surefirebooter12294673392553916757.jar"/>
-    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
-    <property name="java.runtime.version" value="11.0.9.1+1-Ubuntu-0ubuntu1.20.04"/>
-    <property name="user.name" value="hocine"/>
-    <property name="path.separator" value=":"/>
-    <property name="os.version" value="5.4.0-65-generic"/>
-    <property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
-    <property name="file.encoding" value="UTF-8"/>
-    <property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
-    <property name="localRepository" value="/home/hocine/.m2/repository"/>
-    <property name="java.vendor.url.bug" value="https://bugs.launchpad.net/ubuntu/+source/openjdk-lts"/>
-    <property name="java.io.tmpdir" value="/tmp"/>
-    <property name="java.version" value="11.0.9.1"/>
-    <property name="user.dir" value="/home/hocine/eclipse-workspace/projet1.sr"/>
-    <property name="os.arch" value="amd64"/>
-    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
-    <property name="java.awt.printerjob" value="sun.print.PSPrinterJob"/>
-    <property name="sun.os.patch.level" value="unknown"/>
-    <property name="java.library.path" value="/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib"/>
-    <property name="java.vm.info" value="mixed mode, sharing"/>
-    <property name="java.vendor" value="Ubuntu"/>
-    <property name="java.vm.version" value="11.0.9.1+1-Ubuntu-0ubuntu1.20.04"/>
-    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
-    <property name="java.class.version" value="55.0"/>
-  </properties>
-  <testcase name="shouldAnswerWithTrue" classname="systemes.repartie.tree.ftp.AppTest" time="0.002"/>
-</testsuite>
\ No newline at end of file
diff --git a/projet1.sr/target/surefire-reports/systemes.repartie.tree.ftp.AppTest.txt b/projet1.sr/target/surefire-reports/systemes.repartie.tree.ftp.AppTest.txt
deleted file mode 100644
index 8ace87e12a53b2500e71e7ae54797f364685c3d7..0000000000000000000000000000000000000000
--- a/projet1.sr/target/surefire-reports/systemes.repartie.tree.ftp.AppTest.txt
+++ /dev/null
@@ -1,4 +0,0 @@
--------------------------------------------------------------------------------
-Test set: systemes.repartie.tree.ftp.AppTest
--------------------------------------------------------------------------------
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 s - in systemes.repartie.tree.ftp.AppTest
diff --git a/projet1.sr/target/test-classes/systemes/repartie/tree/ftp/AppTest.class b/projet1.sr/target/test-classes/systemes/repartie/tree/ftp/AppTest.class
deleted file mode 100644
index 274260a5d3061de41315b7e3f0c845835ef686a5..0000000000000000000000000000000000000000
Binary files a/projet1.sr/target/test-classes/systemes/repartie/tree/ftp/AppTest.class and /dev/null differ