Friday, November 25, 2016

gwt compile error "No source code" using gwt-lib with transient sources

My current maven project (named refBuecherWelt) is based on 3 submodule (shared,server,client) layout from the gwt-maven-archetypes [1].
The refBuecherWelt-client submodule (a gwt-app) depend on an other lib (named universalclientLib) which is build in an independend maven project.

When I migrate the lib also to 3 submodules, gwt:compile (or gwt:codeserver) shows the error
[INFO]       [ERROR] Errors in 'de/all4net/.../client/FaceDataObject.java'
[INFO]          [ERROR] Line 8: No source code is available for type de.all4net...shared.TaskDirection; did you forget to inherit a required module?


The lib-client is a gwt-lib and depend on jars lib-shared and lib-shared with sources but the gwt-comiler don't see the sources from lib-shared.

How must I reference the lib-shared so the gwt-comiler see the sources if compiling the refBuecherWelt-client?


refBuecherWelt-client pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
       
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

   
<modelVersion>4.0.0</modelVersion>
   
<parent>
       
<groupId>de.all4net.sdh.bhb</groupId>
       
<artifactId>refBuecherWelt</artifactId>
       
<version>1.1.0.BUILD-SNAPSHOT</version>
   
</parent>
   
<artifactId>refBuecherWelt-client</artifactId>
   
<packaging>gwt-app</packaging>
   
<name>refBuecherWelt-client</name>

   
<prerequisites>
       
<maven>${mavenVersion}</maven>
   
</prerequisites>

   
<dependencies>
       
<dependency>
           
<groupId>${project.groupId}</groupId>
           
<artifactId>refBuecherWelt-shared</artifactId>
           
<version>${project.version}</version>
       
</dependency>
       
<dependency>
           
<groupId>de.all4net</groupId>
           
<artifactId>universalclient.lib-client</artifactId>
           
<version>${universalclientLib.version}</version>
       
</dependency>
       
<dependency>
           
<groupId>${project.groupId}</groupId>
           
<artifactId>refBuecherWelt-shared</artifactId>
           
<version>${project.version}</version>
           
<classifier>sources</classifier>
       
</dependency>
       
<dependency>
           
<groupId>com.google.gwt</groupId>
           
<artifactId>gwt-user</artifactId>
           
<version>${gwt.version}</version>
       
</dependency>
       
<dependency>
           
<groupId>com.google.gwt</groupId>
           
<artifactId>gwt-dev</artifactId>
           
<version>${gwt.version}</version>
       
</dependency>
   
</dependencies>

   
<build>
       
<plugins>
           
<plugin>
               
<groupId>net.ltgt.gwt.maven</groupId>
               
<artifactId>gwt-maven-plugin</artifactId>
               
<configuration>
                   
<moduleName>de.all4net.sdh.bhb.App</moduleName>
                   
<moduleShortName>app</moduleShortName>
               
</configuration>
           
</plugin>
       
</plugins>
   
</build>
</project>


lib-client pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
       
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

   
<modelVersion>4.0.0</modelVersion>
   
<parent>
       
<groupId>de.all4net</groupId>
       
<artifactId>universalclient.lib</artifactId>
       
<version>1.1.0.BUILD-SNAPSHOT</version>
   
</parent>
   
<artifactId>universalclient.lib-client</artifactId>
   
<packaging>gwt-lib</packaging>
   
<name>universalclient lib-client</name>

   
<prerequisites>
       
<maven>${mavenVersion}</maven>
   
</prerequisites>

   
<dependencies>
       
<dependency>
           
<groupId>${project.groupId}</groupId>
           
<artifactId>universalclient.lib-shared</artifactId>
           
<version>${project.version}</version>
       
</dependency>
       
<dependency>
           
<groupId>${project.groupId}</groupId>
           
<artifactId>universalclient.lib-shared</artifactId>
           
<version>${project.version}</version>
           
<classifier>sources</classifier>
       
</dependency>
       
<dependency>
           
<groupId>com.google.gwt</groupId>
           
<artifactId>gwt-user</artifactId>
           
<version>${gwt.version}</version>
       
</dependency>
   
</dependencies>

   
<build>
       
<plugins>
           
<plugin>
               
<groupId>net.ltgt.gwt.maven</groupId>
               
<artifactId>gwt-maven-plugin</artifactId>
               
<configuration>
                   
<moduleName>de.all4net.universalclient.S2bLib</moduleName>
                   
<moduleShortName>s2bLib</moduleShortName>
               
</configuration>
           
</plugin>
       
</plugins>
   
</build>
</project>


lib-shared pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
       
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

   
<modelVersion>4.0.0</modelVersion>
   
<parent>
       
<groupId>de.all4net</groupId>
       
<artifactId>universalclient.lib</artifactId>
       
<version>1.1.0.BUILD-SNAPSHOT</version>
   
</parent>

   
<artifactId>universalclient.lib-shared</artifactId>
   
<name>universalclient lib-shared</name>

   
<prerequisites>
       
<maven>${mavenVersion}</maven>
   
</prerequisites>

   
<dependencies>
       
<dependency>
           
<groupId>com.google.gwt</groupId>
           
<artifactId>gwt-servlet</artifactId>
           
<version>${gwt.version}</version>
           
<scope>provided</scope>
       
</dependency>
       
<dependency>
           
<groupId>net.customware.gwt.dispatch</groupId>
           
<artifactId>gwt-dispatch</artifactId>
           
<version>1.2.0</version>
       
</dependency>
   
</dependencies>

   
<build>
       
<plugins>
           
<plugin>
               
<artifactId>maven-source-plugin</artifactId>
           
</plugin>
       
</plugins>
   
</build>

   
<profiles>
       
<profile>
           
<id>m2e</id>
           
<activation>
               
<property>
                   
<name>m2e.version</name>
               
</property>
           
</activation>
           
<dependencies>
               
<dependency>
                   
<groupId>com.google.gwt</groupId>
                   
<artifactId>gwt-user</artifactId>
                   
<version>${gwt.version}</version>
               
</dependency>
           
</dependencies>
           
<build>
               
<plugins>
                   
<plugin>
                       
<groupId>org.codehaus.mojo</groupId>
                       
<artifactId>gwt-maven-plugin</artifactId>
                       
<version>${gwt.version}</version>
                   
</plugin>
               
</plugins>
           
</build>
       
</profile>
   
</profiles>
</project>



[1] https://github.com/tbroyer/gwt-maven-archetypes

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment