1

I've put in pom.xml:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
    <version>2.10</version>
    <configuration>
        <sourceIncludes>
            <sourceInclude>target/generated-test-sources/protobuf/java/**</sourceInclude>
        </sourceIncludes>
    </configuration>
</plugin>

But when I run:

mvn eclipse:eclipse -Dwtpversion=2.0 install

It does not configure .classpath to include this directory.

Appreciate help.

SBel
  • 3,315
  • 6
  • 29
  • 47

1 Answers1

1

I found another way to achieve this goal:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <version>1.7</version>
    <executions>
        <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>target/generated-test-sources/protobuf/java</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>

Source: How to add an extra source directory for maven to compile and include in the build jar?

Community
  • 1
  • 1
SBel
  • 3,315
  • 6
  • 29
  • 47