2016-05-21 2 views
-1

Ich versuche, mein Projekt in vier Java-Module aufgeteilt:Für den Typ <type> ist kein Quellcode verfügbar. Haben Sie vergessen, ein benötigtes Modul zu erben?

web-client 
web-client-admin 
web-client-landing 
web-client-core 

Das Modul web-client ist derjenige, der alle Stücke zusammenstellt, so dass die Abhängigkeitsstruktur wie folgt aussehen würde:

   <-- web-client-admin <---- 
      /      \ 
web-client <---       <---- web-client-core 
       \      /
       <-- web-client-landing <-- 

in meinem module.gwt.xml ich habe:

<inherits name="com.mz.client.application.landing" /> 
<inherits name="com.mz.client.application.admin" /> 
<inherits name="com.mz.client.application.core" /> 

und die Java-Module sind in der pom.xml des web-client Modul:

<dependency> 
     <groupId>com.mz</groupId> 
     <artifactId>mz-web-client-admintool</artifactId> 
     <version>0.1-SNAPSHOT</version> 
    </dependency> 
    <dependency> 
     <groupId>com.mz</groupId> 
     <artifactId>mz-web-client-landing</artifactId> 
     <version>0.1-SNAPSHOT</version> 
    </dependency> 

Aber ich bin immer:

[INFO]  Compiling module com.mz.client.ClientEntryPoint 
[INFO]   Tracing compile failure path for type 'com.mz.client.application.ApplicationBootstrapper' 
[INFO]    [ERROR] Errors in 'file:/E:/java/mz/mz-server/mz-web-client/src/main/java/com/mz/client/application/ApplicationBootstrapper.java' 
[INFO]    [ERROR] Line 144: No source code is available for type com.mz.client.application.core.network.ParallelRequest.ParallelCallback; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 77: No source code is available for type com.mz.client.application.core.dao.app.ApplicationData; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 103: No source code is available for type com.mz.client.application.core.network.XsrfRequest<S,R>; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 144: No source code is available for type com.mz.client.application.core.dao.shop.ShopAdmin; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 49: No source code is available for type com.mz.client.application.core.LogMessageFormatter; did you forget to inherit a required module? 
[INFO]   Tracing compile failure path for type 'com.mz.client.application.ApplicationModule' 
[INFO]    [ERROR] Errors in 'file:/E:/java/mz/mz-server/mz-web-client/src/main/java/com/mz/client/application/ApplicationModule.java' 
[INFO]    [ERROR] Line 18: No source code is available for type com.mz.client.application.landing.LandingModule; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 20: No source code is available for type com.mz.client.application.admin.AdminToolModule; did you forget to inherit a required module? 
[INFO]   Tracing compile failure path for type 'com.mz.client.application.login.LoginPresenter' 
[INFO]    [ERROR] Errors in 'file:/E:/java/mz/mz-server/mz-web-client/src/main/java/com/mz/client/application/login/LoginPresenter.java' 
[INFO]    [ERROR] Line 124: No source code is available for type com.mz.client.application.core.event.AdminLoginEvent; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 75: No source code is available for type com.mz.client.application.core.network.Request<R>; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 112: No source code is available for type com.mz.client.application.core.dao.shop.ShopAdmin; did you forget to inherit a required module? 
[INFO]    [ERROR] Line 112: No source code is available for type com.mz.client.application.core.network.ParallelRequest.ParallelCallback; did you forget to inherit a required module? 
[INFO]   [ERROR] Aborting compile due to errors in some input files 

Ich sehe nicht, was ich hier ..

+0

es sieht aus wie das Web -client-coe-Modul befindet sich nicht im Klassenpfad. Ist es ein weiteres Glas, das als Abhängigkeit im Pom hinzugefügt werden muss? –

+0

@ElHoss 'web-client-core' wird als Abhängigkeit in' web-client-admin' und 'web-client-landing' hinzugefügt. Die Protokollierung zeigt jedoch, dass die Quellen von' landing' und 'nicht gefunden werden können admin auch ..:/ – displayname

+0

Hast du Maven gesagt, auch die Quellen zu exportieren? –

Antwort

2

Entweder bin fehlen müssen Quelldateien enthalten, wie Ressourcen in Ihre Module einbeziehen oder Abhängigkeiten zu den Quellartefakten zusätzlich zu den Jar-Artefakten hinzufügen.

Da dies alles Clientmodule sind, würde ich die Quellen lieber in die JARs aufnehmen.

Sie können einfach src/main/java als zusätzliches <resource> erklären, oder Sie können eine GWT-Maven-Plugin verwenden (vielleicht einen Blick auf https://tbroyer.github.io/gwt-maven-plugin/gwt-lib Verpackung; Disclaimer: Ich bin der Autor)

+0

Das funktioniert! Vielen Dank! – displayname

Verwandte Themen