Record the difficulties encountered when hyperic-hq was used to build the development environment.

Source: Internet
Author: User

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

 

 

 

 

 

 

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.