JUnit4Provider Does Not Work - tycho

I'm trying to get project with the packaging type eclipse-test-plugin to work (I have the ambitious goal to get it to execute tests someday, but right now there are only two classes with empty tests methods inside).
I assume the problem only exists because we use a target configuration file, so needed plug-ins (or whatever) get not loaded automatically. In the absence of an up-to-date documentation or examples I guessed that the pom.xml for such a use case should look something like that:
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>${see.below}</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>0.22.0</version>
<configuration>
<providerHint>junit4</providerHint>
</configuration>
</plugin>
</plugins>
</build>
(Because without the dependency I got a ClassNotFoundException: org.apache.maven.surefire.junit4.JUnit4Provider, and that's where the class resides.)
Now if I use the version 2.18.1 or below of the surefire-junit4, I get the following error:
An error has occurred. See the log file C:\workspaces\workspace\org.acme.project.rxp-build\org.acme.project.rxp.it\target\work\data\.metadata\.log.
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.22.0:test (default-test) on project org.acme.project.rxp.it: An unexpected error occured while launching the test runtime (return code 13). See log for details. -> [Help 1]
Aaand the log file in question contains:
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.ClassNotFoundException: org.apache.maven.surefire.junit4.JUnit4Provider
at org.apache.maven.surefire.util.ReflectionUtils.loadClass(ReflectionUtils.java:251)
at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:128)
at org.apache.maven.surefire.booter.SurefireReflector.instantiateProvider(SurefireReflector.java:235)
at org.apache.maven.surefire.booter.ProviderFactory.createProvider(ProviderFactory.java:113)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:78)
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:91)
at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
If I use version 2.19 of the surefire-junit4, I get the following message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (test) on project org.acme.project.rxp.it: Execution test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] org.apache.maven.surefire.util.SurefireReflectionException: java.lang.NoSuchMethodError: org.apache.maven.surefire.providerapi.ProviderParameters.isInsideFork()Z
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:134)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.createProviderInCurrentClassloader(ForkedBooter.java:230)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:199)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.NoSuchMethodError: org.apache.maven.surefire.providerapi.ProviderParameters.isInsideFork()Z
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.<init>(JUnit4Provider.java:103)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:130)
I was a bit suspicious that surefire-api and surefire-junit4 had the same version, so I made sure that Maven loads the same versions for both, but there was no change in the behavior.
What's the problem here? How do I get the test plug-in to build?

Okay, it works without stupid Maven dependencies if the target platform file contains
<unit id="org.hamcrest.core" version="0.0.0"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.eclipse.jdt.junit.runtime" version="0.0.0"/>
<unit id="org.eclipse.jdt.junit4.runtime" version="0.0.0"/>
and the Manifest.MF contains
Require-Bundle: org.eclipse.jdt.junit4.runtime,
org.junit

up-to-date documentation: https://www.eclipse.org/tycho/documentation.php
mentions working examples: http://git.eclipse.org/c/tycho/org.eclipse.tycho-demo.git/

Related

error invalid source option, source is either '1.3' or '1.4': Browserstack integration with Azure Devops Pipeline

