平台编译问题
在平台编译过程中出现如下错误,请大神们帮看看怎么解决呃,多谢多谢:(:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default) on project x_base_core_project: Fatal error compiling: 无效的目标发行版: 11 ->
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
After correcting the problems, you can resume the build with the command
mvn <args> -rf :x_base_core_project
'build_server' errored after 16 s
Error in plugin "gulp-shell"
Message:
Command `npm run build_server_script` failed with exit code 1
搞定了,没修改JAVA_HOME 为java11, 只用 java -version 验证了一下 是 java11就开始编译了。不严谨了;P
编译中出现的新问题?
Using gulpfile E:\O2OA\O2OA\gulpfile.js
Starting 'build_web'...
Starting 'build_web_module'...
exec npm install && npm run o2-build { cwd: 'E:\\O2OA\\O2OA\\o2web\\source\\x_component_appstore' }
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/dotenv: Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2022-10-09T05_59_28_549Z-debug-0.log
exec npm install && npm run o2-build {
cwd: 'E:\\O2OA\\O2OA\\o2web\\source\\x_component_appstore_application'
} 这块总是过不去?那位大神碰到过
o2oa 7.2.6 可算编译成功了,也运行起来了:L,整个过程就四个字“太哇塞了”,编译过程全是细节上的问题,,maven3.6.3:我开始还以为是maven 版本的问题,换了好几个,maven3.8.x的,其实无所谓3.6以上就可以。本机java11要注意:一定要与jvm文件夹中的一模一样,注意最后的这个标识:SOURCE=".:76072a077ee1"要一致,java11 就是 java11 ,不要什么 Java11.06 之类的,这个坑可是把我卡的够呛。说起来都是细节问题。从早晨做完核酸,就一遍一遍的编译。好不容易编译过了,启动就闪退,查了论坛说:升级commons,我用的就是下载的7.2以上那个,还怎么升啊。最后灵机一动,把厂家运行包里的考了一份替换,就神奇的启动了。试了试功能,好像没问题的样子。过了一座山又是一道梁啊。视频看了一遍又一遍,手册都快背下来了。好在通过了。把笔记贴下面了,东西不多,但肯定能运行起来。
#### 准备说明
```powershell
#如何对从github或者gitee上clone下来的源码进行完整地编译,对中间遇到的问题进行分析和解决。
#https://www.bilibili.com/video/av88992965/
#JAVA 环境: java11
#maven环境: maven 3.6.3
#nodejs版本:16.17.0
#npm 版本:8.15.0
#o2oa版本: 7.2.5
#maven 配置阿里云镜像仓库
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
```
#### 编译
```powershell
#JAVA_HOME 目录要改到 C:\Program Files\Java\jdk-11.0.16 (严重踩坑)
#MAVEN_HOME 目录要改到 C:\maven381
#进入源码目录
cd e:/o2oa/o2oa
#解压 commons.zip 和 windwos_java11.zip
#将解压后的 commons 目录,复制到 E:\O2OA\O2OA\o2server 目录下
#新建目录 E:\O2OA\O2OA\o2server\jvm
#将解压后的windows_java11目录,复制到 E:\O2OA\O2OA\o2server\jvm 目录下
#按装工具(项目打包工具、前端 API 生成工具)
npm install -g gulp-ci jsdoc
#安装依赖
npm install
#windows版本的编译
npm run build_ci:win
#linux 版本的编译
npm run build_ci:linux
gulpconfig.js
#整个编译过程大概需要30分钟。编译完成后,会在目录下生成target/o2server目录,这就是可运行的服务器目录。可以将它拷贝到服务器,运行相应start_xxx命令就可以运行O2OA了。这个等会编译完成后,我们再看。
```
#JAVA_HOME 目录要改到 C:\Program Files\Java\jdk-11.0.16 (严重踩坑),这个不对是个连环坑,开始时用11.0.16编译过了,最后出现以下问题了,我改成java11就过了
编译中出现的新问题?
Using gulpfile E:\O2OA\O2OA\gulpfile.js
Starting 'build_web'...
Starting 'build_web_module'...
exec npm install && npm run o2-build { cwd: 'E:\\O2OA\\O2OA\\o2web\\source\\x_component_appstore' }
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
看起来是您的npm源连不上,你试试看换到国内的源
页:
[1]