Pergunta

I have a maven project where java stubs are generated from wsdl files using axistools-maven-plugin. Within pom we have following:

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>axistools-maven-plugin</artifactId>
        <version>${axistools-maven-plugin.version}</version>
        <configuration>
          <mappings>
            <mapping>              
              <namespace>xyz</namespace>
              <targetPackage>x.y.z</targetPackage>
            </mapping>
            <mapping>              
              <namespace>http://time.joda.org</namespace>
              <targetPackage>com.org.joda.time</targetPackage>
            </mapping>
            <mapping>              
              <namespace>abc</namespace>
              <targetPackage>a.b.c</targetPackage>
            </mapping>
          </mappings>
          <testCases>false</testCases>
          <serverSide>false</serverSide>
          <subPackageByFileName>true</subPackageByFileName>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>wsdl2java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Now in above setting we just have namespaces mapped to package. I am just not able to get how this setting is able to track where does wsdl reside in order generate stubs? Maven documentation is not very clear on this. Any ideas on this?

EDIT:

I did some testing on this:

  1. I removed all the mappings of namespaces and packages but still wsdl gets picked up.
  2. Even if i change the wsdl name, it still gets picked up.

This is very surprising to me, it seems axis plugin knows about wsdl location. but how i dont knw.

Foi útil?

Solução

So finally i solved the mystery. I ran maven build in debug mode : mvn -X clean insatll

I noticed that maven-axistools-plugin checks the default directory as ${basedir}/src/main/wsdl to search for wsdl and hence it was always able to locate my wsdls.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top