2014. szeptember 12., péntek

Maven - Webapps, Build Failure

1. mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
2. mvn clean package

BUILD FAILURE

a) error: annotations are not supported in -source 1.3
b) error: package javax.servlet does not exist

SOLUTION

Include to the pom.xml the following:
a)
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
        <source>1.6</source>
        <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

b)
<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.0.1</version>
  <scope>provided</scope>
</dependency>

Nincsenek megjegyzések:

Megjegyzés küldése