【发布时间】:2011-06-14 05:08:40
【问题描述】:
我正在开发一个 Maven 项目,该项目建立在不使用 Maven 的第三方提供的库之上。他们每两周发布一次新版本。
我正在尝试尽可能多地自动化使代码在我们的项目中可用所涉及的工作。其中一项任务是从目录中获取一组 jar,并将它们作为工件上传到我们的存储库。
是否可以将此步骤作为构建的一部分?理想情况下,我希望最终得到一个看起来像这样的转换项目。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.convertor</groupId>
<artifactId>thirdpartyconvertor</artifactId>
<version>THIRD_PARTY_VERSION</version>
<packaging>jar</packaging>
<properties>
<jarLocation>${someKnownLocation}\${version}</caplinSdkVersion>
</properties>
<build>
<plugins>
<plugin>
<!--
Mystery plugin that goes through the third party jar directory and deploys each jar file as
<groupId>com.thirdparty</groupId>
<artifactId>THE_JAR_NAME</artifactId>
<version>${version}</version>
-->
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.thirdparty</groupId>
<artifactId>all-jars</artifactId>
<version>${version}</version>
</dependency>
</dependencies>
</project>
有什么想法吗?
【问题讨论】: