Record the difficulties encountered when hyperic-hq was used to build the development environment.
This week, I received a new task to solve the bug after upgrading snmp to 3.0 in HQ (an open-source O & M monitoring platform developed using JAVA. HQ is 4.6. As a result, I cloned the project from gitlab and started my plug-in journey. It has been pitfall for a few days. Currently, it is normal that there should be only one last pitfall. It should be about the tomcat runtime environment. Don't talk much about it, start a trap-filling trip ......
Maven build pitfall:
- The maven version must be 2. X and 3. X are not successfully built.
- After you switch to maven 2.2, running mvn clean install directly fails to compile. After various attempts, the final command that can be compiled is:
clean compile install -Dmaven.javadoc.skip=true -DCI-build -Dall-installers -Dmaven.test.skip=true -e
Let's explain it. Use maven. javadoc. skip = true is because there are too many annotations in the project that do not comply with the javadoc specification. Therefore, if javadoc is compiled, a warning is prompted and compilation fails.
- Because javadoc is not compiled above, you must remove the javadoc dependency on the hq-pdk project in the project agent. Otherwise, the compilation of this project will fail, I will compare the modified files:
Assembly. xml:
Pom. xml
- I don't know why. During project compilation, hq-pdk/src/main/java/org/hyperic/hq/product/validation/PluginXmlValidator. the java class always reports an exception. If the code exception occurs in line 185, it is impossible to find a class method of apache log4j. If so, I will annotate it, no exception is reported for this part.
- It may be related to IDEA or maven library on the company's intranet. The maven-eclipse-plugin plug-in the pom file of Project hq-rendit will also fail to be compiled, so I also commented on it:
- In the pom file of the hq-server project, I added a plugin:
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>1.6</source><target>1.6</target></configuration></plugin>
Okay, so far, the maven build pitfalls I have encountered are almost the same. After the above transformation, my hq project can be successfully installed. However, after successful install, it is much more difficult to run the hq-web project locally than to build the project. Here I will record it and share it with you.
PS