Domanda

For the first time i use eclipse with m2e and i want to configure the pom of the maven-war-plugin to add the correct path to my web.xml. If i try to edit the effective pom with the "Maven Pom editor", but the whole pom is readonly?

How can i solve these problem?

Greets Thomas

È stato utile?

Soluzione

The effective pom is a merge between the super pom of Maven and may be other poms which are inherited and your project pom. So it does not make sense to change the effective-pom. You should change your own pom to fit your needs. The configuration of the maven-war-plugin works as usual in Maven like the following:

 <build>
    <plugins>
      ..
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          ...here your appropriate configurations
        </configuration>
      </plugin>
      ..
    </plugins>
  </build>

Altri suggerimenti

You can't edit the effective pom. You can only edit the pom. The effective pom is the pom with all of the default configuration values etc, and values taken from parent poms. Editing the pom will change the effective pom.

If you wish to change the default values in your pom, you can cut and paste from the effective pom, but only do it for the sections you need to change.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top