Hi all,

we want to create a set of jars with different configuration files and thought about using a classifier.

I configured the pom so far with the maven-jar-plugin and defined the filters and profile. Now I have the problem that the jar plugin is executed twice. The 1st run created the jar without the classifier (say myLib.jar), the 2nd run, with the classifier (myLib-classifier.jar).

Iff I now execute the "install" task both jar (with and without classifier) are installed into my repostory.
How do I avoid the creation or installtion of the jar without classifier?

Here are the relevant part from my pom:

[...]
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <executions>
        <execution>
          <configuration>
            <classifier>${environment.suffix}</classifier>
          </configuration>
          <goals>
            <goal>jar</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

<profiles>
  <profile>
    <id>live</id>
    <properties>
      <environment.suffix>liveConfig</environment.suffix>
    </properties>
  </profile>
  <profile>
    <id>test</id>
    <properties>
      <environment.suffix>testConfig</environment.suffix>
    </properties>
  </profile>
</profiles>
[...]

Thank you for your help.

Marco


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to