Reputation: 1
I know there is already a lot of topic about this issue (did you forget to inherit a required module?) but my problem is a little bit special. Let me explain it: I have an existing package that contains my models classes(the name of the package is model). All my models were located into that package. But I made a change in my application and now part of the models that I am using in my application is now pulled from another application named "MyAppModel". I have added the dependency to this MyAppModel application in my pom.xml file. I have no compilation error (mvn compile is successful) but when I do maven install: I have the following error: [ERROR] Line 130: No source code is available for type com.data.service.models.Product; did you forget to inherit a required module? [INFO] [ERROR] Line 588: No source code is available for type com.data.service.models.Order; did you forget to inherit a required module?
These 2 models:com.data.service.models.Order.java and com.data.service.models.Product.java are from the MyAppModel application but I am not authorized to add them manually to the existing model package of my application.
It seems like it can not find those 2 models Product and Order.
Here is the content of my gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name='com.google.gwt.user.User'/>
<source path='model'/>
</module>
The source path is only pointing to he existing model package. My question is: how can I do to modify this gwt.xml file to take into account both models packages(the model package of the existing application and also the model package of the external application "MyAppModel")
I need to keep my existing source path='model' and should add an access to my external models in my MyAppModel application
Thank you very much for your help
Upvotes: 0
Views: 1527
Reputation: 385
In case of GWT, sometimes we see this error if we refer server side classes in client side code.
Upvotes: 0
Reputation: 1635
I think this is one of those few cases where the error is exactly what it says.
If you have part of those models in another artifact just make sure you also have the sources available and not just class
files, for that artifact.
You need to either package a -sources
artifact or include sources in the same artifact as compiled classes.
Upvotes: 0