Usually the below pom config works for me. I've been successful in the past at adding my jar file's source to my projects as a dependency?
I have two jar files defined like so:
<dependencies>
<dependency>
<groupId>myGroup</groupId>
<artifactId>myJar</artifactId>
<version>4.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>myGroup</groupId>
<artifactId>myJar</artifactId>
<version>4.0</version>
<type>jar</type>
<classifier>sources</classifier>
</dependency>
</dependencies>
When I open up the myJar-4.0-sources.jar file from windows explorer view, I see all the java source files in it associated packages. But when I look in my eclipse project in my maven dependencies I only see xml files and no java files for myJar-4.0-sources.jar
BTW, regardless if I run the maven build inside eclipse or outside, it complains that there is no source code for classes that should be found in myJar-4.0-sources.jar.
BTW, this is a GWT compile.
Here is the actual error message:
[INFO] [gwt:compile {execution: default}] [INFO] auto discovered modules [com.noesis.calendar.events.CalendarEvents] [INFO] Loading inherited module 'com.noesis.commons.Commons' [INFO] [WARN] Non-canonical source package: ./ [INFO] Compiling module com.noesis.calendar.events.CalendarEvents [INFO] Validating newly compiled units [INFO] [ERROR] Errors in 'file:/C:/dev/pouncil_projects/calendar-events/src/main/java/com/noesis/calendar/events/shared/model/Calendar Event.java' [INFO] [ERROR] Line 102: No source code is available for type com.noesis.commons.exceptions.CloneException; did you forget to inher it a required module? [INFO] [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Tonte%20Pouncil/.m2/repository/com/noesis/commons/noesis-commons/0.0 .1-SNAPSHOT/noesis-commons-0.0.1-SNAPSHOT-sources.jar!/com/noesis/commons/domain/models/core/BaseEntityModel.java' [INFO] [ERROR] Line 27: No source code is available for type com.noesis.commons.exceptions.CloneException; did you forget to inheri t a required module? [INFO] [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Tonte%20Pouncil/.m2/repository/com/noesis/commons/noesis-commons/0.0 .1-SNAPSHOT/noesis-commons-0.0.1-SNAPSHOT-sources.jar!/com/noesis/commons/domain/models/core/DomainModelException.java' [INFO] [ERROR] Line 6: No source code is available for type com.noesis.commons.exceptions.ApplicationException; did you forget to i nherit a required module? [INFO] [ERROR] Line 14: No source code is available for type com.noesis.commons.Context; did you forget to inherit a required modul e? [INFO] [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Tonte%20Pouncil/.m2/repository/com/noesis/commons/noesis-commons/0.0 .1-SNAPSHOT/noesis-commons-0.0.1-SNAPSHOT-sources.jar!/com/noesis/commons/domain/models/core/PersistableBaseModel.java' [INFO] [ERROR] Line 70: No source code is available for type com.noesis.commons.calendar.CalendarUtility; did you forget to inherit a required module? [INFO] [ERROR] Line 84: The method clone() is undefined for the type Object [INFO] [ERROR] Line 91: No source code is available for type com.noesis.commons.exceptions.CloneException; did you forget to inheri t a required module? [INFO] Finding entry point classes [INFO] [ERROR] Unable to find type 'com.noesis.calendar.events.client.CalendarEvents' [INFO] [ERROR] Hint: Previous compiler errors may have made this type unavailable [INFO] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not b e adding its source path entries properly [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR` [INFO] [ERROR] Line 102: No source code is available for type com.noesis.commons.exceptions.CloneException; did you forget to inher it a required module?
Does anybody have any idea why this is the case?