include yajsw in maven build

1.7k views Asked by At

My project uses YAJSW wrapper. When i build project, i simple copy jars, required by YAJSW into assembly. So YAJSW's jars simple commited into my svn. I don't like this because my project hold 25 MB of space and 20 MB of that is YAJSW's libs.

I want to try:

  • delete unnecessary YAJSW's libs, but i don't know which of them are required.
  • download required libs from repo during build. But how to make it easy without listing all YAJSW jars in dependencies?

It will be best if there is a YAJSW pom with dependencies, but i don't find that. Maybe someone create that, so i can upload it to my repo?

2

There are 2 answers

0
ffleandro On

This is most fundamental things you need to copy in your assembly cycle:

<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>

Right now I'm trying to add the wrapper.jar and wrapperApp.jar from maven, hence removing it from the assymbly file. However for that I might need to edit the scripts to look for the jar in the lib folder instead of the wrapper_home

I found the maven dependencies:

<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>
3
TerrestrialIntelligence On

Indeed, I have done this - please check out my project at:

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

I think there are some other projects that have performed such an integration, e.g.

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

But I couldn't find much info on them.

Alternatively, if you can find some way to run the YAJSW Gradle build scripts from Maven, you might be able to use that. I had to track down most of the dependencies by hand.