简体   繁体   English

对依赖的依赖导致SNAPSHOT在Maven中的依赖

[英]Dependency on dependency leading to SNAPSHOT dependency in Maven

I am trying to use Maven for a Java Application I am writing and am trying to use Java2WSDL with 我正在尝试将Maven用于正在编写的Java应用程序,并尝试将Java2WSDL与

    <plugin>
      <groupId>org.apache.axis2.maven2</groupId>
      <artifactId>axis2-java2wsdl-maven-plugin</artifactId>
      <version>${java2wsdl.version}</version>
      <configuration>
        <className>com.barclays.hypercube.marketdata.Model.PointSeriesClient</className>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>java2wsdl</goal>
          </goals>
        </execution>
      </executions>
    </plugin>

It seems that there is a dependency on 似乎对

org.apache.ws.commons.axiom:axiom-api:jar:SNAPSHOT

Unsurprisingly this is not available from my Maven repository. 毫不奇怪,这在我的Maven存储库中不可用。

Is there any way to override this? 有什么办法可以覆盖吗? Perhapos with a value in my settings.xml file. Perhapos在我的settings.xml文件中有一个值。

You can exclude that unwanted jar from this maven. 您可以从该行家中排除不需要的jar。 But first make sure you do not need this jar. 但首先请确保您不需要此罐子。 Like here 这里

<project>
  ...
  <dependencies>
    <dependency>
      <groupId>sample.ProjectA</groupId>
      <artifactId>Project-A</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>  <!-- declare the exclusion here -->
          <groupId>sample.ProjectB</groupId>
          <artifactId>Project-B</artifactId>
        </exclusion>
      </exclusions> 
    </dependency>
  </dependencies>
</project>

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

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