Hi,

I have two maven modules, A and B. A has a dependency on B. Both modules
have a resource file named xyz.properties located in src/main/resources.
Filenames and the location of the resource file is the same in both modules
i.e. A and B . When building A, B's default properties is in the final jar.
I wish to have A's properties when I build A. How can I do this?

Here is the plugin section in POM file
<build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <testSourceDirectory>src/test/java</testSourceDirectory>
 <plugins>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <mainClass>com.xyz.classA</mainClass>
                    </manifest>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
            <executions>
                <execution>
                    <id>make-my-jar-with-dependencies</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
        </resource>
 </resources>
  </build>
  <dependencies>
      <dependency>
            <groupId>com.abc</groupId>
            <artifactId>B</artifactId>
            <version>1.0.0</version>
      </dependency>
  </dependencies>

Thanks in advance





--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-exclude-resource-file-from-dependency-tp5837616.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to