maven deploy:在nexus中上传工件时,创建了太多文件夹

我正在使用maven:deploy部署文件,使用Shell脚本从本地将工件上传到远程关系,一切正常。问题是假设存在伪像

    a/b/1.2.3/ab-1.2.3.jar 

然后在Nexus中,创建的文件夹结构为

     a/b/1/2/3/ab-1.2.3/1.2.3/ab-1.2.3-1.2.3.jar

这是不对的,我什至尝试转义。(使用/。的时间,也尝试使用\。),但是在运行时它将其视为另一个文件夹,并且部署失败,因为该位置不可用。任何帮助都会很棒。以下是我正在运行以推送jar的内部版本的输出消息

 Uploading: https://myrepo/nexus/repository/release-repo/a/b/1/2/3/ab-1.2.3.jar

下面是我正在使用的命令

   mvn deploy:deploy-file -DgroupId=${group_id:1} -DartifactId=${name_and_version} -Dversion=${artifact_version} -DgeneratePom=false -Dpackaging=jar -DrepositoryId=releases -Durl=https://myrepo/nexus/repository/release-repo -Dfile=${only_path}/${name_and_version}.jar -Djavax.net.ssl.trustStore=.keystore -s settings.xml -DpomFile=${only_path}/${name_and_version}.pom

还在调试时,这就是我得到的输出

   [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file' with basic configurator -->
[DEBUG]   (f) artifactId = abc-1.2.3 
[DEBUG]   (f) file = C:\dev\resources\a\b\1.2.3\abc-1.2.3.jar
[DEBUG]   (f) generatePom = false
[DEBUG]   (f) groupId = a.b.1.2.3
[DEBUG]   (s) localRepository =       id: local
      url: file:///c:/dev/.m2/repository/
   layout: default
snapshots: [enabled => true,update => always]
 releases: [enabled => true,update => always]

[DEBUG]   (f) offline = false
[DEBUG]   (f) packaging = jar
[DEBUG]   (f) pomFile = C:\dev\resources\a\b\1.2.3\abc-1.2.3..pom
[DEBUG]   (f) project = MavenProject: org.apache.maven:standalone-pom:1 @
[DEBUG]   (f) repositoryId = releases
[DEBUG]   (f) repositoryLayout = default
[DEBUG]   (f) retryFailedDeploymentCount = 1
[DEBUG]   (f) uniqueVersion = true
[DEBUG]   (f) updateReleaseInfo = false
[DEBUG]   (f) url = https://myewpo/nexus/repository/release
[DEBUG]   (f) version = 1.2.3
[DEBUG] -- end configuration --
sean19851214 回答:maven deploy:在nexus中上传工件时,创建了太多文件夹

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3110001.html

大家都在问