在类路径中使用压缩的本机dll的Maven pom

时间:2017-01-04 14:39:08

标签: java eclipse maven dll pom.xml

我有一个使用带有dll的jar的maven项目。我能够添加jar没有问题,但dll是一个压缩文件,我试图将它添加到项目类路径。 我的问题是,如何解压缩并将dll添加到类路径中,如果无法完成,我可以手动提取,但如何使用pom将dll添加到类路径? 现在我有类似的东西

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>3.0.0</version>
    <executions>
      <execution>
        <id>unpack</id>
        <phase>package</phase>
        <goals>
          <goal>unpack</goal>
        </goals>
        <configuration>
          <artifactItems>
            <artifactItem>
              <groupId>my-group-id</groupId>
              <artifactId>my-artifactId</artifactId>
              <version>1.0-SNAPSHOT</version>
              <type>zip</type>
              <overWrite>true</overWrite>
              <outputDirectory>target</outputDirectory>
            </artifactItem>
          </artifactItems>
        </configuration>
      </execution>
    </executions>
  </plugin>

0 个答案:

没有答案