Reputation: 2492
I am using maven-rar-plugin and following is my configuration in POM file. includeDependencies
is set to false. But all the dependent and dependent project's sub dependencies are all packaged into rar.
<plugin>
<artifactId>maven-rar-plugin</artifactId>
<version>2.4</version>
<configuration>
<raXmlFile>src/main/resources/META-INF/ra.xml</raXmlFile>
<includeDependencies>false</includeDependencies>
<archive>
<addMavenDescriptor>true</addMavenDescriptor>
</archive>
</configuration>
</plugin>
I cannot use exclusion in dependencies as it would lead to compilatin errors.
<dependencies>
<dependency>
<groupId>com.fi.ps</groupId>
<artifactId>frm-fl</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Is this a bug in the Maven plugin or is there a different way of configuring for rar packaging?
Upvotes: 2
Views: 1401
Reputation: 137064
There is no includeDependencies
parameter for the maven-rar-plugin
and, from reading the source code, it isn't currently possible to exclude dependencies of the project. A possible work-around would be to declare the dependencies to exclude with the provided
scope: they will be present during compilation but excluded when building the RAR file.
But why do you want to exclude dependencies in the first place? The maven-rar-plugin
is used to build a Resource Adapter Archive file for the Java 2 Connector Architecture. Dependencies are supposed to be included, otherwise it won't work. Beware that, as stated in the FAQ, this plugin does not create compressed file like WinRar.
Upvotes: 1