Browse Source

优化:目录调整,符合maven规范;maven编译指定.sh脚本换行符为unix换行

陈精华 5 years ago
parent
commit
a4bfde68bd

+ 1 - 1
Dockerfile

@@ -31,4 +31,4 @@ RUN yum install -y kde-l10n-Chinese &&\
 ENV LANG zh_CN.UTF-8
 ENV LC_ALL zh_CN.UTF-8
 ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-2.2.0-SNAPSHOT/bin
-ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-2.2.0-SNAPSHOT/conf/application.properties","-jar","/opt/kkFileView-2.2.0-SNAPSHOT/bin/kkFileView-2.2.0-SNAPSHOT.jar"]
+ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-2.2.0-SNAPSHOT/config/application.properties","-jar","/opt/kkFileView-2.2.0-SNAPSHOT/bin/kkFileView-2.2.0-SNAPSHOT.jar"]

+ 1 - 1
jodconverter-core/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java

@@ -143,7 +143,7 @@ public class OfficeUtils {
     public static String getCustomizedConfigPath() {
         String homePath = OfficeUtils.getHomePath();
         String separator = java.io.File.separator;
-        String configFilePath = homePath + separator + "conf" + separator + "application.properties";
+        String configFilePath = homePath + separator + "config" + separator + "application.properties";
         return configFilePath;
     }
 

+ 2 - 2
jodconverter-web/pom.xml

@@ -194,7 +194,7 @@
                 <filtering>true</filtering>
             </resource>
             <resource>
-                <directory>src/main/conf</directory>
+                <directory>src/main/config</directory>
                 <excludes>
                     <exclude>${build.exclude.resource}</exclude>
                 </excludes>
@@ -210,7 +210,7 @@
                 <configuration>
                     <appendAssemblyId>false</appendAssemblyId>
                     <descriptors>
-                        <descriptor>src/main/resources/assembly.xml</descriptor>
+                        <descriptor>src/main/assembly/assembly.xml</descriptor>
                     </descriptors>
                 </configuration>
                 <executions>

+ 12 - 6
jodconverter-web/src/main/resources/assembly.xml

@@ -11,18 +11,24 @@
     <includeBaseDirectory>true</includeBaseDirectory>
     <fileSets>
         <fileSet>
-            <directory>src/main/conf</directory>
-            <outputDirectory>${file.separator}conf</outputDirectory>
+            <directory>src/main/bin</directory>
+            <outputDirectory>${file.separator}bin</outputDirectory>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+            <fileMode>755</fileMode>
+            <lineEnding>unix</lineEnding>
         </fileSet>
         <fileSet>
             <directory>src/main/bin</directory>
             <outputDirectory>${file.separator}bin</outputDirectory>
-            <fileMode>755</fileMode>
+            <includes>
+                <include>*.bat</include>
+            </includes>
         </fileSet>
         <fileSet>
-            <directory>src/main/script</directory>
-            <outputDirectory>${file.separator}script</outputDirectory>
-            <fileMode>755</fileMode>
+            <directory>src/main/config</directory>
+            <outputDirectory>${file.separator}config</outputDirectory>
         </fileSet>
         <fileSet>
             <directory>src/main/log</directory>

jodconverter-web/src/main/script/install.sh → jodconverter-web/src/main/bin/install.sh


+ 3 - 3
jodconverter-web/src/main/bin/startup.bat

@@ -3,7 +3,7 @@ set "KKFILEVIEW_BIN_FOLDER=%cd%"
 cd "%KKFILEVIEW_BIN_FOLDER%"
 echo Using KKFILEVIEW_BIN_FOLDER %KKFILEVIEW_BIN_FOLDER%
 echo Starting kkFileView...
-echo Please check log file in ./log/kkFileView.log for more information
+echo Please check log file in ../log/kkFileView.log for more information
 echo You can get help in our official homesite: https://kkFileView.keking.cn
-echo If this project is helpful to you, please star it in https://gitee.com/kekingcn/file-online-preview
-java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=..\conf\application.properties -jar kkFileView-2.2.0-SNAPSHOT.jar -> ..\log\kkFileView.log
+echo If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers
+java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=..\config\application.properties -jar kkFileView-2.2.0-SNAPSHOT.jar -> ..\log\kkFileView.log

+ 3 - 3
jodconverter-web/src/main/bin/startup.sh

@@ -20,7 +20,7 @@ else
   done
   if [ ! -n "${FLAG}" ]; then
     echo "Installing OpenOffice"
-    sh ../script/install.sh
+    sh ./install.sh
   else 
     echo "Detected office component has been installed in $OFFICE_HOME"
   fi
@@ -28,5 +28,5 @@ fi
 echo "Starting kkFileView..."
 echo "Please execute ./showlog.sh to check log for more information"
 echo "You can get help in our official homesite: https://kkFileView.keking.cn"
-echo "If this project is helpful to you, please star it in https://gitee.com/kekingcn/file-online-preview"
-nohup java -Dfile.encoding=UTF-8 -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=../conf/application.properties -jar kkFileView-2.2.0-SNAPSHOT.jar > ../log/kkFileView.log 2>&1 &
+echo "If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers"
+nohup java -Dfile.encoding=UTF-8 -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=../config/application.properties -jar kkFileView-2.2.0-SNAPSHOT.jar > ../log/kkFileView.log 2>&1 &

jodconverter-web/src/main/conf/application.properties → jodconverter-web/src/main/config/application.properties


+ 0 - 1
jodconverter-web/src/main/resources/META-INF/app.properties

@@ -1 +0,0 @@
-app.id=file-preview