我想部署一个库到我公司的远程存储库。
这是我第一次想将库项目部署到远程存储库。
我收到以下错误消息:
org.sonatype.aether.transfer.artifactNotFoundException:找不到工件com.http: httpkit: jar: 0.0.1internal.repo(http://jenkins.internal.com/)
也许我理解了一些完全错误的地方,但错误消息说,在远程存储库中不存在我第一次尝试部署的工件。所以当然没有这样的人工制品。为什么maven在我尝试上载工件时尝试获取工件?
我的pom文件:
<?xml version="1.0" encoding="UTF-8"?>
<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.0http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.http</groupId>
<artifactId>httpkit</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>httpkit</name>
<properties>
<platform.version> 4.1.1.4</platform.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${platform.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- Deploy to internal maven repository -->
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Internal Repository</name>
<url>http://jenkins.internal.com/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.3</version>
<configuration>
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory>
<nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
<sdk>
<platform>16</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
我打电话
MVN部署
从命令行
有什么建议可以解决这个问题吗?
编辑:故障日志(正在运行mvn部署-X)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project httpkit: Failed to deploy artifacts: Could not find artifact com.http:httpkit:jar:0.0.1 in internal.repo (http://jenkins.internal.com) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project httpkit: Failed to deploy artifacts: Could not find artifact com.http:httpkit:jar:0.0.1 in internal.repo (http://jenkins.internal.com)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not find artifact com.http:httpkit:jar:0.0.1 in internal.repo (http://jenkins.internal.com)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not find artifact com.http:httpkit:jar:0.0.1 in internal.repo (http://jenkins.internal.com)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:157)
... 21 more
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not find artifact com.http:httpkit:jar:0.0.1 in internal.repo (http://jenkins.internal.com)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:280)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:211)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:443)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 23 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact com.http:httpkit:jar:0.0.1 in internal.repo (http://jenkins.internal.com/)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:837)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:467)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:274)
... 26 more
[ERROR]
[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/MojoExecutionException
我们遇到过这个问题。几个小时后,我们认为这是内部存储库中的磁盘空间问题。
我也有这个问题。在做了很多(非常多)拉扯头发之后,我意识到我只是拼错了存储库的名称!
因此,以OP为例:
Failed to deploy artifacts: Could not find artifact com.http:httpkit:jar:0.0.1 in internal.
repo (http://jenkins.intrnal.com)
实际上可能意味着
Failed to deploy artifacts: Could not find internal.repo (http://jenkins.intrnal.com)
您是否尝试在settings.xml文件中添加服务器?默认设置xml位于您的~/. m2/目录中。应该包含这样的内容:
<servers>
<server>
<id>my-internal-nexus-repo</id>
<username>yourUserName</username>
<password>yourPassword</password>
</server>
</servers>
这是一个链接到http://maven.apache.org/settings.htmlmaven文档添加服务器。
还有一件事可能是黑暗中的一枪。我注意到您正在尝试连接到url建议的可能是Jenkins的实例。Jenkins是一个Continious Integrserver,我觉得很奇怪,您在那里找到了您的存储库。我希望有一个Nexus url之类的。
2. 项目部署 本章主要介绍如何部署Camel。 首先,介绍Vagrant这个虚拟机工具。借助Vagrant,我们可以保证本地开发及测试环境与线上环境的一致。 随后介绍slb-admin的部署。管理端本地也要安装Dengine,用以测试Nginx配置文件的语法是否正确。此外,还需要部署数据库:MySQL及MongoDB。 最后介绍Nginx服务器的部署。我们可以根据具体需求部署Nginx集群,每台
描述 本文档提供了 3 种部署方式,对应 Jboot 里的 3 种打包方式。 通过 脚本 运行 在 打包方式 文档中,我们可以把项目打包成一个 .zip 的压缩包项目,里面带有 jboot.sh (和 jboot.bat) 执行脚本, 只需要我们解压 .zip 压缩文件,通过如下命令就可以对 jboot 项目进行启动和停止。 # 启动 ./jboot.sh start # 停止 ./jboot.
部署中,你可以先构建打包生成环境代码,再启动服务。因此,构建和启动分为下面两条命令: next build next start 例如,使用now去部署package.json配置文件如下: { "name": "my-app", "dependencies": { "next": "latest" }, "scripts": { "dev": "next",
nodejs使用thinkjs开发的项目docker-compose部署失败 我在用docker-compose部署一个node.js项目时遇见的无法部署,该项目之前使用pm2直接部署在宿主机是可以正常运行的,项目使用了thinkjs框架,下面的是我的docker-compose文件: h5-api是我把node项目解压之后的文件夹,执行docker-compose up -d之后发现容器未启动,
在LoginStorageProviderFactory中,它有一个来自LoginStorageProvier的导入,在最后一个类中,它有一个来自外部项目(也是我的项目)中的用户类的导入。 如果我把这个用户类移到jar模块中,错误就会消失,并且一切都能很好地工作;但我的目标是将项目与用户在其他项目中的实现和EAR项目分离。 所以,我认为错误的原因是缺少依赖项,Maven不能解决它,也没有报告错误,
我正在尝试修复glassfish警告:上下文路径与bundle不同,但至少通过IDE无法创建glassfish-web.xml文件: 找不到此项目的部署配置。无法正确设置部署描述符版本。