Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml

<pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <compilerArguments>
                   <endorseddirs>${project.build.directory}/endorsed</endorseddirs>
                </compilerArguments>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <forkMode>once</forkMode>
                <argLine>-Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
            </configuration>
         </plugin>
    </plugins>
</pluginManagement>

You

...

will

...

then

...

need

...

to

...

use

...

the

...

maven-dependency-plugin

...

to

...

copy

...

the

...

needed

...

artifacts

...

into

...

the

...

endorsed.dir:

Code Block
xml
xml


{code:xml}
<plugins>
    <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-dependency-plugin</artifactId>
       <executions>
          <execution>
             <phase>generate-sources</phase>
             <goals>
                 <goal>copy</goal>
             </goals>
             <configuration>
                 <artifactItems>
                    <artifactItem>
                       <groupId>javax.xml.bind</groupId>
                       <artifactId>jaxb-api</artifactId>
                       <version>2.2</version>
                    </artifactItem>
                    <artifactItem>
                       <groupId>javax.xml.ws</groupId>
                       <artifactId>jaxws-api</artifactId>
                       <version>2.2</version>
                    </artifactItem>
                  </artifactItems>
                  <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
              </configuration>
           </execution>
       </executions>
    </plugin>
</plugins>

...