Use Argeo TP v2.1.23
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 19 Mar 2019 16:55:07 +0000 (17:55 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 19 Mar 2019 16:55:07 +0000 (17:55 +0100)
dep/org.argeo.dep.cms.client/pom.xml
org.argeo.core/.classpath
org.argeo.core/bnd.bnd
org.argeo.core/build.properties
org.argeo.core/lib/.gitignore [deleted file]
org.argeo.core/src/org/argeo/ssh/AbstractSsh.java
org.argeo.core/src/org/argeo/ssh/Sftp.java
org.argeo.core/src/org/argeo/sync/fs/SshSync.java
pom.xml

index 5ac0d6f3e9379f03522602bd340ac13101f46694..083faa62cfd0a7fb02979402184dd6eb1db4f3c0 100644 (file)
                        <artifactId>org.slf4j.commons.logging</artifactId>
                </dependency>
                
+               <dependency>
+                       <groupId>org.argeo.tp.misc</groupId>
+                       <artifactId>org.freemarker</artifactId>
+               </dependency>
+               
                <dependency>
                        <groupId>org.argeo.tp.bouncycastle</groupId>
                        <artifactId>bcprov</artifactId>
                        <groupId>org.argeo.tp.apache</groupId>
                        <artifactId>org.apache.mina.core</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.apache</groupId>
+                       <artifactId>org.apache.tomcat.jni</artifactId>
+               </dependency>
                <dependency>
                        <groupId>org.argeo.tp.apache</groupId>
                        <artifactId>org.apache.sshd.core</artifactId>
index a7acb8257c1746fbe770ae32f1845ae35f312d3b..eca7bdba8f03f22510b7980a94dbfe10c16c0901 100644 (file)
@@ -3,6 +3,5 @@
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src"/>
-       <classpathentry kind="lib" path="lib/tomcat-jni-9.0.16.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index 3ae5c176e9dca0689e7103a06478ab9765a5c4c0..8f0929c34088fb077b3b72398e3c093c7b5c31e7 100644 (file)
@@ -1 +1 @@
-Main-Class: org.argeo.sync.cli.Sync
+#Main-Class: org.argeo.sync.cli.Sync
index f3e2c2ccb4ccf475b643f265e62c1ee1fb661116..94dc2778dddbce15d4077c34851ce1e27b153f5e 100644 (file)
@@ -5,4 +5,6 @@ bin.includes = META-INF/,\
 additional.bundles = org.apache.sshd.common,\
                      org.slf4j.log4j12,\
                      org.slf4j.api,\
-                     org.apache.sshd.core
+                     org.apache.sshd.core,\
+                     bcprov,\
+                     org.apache.tomcat.jni
diff --git a/org.argeo.core/lib/.gitignore b/org.argeo.core/lib/.gitignore
deleted file mode 100644 (file)
index 2142dc1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/tomcat-jni-*.jar
index f42ae205cfe6cb24a5cbce137b90d3d0de0cc977..ae1d6a0d4acabf446948ccbfce60026140c1ef8b 100644 (file)
@@ -14,7 +14,7 @@ import org.apache.sshd.client.SshClient;
 import org.apache.sshd.client.config.keys.ClientIdentityLoader;
 import org.apache.sshd.client.future.ConnectFuture;
 import org.apache.sshd.client.session.ClientSession;
-import org.apache.sshd.client.subsystem.sftp.SftpFileSystemProvider;
+import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystemProvider;
 import org.apache.sshd.common.config.keys.FilePasswordProvider;
 
 abstract class AbstractSsh {
@@ -79,13 +79,13 @@ abstract class AbstractSsh {
        }
 
        void loadKey(String password, String keyPath) {
-               try {
-                       KeyPair keyPair = ClientIdentityLoader.DEFAULT.loadClientIdentity(keyPath,
-                                       FilePasswordProvider.of(password));
-                       session.addPublicKeyIdentity(keyPair);
-               } catch (IOException | GeneralSecurityException e) {
-                       throw new IllegalStateException(e);
-               }
+//             try {
+//                     KeyPair keyPair = ClientIdentityLoader.DEFAULT.loadClientIdentity(keyPath,
+//                                     FilePasswordProvider.of(password));
+//                     session.addPublicKeyIdentity(keyPair);
+//             } catch (IOException | GeneralSecurityException e) {
+//                     throw new IllegalStateException(e);
+//             }
        }
 
        void openSession(URI uri) {
index 3ad3e985578e232bd59968e8ef5c67992d63f8ed..df4dd3a01d1a3354e1477b0914aa053f110fd085 100644 (file)
@@ -5,7 +5,7 @@ import java.net.URI;
 import java.nio.file.FileSystem;
 import java.nio.file.Path;
 
-import org.apache.sshd.client.subsystem.sftp.SftpFileSystem;
+import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystem;
 
 public class Sftp extends AbstractSsh {
        private URI uri;
index 773f32d34e226dc3bbb70c3112c08c775f70eabe..7fe6670c9ef7627ad949b65ae0fdbbdb6cbca23e 100644 (file)
@@ -27,8 +27,8 @@ import org.apache.sshd.client.channel.ClientChannelEvent;
 import org.apache.sshd.client.config.keys.ClientIdentityLoader;
 import org.apache.sshd.client.future.ConnectFuture;
 import org.apache.sshd.client.session.ClientSession;
-import org.apache.sshd.client.subsystem.sftp.SftpFileSystem;
-import org.apache.sshd.client.subsystem.sftp.SftpFileSystemProvider;
+import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystem;
+import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystemProvider;
 import org.apache.sshd.common.config.keys.FilePasswordProvider;
 import org.apache.sshd.common.util.io.NoCloseInputStream;
 import org.apache.sshd.common.util.io.NoCloseOutputStream;
@@ -40,7 +40,7 @@ public class SshSync {
 
                try (SshClient client = SshClient.setUpDefaultClient()) {
                        client.start();
-                       boolean osAgent = false;
+                       boolean osAgent = true;
                        SshAgentFactory agentFactory = osAgent ? new UnixAgentFactory() : new LocalAgentFactory();
                        // SshAgentFactory agentFactory = new LocalAgentFactory();
                        client.setAgentFactory(agentFactory);
@@ -55,15 +55,15 @@ public class SshSync {
                                System.out.print(keyPath + ": ");
                                Scanner s = new Scanner(System.in);
                                String password = s.next();
-                               KeyPair keyPair = ClientIdentityLoader.DEFAULT.loadClientIdentity(keyPath,
-                                               FilePasswordProvider.of(password));
-                               sshAgent.addIdentity(keyPair, "NO COMMENT");
+//                             KeyPair keyPair = ClientIdentityLoader.DEFAULT.loadClientIdentity(keyPath,
+//                                             FilePasswordProvider.of(password));
+//                             sshAgent.addIdentity(keyPair, "NO COMMENT");
                        }
 
-                       List<? extends Map.Entry<PublicKey, String>> identities = sshAgent.getIdentities();
-                       for (Map.Entry<PublicKey, String> entry : identities) {
-                               System.out.println(entry.getValue() + " : " + entry.getKey());
-                       }
+//                     List<? extends Map.Entry<PublicKey, String>> identities = sshAgent.getIdentities();
+//                     for (Map.Entry<PublicKey, String> entry : identities) {
+//                             System.out.println(entry.getValue() + " : " + entry.getKey());
+//                     }
 
                        ConnectFuture connectFuture = client.connect(login, host, port);
                        connectFuture.await();
diff --git a/pom.xml b/pom.xml
index 1c9976a63b3642f6303d17cee078716e2b91e821..6f82746d48825dc35b5bccf0a17f65447b1be373 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
        <!-- <url>http://repo.argeo.org/data/docs/argeo-2.1/site/argeo-commons/</url> -->
        <properties>
                <version.argeo-commons>2.1.77-SNAPSHOT</version.argeo-commons>
-               <version.argeo-tp>2.1.22</version.argeo-tp>
+               <version.argeo-tp>2.1.23</version.argeo-tp>
                <!-- RPM -->
                <argeo.rpm.release>7</argeo.rpm.release>
                <argeo.rpm.stagingRepository>/srv/rpmfactory/argeo-osgi-2/el7</argeo.rpm.stagingRepository>