Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

1.安装前置依赖

a.如何使用ant执行命令

Code Block
cd apache-ant-1.7.1/bin
(windows:) ant -f setup-maven.xml    (mac/linux:)  ./ant -f setup-maven.xml

b. Permission denied: apache-ant-1.7.1/bin/ant

Code Block
chmod 777 apache-ant-1.7.1/bin/ant

c. Error: JAVA_HOME (M2_HOME)is not defined correctly.

Code Block
MacOSX:
# 查询 java 路径
-> /usr/libexec/java_home -v
-> /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
# 配置 JAVA_HOME(由于需要Maven Home,所以在此也做了配置)
# MacOSX 如何配置 JAVA_HOME https://blog.csdn.net/q62506212/article/details/96448410
export M2_HOME=/Users/mac/dev-install/apache-maven-3.5.4
export M2=$M2_HOME/bin
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home"
export PATH=$M2:$PATH:$CHD:$JAVA_HOME/bin


windows:
...(待补充)

d. Cannot run program "mvn.cmd"

Code Block
MacOSX:
1.使用文本编辑器打开 apache-ant-1.7.1/bin/setup-maven.xml
2.全局替换 mvn.cmd 为 mvn

e. The specified file '/Users/mac/Downloads/apache-ant-1.7.1/bin/D:/Joget-DX7-Enterprise/apache-tomcat-8.5.41/webapps/jw/WEB-INF/lib/sqljdbc-4.0.jar' not exists

Code Block
修改 apache-ant-1.7.1/bin/setup-maven.xml 内部的jar文件路径为本机安装Joget目录,比如:
1.安装路径为 /Users/mac/z-svt/joget/joget-install-version/joget-enterprise-linux-7.0.0
2.所以lib jar 文件在 /Users/mac/z-svt/joget/joget-install-version/joget-enterprise-linux-7.0.0/apache-tomcat-8.5.41/webapps/jw/WEB-INF/lib
3.根据情况修改 setup-maven.xml路径
		<exec executable="mvn">
            <arg value="install:install-file"/>
            <arg value="-DgroupId=com.microsoft"/>
            <arg value="-DartifactId=sqljdbc"/>
            <arg value="-Dversion=4.0"/>
            <arg value="-Dpackaging=jar"/>
            <arg value="-Dfile=/Users/mac/z-svt/joget/joget-install-version/joget-enterprise-linux-7.0.0/apache-tomcat-8.5.41/webapps/jw/WEB-INF/lib/sqljdbc-4.0.jar"/>
        </exec>


Info

需要注意的是,全局替换后可能有些jar文件不存在,也可能在新版本已经删除,需要根据joget安装的版本目录进行检查替换

Joget 安装目录(/Users/mac/z-svt/joget/joget-install-version/joget-enterprise-linux-7.0.0/apache-tomcat-8.5.41/webapps/jw/WEB-INF/lib)



2.编译Joget源码

a. Test  Run Falied

Code Block
修改相应模块的POM.xml 文件, 增加 <skipTests>true</skipTests>
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.4.3</version>
    <configuration>
        <skipTests>true</skipTests>
    </configuration>
</plugin>

b. 缺少Jar包

Code Block
根据 Jar 文件去查找 ant -f setup-maven.xml 时有没有编译进去,如果安装正常,install 是不会出现缺少jar包的问题