向 Maven 中央仓库上传一个修改过的基于jeecg的autoPOI的 jar包记录(一)

本文涉及的产品
对象存储 OSS,20GB 3个月
对象存储 OSS,内容安全 1000次 1年
对象存储 OSS,恶意文件检测 1000次 1年
简介: 向 Maven 中央仓库上传一个修改过的基于jeecg的autoPOI的 jar包记录

1、注册https://issues.sonatype.org/账号

下面就代表注册好了,同时提交的工单也通过了

2、这里主要是goupId 需要进行认证,需要到域名注册商近一个txt的解析,以便确保这个是你的

通过下面来验证你的域名信息,这里主要是上面的工单号码要包括进去,我这里是一个链接地址作为text的返回

3、GPG签名

如果你没有设置过GPG签名,需要设置。

首先下载GPG工具

www.gnupg.org/download/

下载需要钱,没钱就付0元也可以下载,简单就下载win这个文件

下载运行后出现

遇到这种情况,就用命令行吧。

选择其中一个即可

执行一下脚本

gpg --generate-key

生成之后会填写一些个人信息

中间会填写一个passphrase,这个要记住。

通过下面的命令行,可以校验公钥的字符串发往与接收服务器是否成功。

发送

gpg --keyserver keyserver.ubuntu.com --send-keys FF490DBFEC050B856BB998716292A0B996ACB000

接收

gpg --keyserver keyserver.ubuntu.com --recv-keys FF490DBFEC050B856BB998716292A0B996ACB000

4、根据上面信息修改settings.xml和pom.xml文件,具体见附件

5、上传发布

mvn clean install deploy -P release

出现下面错误

原来是忘记mvn目录下的setting.xml忘记覆盖了,之后就出现下面发布正常了。

6、用之前的账号密码登录下面地址查看发布情况

 Nexus Repository Manager

不过上面好像没有搜到

7、就可以到中央仓库中搜索到自己发布的构件了!

中央仓库搜索网站:http://search.maven.org/,可以收到了发的jar包了。

国内可以在下面阿里的仓库上搜索

仓库服务

 

附上:settings.xml文件

<servers>    
    <server>
      <id>ossrh</id>
      <username>sonatype账号</username>
      <password>sonatype密码</password>
    </server>
  </servers>
  
  <profiles>  
  <profile>
      <id>ossrh</id>
        <properties>
          <gpg.executable>gpg</gpg.executable>
          <gpg.passphrase>自己passphrase密码</gpg.passphrase>
        </properties>
    </profile>
  </profiles>

pom.xml文件

<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.nbcio</groupId>
  <artifactId>autopoi-parent</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <name>autopoi-parent</name>
  <url>http://www.nbcio.com</url>
  <modules>
    <module>autopoi</module>
    <module>autopoi-web</module>
  </modules>
  <description> office 工具类 基于 poi</description>
  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:https://gitee.com/nbacheng/autopoi.git</connection>
    <developerConnection>scm:git:https://gitee.com/nbacheng/autopoi.git</developerConnection>
    <url>https://gitee.com/nbacheng/autopoi</url>
  </scm>
  <developers>
    <developer>
      <name>nbacheng</name>
      <email>498871963@qq.com</email>
    </developer>
  </developers>
  <properties>
    <autopoi.version>1.0.0</autopoi.version>
    <poi.version>5.0.0</poi.version>
    <xerces.version>2.9.1</xerces.version>
    <guava.version>29.0-jre</guava.version>
    <commons-lang.version>3.10</commons-lang.version>
    <slf4j.version>1.7.30</slf4j.version>
    <spring.version>5.1.0.RELEASE</spring.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <!-- poi -->
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml-full</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <!-- sax 读取时候用到的 -->
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>${xerces.version}</version>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-scratchpad</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <!-- excel背景
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>ooxml-schemas</artifactId>
        <version>1.4</version>
      </dependency>-->
      <!-- google 工具类 -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang.version}</version>
      </dependency>
      <!--日志 -->
      <!-- slf4j -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
        <scope>provided</scope>
      </dependency>
      <!--spring-web -->
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
        <optional>true</optional>
      </dependency>
      <!--servlet -->
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <!-- 模块版本 -->
      <dependency>
        <groupId>org.jeecgframework</groupId>
        <artifactId>autopoi</artifactId>
        <version>${autopoi.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
              <encoding>UTF-8</encoding>
            </configuration>
          </plugin>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <encoding>UTF-8</encoding>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!--Maven GPG插件用于使用以下配置对组件进行签名-->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!--Nexus Staging Maven插件是将组件部署到OSS并将其发布到Central Repository的推荐方法-->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.7</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>
        https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>
        https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M5</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

向 Maven 中央仓库上传一个修改过的基于jeecg的autoPOI的 jar包记录(二)+https://developer.aliyun.com/article/1505053


相关实践学习
借助OSS搭建在线教育视频课程分享网站
本教程介绍如何基于云服务器ECS和对象存储OSS,搭建一个在线教育视频课程分享网站。
相关文章
|
2月前
|
Java Maven 容器
java依赖冲突解决问题之Maven在编译打包过程中对依赖的jar包如何解决
java依赖冲突解决问题之Maven在编译打包过程中对依赖的jar包如何解决
|
13天前
|
Java Linux Maven
Maven 仓库
Maven 仓库
|
7天前
|
Java Linux Maven
|
11天前
|
Java Linux Maven
|
19天前
|
Java Linux Maven
Maven 仓库
Maven 仓库
|
9天前
|
Java Linux Maven
|
15天前
|
Java Linux Maven
|
21天前
|
Java Linux Maven
|
17天前
|
Java Linux Maven
|
23天前
|
Java Linux Maven

热门文章

最新文章

推荐镜像

更多
下一篇
无影云桌面