package does not exist (Maven)

1

Let's contextualize the problem:

I have a project that consumes some Web Services, in this project I have separate source folders according to the standard suggested by Maven ex: (main / java test / java), the classes generated based on the Web Services WSDL I ended up separating in main / wsdl so it was possible to exclude them from the test coverage (Eclemma), it was the only way I found to do that.

When I run the Maven install command via Eclipse everything works fine, but running the same command via the command line throws an exception saying that the packages contained in my generated classes do not exist (if lost). >

Has anyone ever had this and knows how to solve it?

    
asked by anonymous 09.12.2015 / 20:25

2 answers

1

I've added the following settings to my pom.xml.

 <project>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/main/wsdl</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
    
15.12.2015 / 11:52
0

The way I solved my problem was to move my source folder from:

src/main/wsdl

To:

src/main/java/wsdl

For some reason Maven searches by default for the sources in (src / main / java), whatever is out of it it ends up ignoring, I did not find a way to configure it to consider what is out of this pattern. p>     

10.12.2015 / 20:26