I am trying to integrate browserstack with azure devops pipelines. I added all the necessary repos to the pom.xml While building the code i am getting below error. And i am following this link https://www.browserstack.com/docs/automate/selenium/azure-pipelines#java
I keep on getting the source failure and says 1.3 or 1.4 i am using Jdk 1.8 version. I defined jdk source as 1.8 and jdk target as 1.8
<plugin>
<groupId>com.browserstack</groupId>
<artifactId>automate-maven-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<source>${jdk.source.version}</source>
<target>${jdk.target.version}</target>
<complianceLevel>${jdk.source.version}</complianceLevel>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: org.codehaus.mojo.aspectj.CompilationFailedException: AJC compiler errors:
error invalid source option, source is either '1.3' or '1.4': 1.8
abort AspectJ Compiler
Usage: <options> <source file | #argfile>..
AspectJ-specific options:
-inpath <list> use classes in dirs and jars/zips in <list> as source
(<list> uses platform-specific path delimiter)
-injars <jarList> use classes in <jarList> zip files as source
(<jarList> uses classpath delimiter)
deprecated - use inpath instead.
-aspectpath <list> weave aspects in .class files from <list> dirs and jars/zip into sources
(<list> uses classpath delimiter)
-outjar <file> put output classes in zip file <file>
-outxml generate META-INF/aop.xml
-outxmlfile <file> specify alternate destination output of -outxml
-argfile <file> specify line-delimited list of source files
-showWeaveInfo display information about weaving
-incremental continuously-running compiler, needs -sourceroots
at org.codehaus.mojo.aspectj.CompilationFailedException.create(CompilationFailedException.java:35)
at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:549)
at com.browserstack.automate.mojo.AutomateBaseMojo.execute(AutomateBaseMojo.java:114)
at com.browserstack.automate.mojo.AutomateCompileMojo.execute(AutomateCompileMojo.java:18)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Looks like something is wrong in cucumber-jvm parallel and surefire plugin configuration

Environment - Cucumber V. 4.2.3 | Selenium V.3.8.1 | JUnit V.4.12 | cucumber-jvm- parallel-plugin V.1.2.1 | maven-surefire-plugin V.2.19.1 | maven-compiler- plugin v.3.3
While executing cucumber-jvm parallel & maven surefire plugin, I am facing below error
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/photon-workspace/TheDayAfterTomorrow/target/generated-test-
sources/Parallel03IT.java:[9,14] cannot find symbol
symbol: method format()
location: #interface cucumber.api.CucumberOptions
[ERROR] /D:/photon-workspace/TheDayAfterTomorrow/target/generated-test-
sources/Parallel01IT.java:[9,14] cannot find symbol
symbol: method format()
location: #interface cucumber.api.CucumberOptions
[ERROR] /D:/photon-workspace/TheDayAfterTomorrow/target/generated-test-
sources/Parallel02IT.java:[9,14] cannot find symbol
symbol: method format()
location: #interface cucumber.api.CucumberOptions
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------
------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------
------
[INFO] Total time: 6.169 s
[INFO] Finished at: 2019-02-17T13:43:48+05:30
[INFO] ------------------------------------------------------------------
------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-
plugin:3.3:testCompile (default-testCompile) on project
TheDayAfterTomorrow: Compilation failure: Compilation failure:`
[ERROR] /D:/photon-workspace/TheDayAfterTomorrow/target/generated-test-
sources/Parallel03IT.java:[9,14] cannot find symbol
[ERROR] symbol: method format()
[ERROR] location: #interface cucumber.api.CucumberOptions
[ERROR] /D:/photon-workspace/TheDayAfterTomorrow/target/generated-test-
sources/Parallel01IT.java:[9,14] cannot find symbol
[ERROR] symbol: method format()
[ERROR] location: #interface cucumber.api.CucumberOptions
[ERROR] /D:/photon-workspace/TheDayAfterTomorrow/target/generated-test-
sources/Parallel02IT.java:[9,14] cannot find symbol
[ERROR] symbol: method format()
[ERROR] location: #interface cucumber.api.CucumberOptions
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-compiler-plugin:3.3:testCompile (default-testCompile) on project TheDayAfterTomorrow: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:911)
at org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompilerMojo.java:153)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I can understand there shall be some wrong configuration in cucumber jvm parallel plugin, probably not in maven surefire as I am getting compilation error while executing POM.XML via eclipse using command -e clean install
Cucumber JVM Parallel Plugin Configuration
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<glue>com.jacksparrow.automation.steps_definitions.functional</glue>
<outputDirectory>${project.build.directory}/generated-test-sources</outputDirectory>
<featuresDirectory>src/test/resources/features/functional/</featuresDirectory>
<cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
<format>json,html</format>
<tags>"#guest_plp"</tags>
</configuration>
</execution>
</executions>
</plugin>
Maven Surefire Plugin Configuration
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<forkCount>2</forkCount>
<reuserForks>true</reuserForks>
<!-- <parallel>all</parallel> -->
<!-- <useUnlimitedThreads>true</useUnlimitedThreads> -->
<!-- <threadCountMethods>2</threadCountMethods> -->
<includes>
<include>**/Parallel*IT.class</include>
</includes>
</configuration>
</plugin>
**Maven Compiler Plugin**
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerVersion>1.8</compilerVersion>
</configuration>
</plugin>
Not able to understand what exactly is causing this error. Please is the jvm generated runner file**
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
#RunWith(Cucumber.class)
#CucumberOptions(strict = true,
features = {"classpath:functional/CheckoutOrderPlacement.feature"},
format = {"json:target/cucumber-parallel/1.json",
"html:target/cucumber-parallel/1.html", "pretty"},
monochrome = false,
tags = {"#guest_plp"},
glue = { "com.jacksparrow.automation.steps_definitions.functional" })
public class Parallel01IT {
}
Issue was because of giving parameter as format instead of giving plugin option. As I am using Cucumber v. 4 and there it's already depreciated. So changing the format to plugin in pom.xml resolved the issue.
Remove double quotes
"#guest_plp"

How to install a plugin in Jira?

I wanted to create a sample servlet as a Jira-plugin according to a tutorial.
I have built the code as it is and I used the following pom.xml to build the code.
When I run the servlet URL I'm getting the following issue about class cast.
[INFO] [talledLocalContainer] ERROR - 13:41:52,368 - com.atlassian.plugin.servlet.DefaultServletModuleManager - [http-bio-5990-exec-4] - Unable to create new reference LazyLoadedServletReference{d
escriptor=com.atlassian.plugins.tutorial.refapp.adminUI:test (null), servletContext=org.apache.catalina.core.ApplicationContextFacade#2829d93e}
[INFO] [talledLocalContainer] com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.ClassCastException: com.atlassian.plugins.tutorial.refapp.MyPluginServlet cannot be cast to javax.servlet.http.HttpServlet
[INFO] [talledLocalContainer] at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
This is possibly a dependency issue in your pom.xml. Check to make sure you are not bundling resources into your plugin that already exist in the environment that is hosting your plugin.
In your case, you might want to check for this:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
With the key part here being <scope>provided</scope> indicating this resource is needed for compilation but does not need to be bundled with the plugin as it is already provided by the runtime environment. If this line doesn't exist or the scope is anything other than provided, then try adding/changing it.
See this page for more info: Dependency Issues during Plugin Initialisation

javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found with maven tomcat plugin

i am running on maven 2 and i am using the Apache Tomcat Maven Plugin for tomcat 7
with the following configuration:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<path>/${project.build.finalName}</path>
</configuration>
</plugin>
but when trying to run the application with mvn tomcat7:run
i am getting the following exception:
SEVERE: Unable to determine URL for WEB-INF/classes
javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found
at org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733)
at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
please advise how to fix this exception.
It seems that is a problem in the tomcat version bundled with the tomcat7-maven-plugin (which is fixed to 7.0.25). See this answer on a similar question.

Maven - add source dependency; but no java source files available in eclipse for GWT compile

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?
GWT looks for dependency sources in the same JAR as the compiled
class files. Since the library is under your control your best
course is to include the class files and the source files in the
same JAR. To do so add a <resource> to the <build> section of
the POM (assuming standard Maven source layout):
<project>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
</resource>
</resources>
</build>
</project>
GWT looks for dependency sources in the same JAR as the compiled class files. Your should include the class files and the source files in the same JAR. To do so add a <resource> to the <build> section of the POM:
<project>
<build>
<resources>
<!-- include the source files in our main jar for use by GWT -->
<resource>
<directory>${project.build.sourceDirectory}</directory>
</resource>
<!-- and continue to include our standard resources -->
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</build>
</project>
I finally figured out my problem was. It was my .gwt.xml file. It was not referencing the GWT classes correctly. Not that I solved this, I believe the original way I wanted to reference my source library via the source jar file will work. Thanks.