In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to solve the file modified by maven-resources-plugin". In the daily operation, I believe many people have doubts about how to solve the problem when maven-resources-plugin modified the file. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to solve the file modified by maven-resources-plugin". Next, please follow the editor to study!
cause
In the process of analyzing the user's access log through the streaming task, it is necessary to parse the user's remote IP into the corresponding province and city. In this process, you need to load the ip library file. The ip library files are uniformly placed in a directory of the project src/main/resources, but an error is reported during loading:
Net.ipip.ipdb.InvalidDatabaseException: database file size error at net.ipip.ipdb.Reader.init (Reader.java:58) at net.ipip.ipdb.Reader. (Reader.java:25) at net.ipip.ipdb.Reader. (Reader.java:21) at net.ipip.ipdb.City. (City.java:17) at com.xxx.xxx.util.IpDbUtils. (IpDbUtils.java:24) Analysis
It can be run if the IP library is copied to the classes directory. You can rule out the problem with the IP library itself, so why can't maven run after it's packaged?
After many searches on the Internet, it turns out that maven-resources-plugin is to blame. When maven is packaged, it will encode a specific file so that the file is not available.
Solve
During the maven packaging process, the pom.xml configuration file can be configured to uniformly encode the project, but some files may not need to be re-encoded, such as IP library files, certificate files, etc.; re-coding may cause the file to be unavailable.
Org.apache.maven.plugins maven-resources-plugin ipdb xls at this point, on the "maven-resources-plugin modified how to solve the file," the study is over, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.