In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this article, the editor introduces in detail "how to compile and use Java". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to compile and use Java" can help you solve your doubts.
O2OA on the github open source platform source code, users can Fork the source code, and their own server compilation, packaging. Server packaging is also supported after self-modification of the source code.
1. Fork source code to your own gitee repository
1. Visit the gitee repository of the O2OA project
2. Click Fork to Fork the O2OA source code to your gitee [Code Cloud] repository.
Second, install Github Desktop
1. Download Github Desktop: https://desktop.github.com/
Third, use the Github Desktop client Clone source code to local
1) query the Clone address of the O2OA project in your gitee repository [Code Cloud]
2. Open the Github Desktop client and clone the source code from your own github repository
1) Open the Github Desktop client and click Clone a repository form the Internet...
2) Select the URL tab in the pop-up Clone a repository dialog box, enter the local address of URL and Clone, and click Clone to start the source code of the Clone project:
Please note that we recommend that you Clone the source code that you previously Fork to your gitee repository, and you can take a look at the address of Clone:
For example, https://gitee.com/ your github account / O2OA instead of https://gitee.com/liyihz2008/O2OA
3) Clone, wait for Clone to complete. As shown in the following figure:
Clone projects from Github are much slower than gitee and may take more time.
Configure the source code compilation environment 1. Install Nodejs
Nodejs download address: http://nodejs.cn/download/ (you can also download it from the official website: https://nodejs.org/en/)
Download windows installer (.mis)
Install it directly after downloading, and next directly until the installation is complete. As shown in the following figure:
2. Install and configure maven environment
1) download address of Maven: http://maven.apache.org/download.cgi. After downloading, decompress and select the storage path.
2) first open my computer-> Properties-> Advanced system Settings
Create a new system variable: MAVEN_HOME, copy the path of Maven
Copy and paste in the system variable: path:% MAVEN_HOME%\ bin
Win+R shortcut key opens the command line and enter: mvn-v. If the following pattern appears, the configuration is successful.
3. Install and configure ant environment
The official http://ant.apache.org/bindownload.cgi downloads the new version (currently Ant1.10.5) of ant and gets a compressed package of apache-ant-1.10.5-bin.zip. Extract it to your hard drive, for example: e:\ Work\ apache-ant-1.10.5.
Create a new system variable: ANT_HOME, and copy the path to Ant, as shown in the following figure:
Copy and paste in the system variable: path:% ANT_HOME%\ bin:
Copy and paste in the system variable: classpath:% ANT_HOME%\ lib
Win+R shortcut key opens the command line and enter: ant. If the following pattern appears, the configuration is successful.
Fifth, compile the source code for the first time
After downloading the o2server project source code directly into eclipse, there will be a lot of dependency errors, because a large number of dependent packages are not compiled into jar files, so you need to compile the whole o2server project in the downloaded source code first.
1. Open the command prompt tool and cd to the o2oa/o2server directory (or open powershell (win10) directly in the o2server directory)
Cd E:\ O2\ o2oa\ o2server
2. Execute the command directly under the o2server directory to compile: mvn install, and start compiling the source code:
Mvn install
Until the compilation is completed (a total of 57 projects, depending on the performance of the development machine, about 5-20 minutes), as shown in the following figure:
3. Package installer: ant
Ant
After the compilation is complete, you can directly support the ant command for packaging:
Until the packaging is completed (about 5-10 minutes depending on the performance of the development machine), as shown in the following figure:
Use Eclipse to import o2oa source code
Note that when the source code is imported into the eclipse project, maven downloads the dependent project jar package from mvn repository, which may take some time, about 5-30 minutes, as the case may be.
When all dependent packages have been downloaded, if there are still a large number of errors in eclipse, please execute Maven-> Update Project... on the o2server project.
7. About pom.xml error report in Eclipse
1. Pom.xml error about o2server project:
The pom.xml error caused by the three relative path dependent references can be ignored and does not affect the project compilation at all.
2. Pom.xml error report in x_base_core_project project and all * _ core_entity projects
The execution error in maven plugin can be ignored and does not affect the project compilation. The solution can be Baidu: maven plugin execution error, there are many solutions, our source code will be updated in the near future to solve this problem.
VIII. Separate project compilation
After importing the project into eclipse, you can also use the maven plug-in in eclipse to compile individual projects.
Open the specified project directly and run Run as... > Maven install on pom.xml, as shown in the following figure:
When the compilation is complete, the jar package will be compiled to the directory: o2oa\ o2server\ store\ jars,war package will be compiled to the directory: o2oa\ o2server\ store
After reading this, the article "how to compile and use Java" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.