0

我想在一个项目(IDE:Intellij Idea)中使用 Psychopath Xpath 处理器,该项目使用 Apache maven 进行构建,这在 maven 中央仓库中不可用。精神病患者罐子可在此处获得。而且我也知道精神病患者 XPath2 引擎也可以通过 P2 存储库获得。我必须在我的 pom.xml 中放入什么才能使 Maven 下载 .jar + java 源 + javadoc,并最终下载其他依赖项(实际上是 IBM ICU、Xerces、JavaCup)。

如果它可以通过 p2 存储库获得,如何将其作为依赖项添加到 pom.xml 中。建议使用 tycho 并从 p2 存储库添加依赖项。仍然需要更好的指导。
在这里“ Get a Hudson build with Maven ”也讨论了这个问题,但无法从中得到积极的结果。

4

1 回答 1

0

您可以将 Maven 配置为直接从 P2 存储库下载依赖项。这是 Psychopath 的示例设置:

<project>
 ...

 <repositories>
  <repository>
   <id>kepler</id>
   <layout>p2</layout>
   <url>http://download.eclipse.org/releases/kepler/201306260900</url>
  </repository>
 </repositories>

 <dependencies>
  <dependency>
   <groupId>osgi.bundle</groupId>
   <artifactId>org.eclipse.wst.xml.xpath2.processor</artifactId>
   <version>2.1.100.v201211261519</version>
  </dependency>
  <dependency>
   <groupId>osgi.bundle</groupId>
   <artifactId>java_cup.runtime</artifactId>
   <version>0.10.0.v201005080400</version>
  </dependency>
 </dependencies>

 <build>
  <extensions>
   <extension>
    <groupId>com.github.veithen.cosmos</groupId>
    <artifactId>p2-maven-connector</artifactId>
    <version>0.3</version>
   </extension>
  </extensions>
 </build>
</project>
于 2018-05-04T11:37:33.797 回答