说明
- 之前有人问有没有省市区的数据,由于文件过大(csv 大小:
70M+),不方便分享,又想永久保留在互联网上供人下载,所以就把文件放在了maven中央仓库。数据来源自网络,合集597050条,包含2020年的内容:- 省
- 市
- 市代码
- 县
- 县代码
- 镇
- 镇代码
- 居委会
- 居委会代码
- 已发布到 Maven 中央仓库的
2020年省市区
配置
-
发布额外内容(除
.jar/-sources.jar/-javadoc.jar),只需要添加org.codehaus.mojo:build-helper-maven-plugin依赖,配置artifacts即可- 注意 type 不要写错
- 注意 type 不要写错
- 注意 type 不要写错
-
示例配置见:
- https://repo1.maven.org/maven2/io/xuxiaowei/region/region/2020.0.1/region-2020.0.1.pom
- https://maven.aliyun.com/repository/public/io/xuxiaowei/region/region/2020.0.1/region-2020.0.1.pom
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.6.1</version> <executions> <execution> <id>attach-artifacts</id> <phase>package</phase> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file>${project.basedir}/region.csv</file> <type>csv</type> </artifact> </artifacts> </configuration> </execution> </executions> </plugin>