change classpath in Appassembler - Maven Plug-In

775 Views Asked by At

I'm using default appassembler configuration for generating execution script:

        <plugin>    
          <groupId>org.codehaus.mojo</groupId>    
          <artifactId>appassembler-maven-plugin</artifactId>    
          <configuration>
            <programs>         
              <program>                             
                <mainClass>SomeMainClass</mainClass>                    
                <name>data-generator</name>         
              </program>       
            </programs>     
          </configuration>    
        </plugin>  

after generating, my execution script contains lines such as:

set CLASSPATH = C:\Program Files (x86)\my-program\bin\\..\repo"\junit\junit\4.10\junit-4.10.jar

The goal is to change this paths to the following:

set CLASSPATH = C:\Program Files (x86)\my-program\bin\..\lib\junit\junit\4.10\junit-4.10.jar

Is there some good way to achieve this? I've seen there are many optional parameters for this plugin but I'm not sure how to use it.

1

There are 1 best solutions below

0
On

Could you bring more details to your question?

If you want to change default repository folder name, which is "repo", you can add following to configuration section

<repositoryName>lib</repositoryName>

All of your dependencies will be put to lib folder, so CLASSPATH will be also changed.

If you would like to shorten your CLASSPATH, you may add this option

<useWildcardClassPath>true</useWildcardClassPath>

Please tell me, if it solved your problem.