runninv mvn clean verify 时出现几个错误

PP电影

我想出了什么问题,我只想运行一个 amq-broker 示例...这是我的完整 settings.xml(我刚刚添加了 jboss-amq-maven-repository PROFILE 并且还添加了 jboss-amq-maven-repository 作为我的 activeprofile,休息是完全默认的......)。

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

<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
   | 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>

  <!-- 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>
 <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>
     -->
  </mirrors>

 <profiles>

**<profile>
  <id>jboss-amq-maven-repository</id>
  <repositories>
    <repository>
      <id>jboss-amq-maven-repository</id>
      <url>file:///home/amq-broker/amq-broker-7.5.0.GA-maven-repository/maven-repository</url>  1
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>jboss-amq-maven-repository</id>
      <url>file:///home/amq-broker/amq-broker-7.5.0.GA-maven-repository/maven-repository</url>  2
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>
</profile>**

    <profile>
      <id>jdk-1.4</id>

      <activation>
        <jdk>1.4</jdk>
      </activation>

      <repositories>
        <repository>
          <id>jdk14</id>
          <name>Repository for JDK 1.4 builds</name>
          <url>http://www.myhost.com/maven/jdk14</url>
          <layout>default</layout>
          <snapshotPolicy>always</snapshotPolicy>
        </repository>
      </repositories>
    </profile>
    -->
    <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>

    **<activeProfile>jboss-amq-maven-repository</activeProfile>**

  </activeProfiles>

</settings>

在尝试解决这个问题时,我尝试了几乎所有的方法……但是我不知道该怎么做。

这是发生的事情的实际示例:

在此处输入图片说明

这是来自示例目录的我的 POM.xml

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

贾斯汀伯特伦

在我看来,使用自定义存储库的最简单方法是在使用-s开关执行 Maven 时在命令行上指定自定义设置文件在您的情况下,您应该执行以下操作:

  1. 解压缩 Red Hat AMQ Maven 存储库(例如amq-broker-7.5.0-maven-repository.zip
  2. 修改解example-settings.xml压缩文件中的 ,以便存储库<url>元素反映您将存档解压缩到的路径。
  3. 使用-sMaven开关运行示例(例如mvn -s /path/to/example-settings.xml verify

我只是用默认值运行了这些步骤,.m2/settings.xml它没有问题。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

为什么我吃午饭时出现错误 mvn verify ?

“mvn clean”与“mvn clean install”(当插件执行附加到“clean”时)

使用Ubuntu 15.10的Maven,出现以下错误:mvn clean install;

“ mvn clean install”运行测试,但不运行“ mvn clean site”

mvn -U clean编译和mvn clean编译之间的区别

使用mvn clean -e install

如何使用mvn verify命令?

运行MVN Clean Install应用程序尝试将Postgres连接到错误的端口

问题:运行mvn eclipse:clean时,我想从我的maven项目中删除目录

运行 mvn clean install 时切换分支会影响 maven 吗?

mvn clean install找不到工件

`cp`表现在`mvn clean`之后

'mvn clean install':为什么'clean'在'install'之后运行?

用`mvn clean package`替换`mvn clean install`之后的奇怪行为

“ mvn clean install”和“ mvn eclipse:clean eclipse:eclipse”命令有什么区别?

使用TestNG运行Selenium Webdriver脚本时未使用mvn clean install命令创建test-outpout文件夹

当我运行mvn install时,出现错误

是否可以自定义mvn clean擦除的目录?

`mvn clean package` 正在执行我的项目 main

在mvn clean包上未检测到条件类

使用 exec-maven-plugin 在 mvn clean 之后对抗 ClassNotFoundException

在Maven中,为什么要运行“ mvn clean”?

您如何在项目内正确执行“ MVN Clean”?

maven -P 选项不适用于 mvn clean install

如何只用“ mvn clean install”编译项目而不必随后运行“ mvn install”?

Maven 命令“mvn clean jetty:run”和其他 mvn 命令在 Eclipse 中不起作用

运行 conda clean 但文件存在时出现 Filenotfound 错误

mvn clean install 抛出错误 - 文件先前未格式化。请在运行验证之前格式化文件并提交

在 GoCD mvn clean install 中 mvn' 未被识别为内部或外部命令,但正常的 cmd 项目构建成功