bladex boot 3.4.0 打包失败,提示Authentication failed

Blade 未结 2 128
six_six_2005
six_six_2005 剑圣 2024-05-07 19:10
悬赏:5

一、该问题的重现步骤是什么?

1. 按 https://sns.bladex.cn/q-762.html 和开发手册的指导,在setting配置了令牌,使用mave 3.9.2 和maven 3.6.2分别执行打包命令均失败

2. 可以正常编译运行

3.


二、你期待的结果是什么?实际看到的又是什么?

打包成功

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladex boot 3.4.0, windows 10

四、请提供详细的错误堆栈信息,这很重要。

PS D:\MyGit\drug-verification\drug-verification-upper-bladex> mvn clean package -U -Pdev -DskipTests

[INFO] Scanning for projects...

Downloading from aliyun-repos: https://maven.aliyun.com/repository/public/org/springblade/platform/blade-bom/3.3.1.RELEASE/blade-bom-3.3.1.RELEASE.pom

Downloading from bladex: https://center.javablade.com/api/packages/blade/maven/org/springblade/platform/blade-bom/3.3.1.RELEASE/blade-bom-3.3.1.RELEASE.pom

Downloading from central: https://repo.maven.apache.org/maven2/org/springblade/platform/blade-bom/3.3.1.RELEASE/blade-bom-3.3.1.RELEASE.pom

[ERROR] [ERROR] Some problems were encountered while processing the POMs:

