OSDN Git Service

mofify resetPwd to resetPassword name
authorsuccessli <successli@outlook.com>
Wed, 30 May 2018 02:55:11 +0000 (10:55 +0800)
committersuccessli <successli@outlook.com>
Wed, 30 May 2018 02:55:11 +0000 (10:55 +0800)
pom.xml
src/main/java/io/bytom/api/Key.java
src/test/java/io/bytom/integration/KeyTest.java

diff --git a/pom.xml b/pom.xml
index 610804f..a945c45 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,6 @@
     <!-- FIXME change it to the project's website -->
     <url>http://www.example.com</url>
 
-    <!--
     <developers>
         <developer>
             <name>successli</name>
@@ -21,7 +20,6 @@
             <url>https://github.com/successli</url>
         </developer>
     </developers>
-    -->
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                     <artifactId>maven-deploy-plugin</artifactId>
                     <version>2.8.2</version>
                 </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-source-plugin</artifactId>
+                    <version>2.2.1</version>
+                    <executions>
+                        <execution>
+                            <id>attach-sources</id>
+                            <goals>
+                                <goal>jar-no-fork</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>2.9.1</version>
+                    <executions>
+                        <execution>
+                            <id>attach-javadocs</id>
+                            <goals>
+                                <goal>jar</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>
                     <target>7</target>
                 </configuration>
             </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <!--这部分可有可无,加上的话则直接生成可运行jar包-->
+                    <!--<archive>-->
+                    <!--<manifest>-->
+                    <!--<mainClass>${exec.mainClass}</mainClass>-->
+                    <!--</manifest>-->
+                    <!--</archive>-->
+                    <descriptorRefs>
+                        <descriptorRef>jar-with-dependencies</descriptorRef>
+                    </descriptorRefs>
+                    <!-- mvn assembly:assembly -Dmaven.test.skip=true -->
+                    <!-- mvn javadoc:javadoc -->
+                </configuration>
+            </plugin>
         </plugins>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
     </build>
 </project>
index 1c6b097..40b355b 100644 (file)
@@ -58,7 +58,7 @@ public class Key {
         Type listType = new ParameterizedTypeImpl(List.class, new Class[]{Key.class});
         List<Key> keyList = client.request("list-keys", null, listType);
         logger.info("list-key:");
-        logger.info("size fo key:"+keyList.size());
+        logger.info("size of key:"+keyList.size());
         logger.info(keyList);
         return keyList;
     }
@@ -87,7 +87,7 @@ public class Key {
      * @param newPwd new password used to set
      * @throws BytomException BytomException
      */
-    public static void resetPwd(Client client, String xpub, String oldPwd, String newPwd) throws BytomException {
+    public static void resetPassword(Client client, String xpub, String oldPwd, String newPwd) throws BytomException {
         Map<String, String> req = new HashMap<>();
         req.put("xpub", xpub);
         req.put("old_password", oldPwd);
index a51ad8a..d173727 100644 (file)
@@ -47,11 +47,11 @@ public class KeyTest {
     }
 
     @Test
-    public void testClientKeyResetPwd() throws BytomException {
+    public void testClientKeyResetPassword() throws BytomException {
         client = TestUtils.generateClient();
         List<Key> keyList = Key.list(client);
         String xpub = keyList.get(keyList.size()-1).xpub;
-        Key.resetPwd(client, xpub, "123456", "123456789");
+        Key.resetPassword(client, xpub, "123456", "123456789");
         Key.delete(client, xpub, "123456789");
     }