4

我的项目使用 YAJSW 包装器。当我构建项目时,我简单地将 YAJSW 所需的 jar 复制到程序集中。所以 YAJSW 的 jars 简单地提交到我的 svn 中。我不喜欢这样,因为我的项目拥有 25 MB 的空间,其中 20 MB 是 YAJSW 的库。

我想试试:

  • 删除不必要的 YAJSW 库,但我不知道需要哪些。
  • 在构建期间从 repo 下载所需的库。但是如何在不列出依赖项中的所有 YAJSW jar 的情况下让它变得容易呢?

如果有一个具有依赖关系的 YAJSW pom 会是最好的,但我没有找到。也许有人创建了它,所以我可以将它上传到我的仓库?

4

2 回答 2

2

assembly这是你需要在你的周期中复制的最基本的东西:

<fileSet>
    <directory>
        your_yajsw_folder
    </directory>
    <outputDirectory>/yajsw</outputDirectory>
    <includes>
        <include>bat/</include>
        <include>conf/</include>
        <include>lib/</include>
        <include>scripts/</include>
        <include>wrapper.jar</include>
        <include>wrapperApp.jar</include>
    </includes>
</fileSet>

现在我正在尝试从 maven 添加wrapper.jarand wrapperApp.jar,因此将其从汇编文件中删除。但是为此,我可能需要编辑脚本以在lib文件夹中查找 jar 而不是wrapper_home

我找到了maven依赖项:

<dependency>
    <groupId>org.rzo.yajsw</groupId>
    <artifactId>wrapper</artifactId>
    <version>11.11</version>
</dependency>
<dependency>
    <groupId>org.rzo.yajsw</groupId>
    <artifactId>wrapperApp</artifactId>
    <version>11.11</version>
</dependency>
于 2014-11-27T21:11:08.553 回答
1

事实上,我已经做到了——请在以下位置查看我的项目:

https://github.com/griels/yajsw-maven-mk2

我认为还有一些其他项目已经进行了这样的整合,例如

https://github.com/neo4j-attic/yajsw

但我找不到关于他们的太多信息。

或者,如果你能找到某种方法从 Maven 运行 YAJSW Gradle 构建脚本,你也许可以使用它。我不得不手动追踪大部分依赖项。

于 2014-07-28T14:03:07.250 回答