[ERROR] Non-resolvable import POM: Could not transfer artifact org.springblade.platform:blade-bom:pom:3.3.1.RELEASE from/to bladex (https://center.javablade.com/api/packages/blade/maven): Authentication failed for https://center

.javablade.com/api/packages/blade/maven/org/springblade/platform/blade-bom/3.3.1.RELEASE/blade-bom-3.3.1.RELEASE.pom 401 Unauthorized @ line 31, column 25

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 43, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-http:jar is missing. @ line 53, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-api-crypto:jar is missing. @ line 57, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-datascope:jar is missing. @ line 61, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-tenant:jar is missing. @ line 65, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-sharding:jar is missing. @ line 69, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-develop:jar is missing. @ line 73, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 77, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-excel:jar is missing. @ line 81, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-social:jar is missing. @ line 85, column 21

[ERROR] 'dependencies.dependency.version' for com.github.xiaoymin:knife4j-openapi2-ui:jar is missing. @ line 89, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-auto:jar is missing. @ line 93, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-test:jar is missing. @ line 98, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-report:jar is missing. @ line 104, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-flowable:jar is missing. @ line 109, column 21

[ERROR] 'dependencies.dependency.version' for com.github.whvcse:easy-captcha:jar is missing. @ line 114, column 21

[ERROR] 'dependencies.dependency.version' for com.baomidou:mybatis-plus-generator:jar is missing. @ line 119, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-oss:jar is missing. @ line 124, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-sms:jar is missing. @ line 129, column 21

[ERROR] 'dependencies.dependency.version' for com.amazonaws:aws-java-sdk-s3:jar is missing. @ line 134, column 21

[ERROR] 'dependencies.dependency.version' for io.minio:minio:jar is missing. @ line 139, column 21

[ERROR] 'dependencies.dependency.version' for com.aliyun.oss:aliyun-sdk-oss:jar is missing. @ line 144, column 21

[ERROR] 'dependencies.dependency.version' for com.aliyun:aliyun-java-sdk-core:jar is missing. @ line 149, column 21

[ERROR] 'dependencies.dependency.version' for com.huaweicloud:esdk-obs-java:jar is missing. @ line 154, column 21

[ERROR] 'dependencies.dependency.version' for com.qcloud:cos_api:jar is missing. @ line 159, column 21

[ERROR] 'dependencies.dependency.version' for com.github.qcloudsms:qcloudsms:jar is missing. @ line 164, column 21

[ERROR] 'dependencies.dependency.version' for com.qiniu:qiniu-java-sdk:jar is missing. @ line 169, column 21

[ERROR] 'dependencies.dependency.version' for com.yunpian.sdk:yunpian-java-sdk:jar is missing. @ line 174, column 21

[ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-liteflow:jar is missing. @ line 179, column 21

[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 209, column 21

 @

[ERROR] The build could not read 1 project -> [Help 1]

[ERROR]

[ERROR]   The project org.springblade:BladeX-Boot:3.3.1.RELEASE (D:\MyGit\drug-verification\drug-verification-upper-bladex\pom.xml) has 31 errors

[ERROR]     Non-resolvable import POM: Could not transfer artifact org.springblade.platform:blade-bom:pom:3.3.1.RELEASE from/to bladex (https://center.javablade.com/api/packages/blade/maven): Authentication failed for https://ce

nter.javablade.com/api/packages/blade/maven/org/springblade/platform/blade-bom/3.3.1.RELEASE/blade-bom-3.3.1.RELEASE.pom 401 Unauthorized @ line 31, column 25 -> [Help 2]

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 43, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-http:jar is missing. @ line 53, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-api-crypto:jar is missing. @ line 57, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-datascope:jar is missing. @ line 61, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-tenant:jar is missing. @ line 65, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-sharding:jar is missing. @ line 69, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-develop:jar is missing. @ line 73, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 77, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-excel:jar is missing. @ line 81, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-social:jar is missing. @ line 85, column 21

[ERROR]     'dependencies.dependency.version' for com.github.xiaoymin:knife4j-openapi2-ui:jar is missing. @ line 89, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-core-auto:jar is missing. @ line 93, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-core-test:jar is missing. @ line 98, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-report:jar is missing. @ line 104, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-flowable:jar is missing. @ line 109, column 21

[ERROR]     'dependencies.dependency.version' for com.github.whvcse:easy-captcha:jar is missing. @ line 114, column 21

[ERROR]     'dependencies.dependency.version' for com.baomidou:mybatis-plus-generator:jar is missing. @ line 119, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-oss:jar is missing. @ line 124, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-sms:jar is missing. @ line 129, column 21

[ERROR]     'dependencies.dependency.version' for com.amazonaws:aws-java-sdk-s3:jar is missing. @ line 134, column 21

[ERROR]     'dependencies.dependency.version' for io.minio:minio:jar is missing. @ line 139, column 21

[ERROR]     'dependencies.dependency.version' for com.aliyun.oss:aliyun-sdk-oss:jar is missing. @ line 144, column 21

[ERROR]     'dependencies.dependency.version' for com.aliyun:aliyun-java-sdk-core:jar is missing. @ line 149, column 21

[ERROR]     'dependencies.dependency.version' for com.huaweicloud:esdk-obs-java:jar is missing. @ line 154, column 21

[ERROR]     'dependencies.dependency.version' for com.qcloud:cos_api:jar is missing. @ line 159, column 21

[ERROR]     'dependencies.dependency.version' for com.github.qcloudsms:qcloudsms:jar is missing. @ line 164, column 21

[ERROR]     'dependencies.dependency.version' for com.qiniu:qiniu-java-sdk:jar is missing. @ line 169, column 21

[ERROR]     'dependencies.dependency.version' for com.yunpian.sdk:yunpian-java-sdk:jar is missing. @ line 174, column 21

[ERROR]     'dependencies.dependency.version' for org.springblade:blade-starter-liteflow:jar is missing. @ line 179, column 21

[ERROR]     'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 209, column 21

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

PS D:\MyGit\drug-verification\drug-verification-upper-bladex>

五、若有更多详细信息,请在下面提供。

正常运行是可以的,就是无法打包。


POM:

xml versionencodingxmlnsxmlns::schemaLocation4.0.0org.springbladeBladeX-Bootjar3.3.1.RELEASEblade-api3.3.1.RELEASE1.83.8.1UTF-8UTF-8192.168.0.188adminadmin12345blade0.42.0org.springblade.platformblade-bom${bladex.project.version}pomimportorg.springbladeblade-core-bootorg.springbladeblade-core-cloudorg.springbladeblade-starter-httporg.springbladeblade-starter-api-cryptoorg.springbladeblade-starter-datascopeorg.springbladeblade-starter-tenantorg.springbladeblade-starter-shardingorg.springbladeblade-starter-developorg.springbladeblade-starter-swaggerorg.springbladeblade-starter-excelorg.springbladeblade-starter-socialcom.github.xiaoyminknife4j-openapi2-uiorg.springbladeblade-core-autoprovidedorg.springbladeblade-core-testtestorg.springbladeblade-starter-reportorg.springbladeblade-starter-flowablecom.github.whvcseeasy-captchacom.baomidoumybatis-plus-generatororg.springbladeblade-starter-ossorg.springbladeblade-starter-smscom.amazonawsaws-java-sdk-s3io.miniominiocom.aliyun.ossaliyun-sdk-osscom.aliyunaliyun-java-sdk-corecom.huaweicloudesdk-obs-javacom.qcloudcos_apicom.github.qcloudsmsqcloudsmscom.qiniuqiniu-java-sdkcom.yunpian.sdkyunpian-java-sdkorg.springbladeblade-starter-litefloworg.projectlomboklombokprovided${bladex.project.id}src/main/resourcessrc/main/java**/*.xmlorg.springframework.bootspring-boot-maven-plugin2.7.11${project.build.finalName}repackageio.fabric8docker-maven-plugin${docker.fabric.version}${docker.username}${docker.password}${docker.registry.url}${docker.namespace}/${project.build.finalName}:${project.version}${project.name}${project.basedir}/Dockerfile${basedir}/target/${project.build.finalName}.jarorg.springframework.bootspring-boot-maven-pluginmaven-compiler-plugin${maven.plugin.version}${java.version}${java.version}UTF-8-parametersaliyun-reposAliyun Public Repositoryhttps://maven.aliyun.com/repository/publicfalsebladexBladeX Release Repositoryhttps://center.javablade.com/api/packages/blade/mavenaliyun-pluginAliyun Public Pluginhttps://maven.aliyun.com/repository/publicfalsebladexBladeX Release Repositoryhttps://center.javablade.com/api/packages/blade/mavenbladexBladeX Snapshot Repositoryhttps://center.javablade.com/api/packages/blade/maven


setting.xml  以下xml中token做了脱敏,是完全复制的https://sns.bladex.cn/q-762.html 中的xml,只是改了token


<?xml version="1.0" encoding="UTF-8"?>


<!--

Licensed to the Apache Software Foundation (ASF) under one

or more contributor license agreements.  See the NOTICE file

distributed with this work for additional information

regarding copyright ownership.  The ASF licenses this file

to you under the Apache License, Version 2.0 (the

"License"); you may not use this file except in compliance

with the License.  You may obtain a copy of the License at


    http://www.apache.org/licenses/LICENSE-2.0


Unless required by applicable law or agreed to in writing,

software distributed under the License is distributed on an

"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

KIND, either express or implied.  See the License for the

specific language governing permissions and limitations

under the License.

-->


<!--

 | This is the configuration file for Maven. It can be specified at two levels:

 |

 |  1. User Level. This settings.xml file provides configuration for a single user,

 |                 and is normally provided in ${user.home}/.m2/settings.xml.

 |

 |                 NOTE: This location can be overridden with the CLI option:

 |

 |                 -s /path/to/user/settings.xml

 |

 |  2. Global Level. This settings.xml file provides configuration for all Maven

 |                 users on a machine (assuming they're all using the same Maven

 |                 installation). It's normally provided in

 |                 ${maven.conf}/settings.xml.

 |

 |                 NOTE: This location can be overridden with the CLI option:

 |

 |                 -gs /path/to/global/settings.xml

 |

 | The sections in this sample file are intended to give you a running start at

 | getting the most out of your Maven installation. Where appropriate, the default

 | values (values used when the setting is not specified) are provided.

 |

 |-->

<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">

  <!-- localRepository

   | The path to the local repository maven will use to store artifacts.

   |

   | Default: ${user.home}/.m2/repository

  <localRepository>/path/to/local/repo</localRepository>

  -->


  <!-- interactiveMode

   | This will determine whether maven prompts you when it needs input. If set to false,

   | maven will use a sensible default value, perhaps based on some other setting, for

   | the parameter in question.

   |

   | Default: true

  <interactiveMode>true</interactiveMode>

  -->


  <!-- offline

   | Determines whether maven should attempt to connect to the network when executing a build.

   | This will have an effect on artifact downloads, artifact deployment, and others.

   |

   | Default: false

  <offline>false</offline>

  -->


  <!-- pluginGroups

   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.

   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers

   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.

   |-->

  <pluginGroups>

    <!-- pluginGroup

     | Specifies a further group identifier to use for plugin lookup.

    <pluginGroup>com.your.plugins</pluginGroup>

    -->

  </pluginGroups>


  <!-- TODO Since when can proxies be selected as depicted? -->

  <!-- proxies

   | This is a list of proxies which can be used on this machine to connect to the network.

   | Unless otherwise specified (by system property or command-line switch), the first proxy

   | specification in this list marked as active will be used.

   |-->

  <proxies>

    <!-- proxy

     | Specification for one proxy, to be used in connecting to the network.

     |

    <proxy>

      <id>optional</id>

      <active>true</active>

      <protocol>http</protocol>

      <username>proxyuser</username>

      <password>proxypass</password>

      <host>proxy.host.net</host>

      <port>80</port>

      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>

    </proxy>

    -->

  </proxies>


  <!-- servers

   | This is a list of authentication profiles, keyed by the server-id used within the system.

   | Authentication profiles can be used whenever maven must make a connection to a remote server.

   |-->

  <servers>

    <!-- server

     | Specifies the authentication information to use when connecting to a particular server, identified by

     | a unique name within the system (referred to by the 'id' attribute below).

     |

     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are

     |       used together.

     |

    <server>

      <id>deploymentRepo</id>

      <username>repouser</username>

      <password>repopwd</password>

    </server>

    -->


    <!-- Another sample, using keys to authenticate.

    <server>

      <id>siteServer</id>

      <privateKey>/path/to/private/key</privateKey>

      <passphrase>optional; leave empty if not used.</passphrase>

    </server>

    -->

    

    <server>

      <id>bladex</id>

      <configuration>

        <httpHeaders>

          <property>

            <name>Authorization</name>

            <value>token 788f**************054</value>

          </property>

        </httpHeaders>

      </configuration>

    </server>

  </servers>


  <!-- mirrors

   | This is a list of mirrors to be used in downloading artifacts from remote repositories.

   |

   | It works like this: a POM may declare a repository to use in resolving certain artifacts.

   | However, this repository may have problems with heavy traffic at times, so people have mirrored

   | it to several places.

   |

   | That repository definition will have a unique id, so we can create a mirror reference for that

   | repository, to be used as an alternate download site. The mirror site will be the preferred

   | server for that repository.

   |-->

  <mirrors>

    <!-- mirror

     | Specifies a repository mirror site to use instead of a given repository. The repository that

     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used

     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.

     |

    <mirror>

      <id>mirrorId</id>

      <mirrorOf>repositoryId</mirrorOf>

      <name>Human Readable Name for this Mirror.</name>

      <url>http://my.repository.com/repo/path</url>

    </mirror>

     -->

    <mirror>

        <id>aliyun-repos</id>

        <name>Aliyun Public Repository</name>

        <url>https://maven.aliyun.com/repository/public</url>        

        <mirrorOf>*,!bladex</mirrorOf>

    </mirror>

    <mirror>

        <id>nexus</id>

        <name>nexus repositories</name>

        <url>https://repo1.maven.org/maven2</url>

        <mirrorOf>*,!bladex</mirrorOf>

    </mirror>

  </mirrors>


  <!-- profiles

   | This is a list of profiles which can be activated in a variety of ways, and which can modify

   | the build process. Profiles provided in the settings.xml are intended to provide local machine-

   | specific paths and repository locations which allow the build to work in the local environment.

   |

   | For example, if you have an integration testing plugin - like cactus - that needs to know where

   | your Tomcat instance is installed, you can provide a variable here such that the variable is

   | dereferenced during the build process to configure the cactus plugin.

   |

   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles

   | section of this document (settings.xml) - will be discussed later. Another way essentially

   | relies on the detection of a property, either matching a particular value for the property,

   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a

   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.

   | Finally, the list of active profiles can be specified directly from the command line.

   |

   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact

   |       repositories, plugin repositories, and free-form properties to be used as configuration

   |       variables for plugins in the POM.

   |

   |-->

  <profiles>

    <!-- profile

     | Specifies a set of introductions to the build process, to be activated using one or more of the

     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>

     | or the command line, profiles have to have an ID that is unique.

     |

     | An encouraged best practice for profile identification is to use a consistent naming convention

     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.

     | This will make it more intuitive to understand what the set of introduced profiles is attempting

     | to accomplish, particularly when you only have a list of profile id's for debug.

     |

     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.

    <profile>

      <id>jdk-17</id>


      <activation>

        <jdk>17</jdk>

      </activation>


      <repositories>

        <repository>

          <id>jdk17</id>

          <name>Repository for JDK 17 builds</name>

          <url>http://www.myhost.com/maven/jdk17</url>

          <layout>default</layout>

          <snapshotPolicy>always</snapshotPolicy>

        </repository>

      </repositories>

    </profile>

    -->


    <!--

     | Here is another profile, activated by the property 'target-env' with a value of 'dev', which

     | provides a specific path to the Tomcat instance. To use this, your plugin configuration might

     | hypothetically look like:

     |

     | ...

     | <plugin>

     |   <groupId>org.myco.myplugins</groupId>

     |   <artifactId>myplugin</artifactId>

     |

     |   <configuration>

     |     <tomcatLocation>${tomcatPath}</tomcatLocation>

     |   </configuration>

     | </plugin>

     | ...

     |

     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to

     |       anything, you could just leave off the <value/> inside the activation-property.

     |

    <profile>

      <id>env-dev</id>


      <activation>

        <property>

          <name>target-env</name>

          <value>dev</value>

        </property>

      </activation>


      <properties>

        <tomcatPath>/path/to/tomcat/instance</tomcatPath>

      </properties>

    </profile>

    -->

  </profiles>


  <!-- activeProfiles

   | List of profiles that are active for all builds.

   |

  <activeProfiles>

    <activeProfile>alwaysActiveProfile</activeProfile>

    <activeProfile>anotherAlwaysActiveProfile</activeProfile>

  </activeProfiles>

  -->

</settings>


2条回答
  • 私服下载3.3.1版本bladex-tool源码本地install以后打包。

    0 讨论(0)
  • 2024-05-07 22:16

    能不能提供一下操作步骤说明?对bladex-tool下载后解压到哪个文件夹有要求吗?

    回答: 2024-05-13 17:17

    pom同步bladex-tool 3.4.0,也是报一样的错,未授权401



    Failure to transfer com.oracle:ojdbc7:pom:12.2.0.1 from https://center.javablade.com/api/packages/blade/maven was cached in the local repository, resolution will not be reattempted until the update interval of bladex has elapsed or updates are forced. Original error: Could not transfer artifact com.oracle:ojdbc7:pom:12.2.0.1 from/to bladex (https://center.javablade.com/api/packages/blade/maven): status code: 401, reason phrase: Unauthorized (401)

    image.png


    回答: 2024-05-13 17:19

    pom同步bladex-tool 3.4.0,也是报一样的错,未授权401



    Failure to transfer com.oracle:ojdbc7:pom:12.2.0.1 from https://center.javablade.com/api/packages/blade/maven was cached in the local repository, resolution will not be reattempted until the update interval of bladex has elapsed or updates are forced. Original error: Could not transfer artifact com.oracle:ojdbc7:pom:12.2.0.1 from/to bladex (https://center.javablade.com/api/packages/blade/maven): status code: 401, reason phrase: Unauthorized (401)

    image.png


    0 讨论(0)
提交回复