SwitchYard Maven项目遇到麻烦

时间:2015-03-05 00:17:06

标签: java maven

我需要编写一个简单的SwitchYard应用程序,但看起来像maven并不喜欢SwitchYard,因为它无法在中央存储库中找到maven依赖项。我不知道如何修复它,因为没有任何文档和JBoss存储库可以从中获取依赖关系。这是pom.xml和错误日志,希望你能给我一些想法:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.project</groupId>
  <artifactId>FirstProject</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>com.project:FirstProject</name>
  <properties>
    <switchyard.version>1.1.0.FINAL</switchyard.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-bean</artifactId>
      <version>${switchyard.version}</version>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-api</artifactId>
      <version>${switchyard.version}</version>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-transform</artifactId>
      <version>${switchyard.version}</version>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-validate</artifactId>
      <version>${switchyard.version}</version>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-plugin</artifactId>
      <version>${switchyard.version}</version>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-test</artifactId>
      <version>${switchyard.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-test-mixin-cdi</artifactId>
      <version>${switchyard.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
       <plugin>
        <groupId>org.switchyard</groupId>
        <artifactId>switchyard-plugin</artifactId>
        <version>${switchyard.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>configure</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <scannerClassNames>
            <param>org.switchyard.transform.config.model.TransformSwitchYardScanner</param>
          </scannerClassNames>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <debug>true</debug>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

[ERROR] Plugin org.switchyard:switchyard-plugin:1.1.0.FINAL or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.switchyard:switchyard-plugin:jar:1.1.0.FINAL: Could not find artifact org.switchyard:switchyard-plugin:pom:1.1.0.FINAL in central (http://repo.maven.apache.org/maven2) -> [Help 1]

1 个答案:

答案 0 :(得分:0)

而不是:

<dependency>
  <groupId>org.switchyard</groupId>
  <artifactId>switchyard-plugin</artifactId>
  <version>${switchyard.version}</version>
</dependency>

尝试:

<dependency>
  <groupId>org.switchyard</groupId>
  <artifactId>switchyard-plugin</artifactId>
  <version>${switchyard.version}</version>
  <type>maven-plugin</type>
</dependency>

参考:http://search.maven.org/#artifactdetails%7Corg.switchyard%7Cswitchyard-plugin%7C1.1.0.Final%7Cmaven-plugin

查看插件的POM。包装类型是maven-plugin。