繁体   English   中英

Maven Central-无法找到旅行车插件

[英]Maven central - cannot find wagon plugin

我在尝试查找和获取Maven Wagon插件时遇到问题。

在我的pom.xml中,我具有以下内容:

...

 <!-- Repositories -->
    <repositories>
        <repository>
          <id>mavencentral</id>
          <url>https://repo1.maven.org/maven2</url>
          <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
        </repository>
    </repositories>

<pluginRepositories>
         <pluginRepository>
          <id>central</id>
          <url>https://repo1.maven.org/maven2</url>
          <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
        </pluginRepository>

    </pluginRepositories>

但是,当我运行mvn install时,我得到以下信息:

[错误]无法在项目app.ui上执行目标:无法解析项目my.project:war:1.9.0-SNAPSHOT的依赖项:在中央找不到工件org.apache.maven.wagon:wagon:jar:2.8 ( https://repo1.maven.org/maven2 )-> [帮助1]

我想念什么? 我需要做什么来解决这个问题?

谢谢

我设法解决了这个问题

<build>
<extensions>
    <extension>
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-ssh</artifactId>
       <version>${maven.wagon.version}</version>
 </extension>
</extensions>
    <plugins>
        <plugin>
               <groupId>org.apache.maven.wagon</groupId>
               <artifactId>wagon-maven-plugin</artifactId>
               <version>${maven.wagon.version}</version>
                   <configuration>
                    <serverId>appui</serverId>
                    <fromFile>${project.build.directory}</fromFile>
                    <includes>${project.build.finalName}.war</includes>
                    <url>scp://localhost:2221/</url>                     
                    <toDir>/opt/jboss/jboss-as-7.1.1.Final/standalone/deployments</toDir>
               </configuration>
               <executions>
                 <execution>

                   <id>upload-war-to-server</id>
                   <phase>upload</phase>
                   <goals>
                     <goal>upload-single</goal>
                   </goals>
                   <configuration>
                        <serverId>appui</serverId>
                        <fromFile>${project.build.directory}</fromFile>
                        <includes>${project.build.finalName}.war</includes>
                        <url>scp://localhost:2221/opt/jboss/jboss-as-7.1.1.Final/standalone/deployments</url>            

                    </configuration>
                 </execution>
               </executions>
        </plugin>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM