- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想从eclipse中的maven上传部署的war文件到nexus OSS,但是我得到一个错误信息。
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxx: Failed to deploy artifacts: Could not transfer artifact com.xxx.xxx:xxx:war:5.2.0 from/to nexus (http://xxx.xxx.xxx.xxx:8081/repository/maven-releases/): Access denied to http://xxx.xxx.xxx.xxx:8081/repository/maven-releases/com/xxx/xxx/xxx/5.2.0/xxx-5.2.0.war. Error code 401, Unauthorized -> [Help 1]
使用相同的配置(pom.xml
和 settings.xml
)我部署了一个 jar 文件并且它可以工作。
两者的区别在于文件类型和文件大小。一个是80mb的war文件,一个是400kb的jar文件。
有没有人有想法,如何解决这个问题?有没有配置,我想念的那些?这不是 1 周前发生的。我什么都不改,只把2019年的eclipse版本更新到2020年。
谢谢
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxx: Failed to deploy artifacts: Could not transfer artifact com.xxx.xxx:xxx:war:5.2.0 from/to nexus (http://192.168.xxx.xxx:8081/repository/maven-releases/): Access denied to http://192.168.xxx.xxx:8081/repository/maven-releases/com/xxx/xxx/xxx/5.2.0/xxx-5.2.0.war. Error code 401, Unauthorized
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact com.xxx.xxx:xxx:war:5.2.0 from/to nexus (http://192.168.xxx.xxx:8081/repository/maven-releases/): Access denied to http://192.168.xxx.xxx:8081/repository/maven-releases/com/xxx/xxx/xxx/5.2.0/xxx-5.2.0.war. Error code 401, Unauthorized
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
... 20 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.xxx.xxx:xxx:war:5.2.0 from/to nexus (http://192.168.xxx.xxx:8081/repository/maven-releases/): Access denied to http://192.168.xxx.xxx:8081/repository/maven-releases/com/xxx/xxx/xxx/5.2.0/xxx-5.2.0.war. Error code 401, Unauthorized
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:146)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:157)
... 22 more
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.xxx.xxx:xxx:war:5.2.0 from/to nexus (http://192.168.xxx.xxx:8081/repository/maven-releases/): Access denied to http://192.168.xxx.xxx:8081/repository/maven-releases/com/xxx/xxx/xxx/5.2.0/xxx-5.2.0.war. Error code 401, Unauthorized
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:301)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:213)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:386)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:142)
... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.xxx.xxx:xxx:war:5.2.0 from/to nexus (http://192.168.xxx.xxx:8081/repository/maven-releases/): Access denied to http://192.168.xxx.xxx:8081/repository/maven-releases/com/xxx/xxx/xxx/5.2.0/xxx-5.2.0.war. Error code 401, Unauthorized
at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:889)
at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
at io.takari.aether.connector.AetherRepositoryConnector$PutTask.flush(AetherRepositoryConnector.java:732)
at io.takari.aether.connector.AetherRepositoryConnector.put(AetherRepositoryConnector.java:373)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:295)
... 27 more
Caused by: io.takari.aether.connector.AuthorizationException: Access denied to http://192.168.xxx.xxx:8081/repository/maven-releases/com/xxx/xxx/xxx/5.2.0/xxx-5.2.0.war. Error code 401, Unauthorized
at io.takari.aether.connector.AetherRepositoryConnector.handleResponseCode(AetherRepositoryConnector.java:397)
at io.takari.aether.connector.AetherRepositoryConnector.access$8(AetherRepositoryConnector.java:391)
at io.takari.aether.connector.AetherRepositoryConnector$PutTask.run(AetherRepositoryConnector.java:703)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
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.xxx.xxx</groupId>
<artifactId>xxxxxx</artifactId>
<packaging>war</packaging>
<version>1.0.0</version>
<name>xxx xxx Maven Webapp</name>
<url>http://maven.apache.org</url>
<distributionManagement>
<repository>
<id>nexus</id>
<url>http://192.xxx.xxx.xxx:8081/repository/maven-releases/</url>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus OSS Internal Repository</name>
<url>http://192.xxx.xxx.xxx:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus OSS Internal Repository</name>
<url>http://192.xxx.xxx.xxx:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven.test.skip>true</maven.test.skip>
</properties>
<dependencies>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<defaultGoal>deploy</defaultGoal>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
设置.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>Z:/maven/repository</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>nexus</id>
<username>user</username>
<password>password</password>
</server>
</servers>
<mirrors>
</mirrors>
<profiles>
</profiles>
</settings>
最佳答案
我遇到了同样的问题,并且困惑了好几个星期。我发现这个问题是从 Eclipse 版本 202003 开始出现的。使用与 V201912 相同的配置或仅使用 CMD 部署就可以了。
我觉得是eclipse内嵌Maven的问题;
在 V202006 中更改为使用最近的外部 Maven Artifact 3.6.3 是可以的。因此,由于我有几十个工作区,所以我现在只能使用 V201912。
eclipse-202009需要java11,不再支持java8,所以,我们就永远忍受这个问题吧?
关于java - eclipse maven deploy war to nexus OSS Access denied Error code 401, Unauthorized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61536737/
我想为这 4 台设备提供 2 种不同的布局。我希望 Nexus4 (1280x720) 和 Nexus7(1024x600) 使用 layoutA,而 NexusOne/NexusS(均为 800x4
我遇到了无法解决的问题。 我买了一个便宜的vps,用ubuntu 12.10然后安装了tomcat7、maven和nexus。所有这些都是最新的。这是一个全新的安装。我启动并部署了nexus,cata
我可以使用HTTP header 中的HTTP基本身份验证凭据从Sonatype Nexus下载文件。 但是我无法通过将凭据作为url的一部分来实现这一点-像这样: http://admin:admi
当我将 Nexus war 安装到我的 tomcat 服务器 Nexus 时,在 Win 主目录中创建其文件夹等。我想将此重定向到我的不同目录。 含义..我希望nexus将其存储库存储在用户定义的文件
在我的内部 Sonatype Nexus 中,存储库(例如 Codehaus 快照)的路由选项卡上写着 --- Publishing --- | Status: Not published |
我安装了 Sonatype Nexus,我有默认用户 admin/admin123。现在我将 Authenticating Realm 更改为 LDAP 并删除了 XML Authenticating
我使用的是 Sonatype Nexus OSS 3.2 版。谁能指导我如何自定义 Nexus 运行的端口? 我找不到任何配置文件来自定义端口和自定义上下文路径? 目前 Nexus 正在运行 http
我正在尝试通过 nexus 3 api 删除存储库中的一些组件 我已按照以下问题中的说明进行操作 Using the Nexus3 API how do I get a list of artifac
我使用 Nexus 3,我想删除我的旧版本。在 Nexus 2 中有一个名为 Remove Releases From Repository 的计划任务。 . Nexus 3 中似乎缺少此任务。 我们
如何在 Nexus 3 中获取特定存储库的大小? 例如,Artifactory 通过 UI 显示存储库“磁盘上的大小”。 Nexus有类似的东西吗?如果不是 - 我如何通过脚本获取此信息? 最佳答案
我有一个生成版本化构建工件的非 Java 项目,我想将其上传到 Nexus 存储库。由于该项目不是 Java,因此它不使用 Maven 进行构建。而且我不想引入 Maven/POM 文件只是为了将文件
我最近将我们的存储库服务器升级到 nexus-3.0.0-M5,我注意到它存在两个问题。 我创建的任何存储库(托管)都会陷入远程连接挂起状态,并且无论我做什么它都不会改变。 我已经有一个巨大的存储/索
我想将一组工件从一个 Nexus 移动到另一个(下载并稍后上传)。我只能一个一个下载神器, ¿有没有办法下载整个文件夹? ¿是否有任何其他类型的操作,如导出/导入? 谢谢! 编辑: 我可以访问用户文件
我正在从 Nexus2 迁移到 Nexus3,并尝试在此过程中进行一些清理。 我真的很想重命名我正在迁移的一些存储库,因为 repositoryID 不如存储库名称那么清晰。在 Nexus 3 中,r
我操作一些 Docker 服务。其中一些是使用 Dockerfiles 自制的。我现在想将它们存储到 Sonatype Nexus 私有(private)存储库中,以将它们发布到我网络中的另一台服务器
首先,我是 Nexus 的新手。因此,如果这是一个太菜鸟的问题,请多多包涵。让我首先解释一下我们当前的构建/部署过程是如何工作的。 我们目前的做法: 我们有一个基于 Maven 的项目。有一个父 PO
我下载了一个解压的 Sonatype Nexus OSS。但不知道如何安装它。有一个自述文件。所有教程都会过时。 nexus.exe没有消息就立即完成。没有日志出现。与 nexus.exe insta
在研究 CI 工具时,我发现许多 CI 安装也集成到 Artifactory 存储库,如 SonaType Nexus 和 JFrog Artifactory。 这些工具听起来与 Maven 高度集成
我们在一些磁盘空间有限的旧硬件上运行 nexus,并希望删除超过某个阈值的工件。 除了 find 和 curl 的组合之外,还有什么办法可以做到这一点吗? ? 最佳答案 有一个计划任务可以自动删除旧的
在 Nexus Repository Manager 2 中,您可以将服务器上已删除的 Assets /组件从 .trash-folder 移动到存储库,以恢复您可能已删除的任何内容。这是因为 Nex
我是一名优秀的程序员,十分优秀!