Generating Xtext projects programmatically on Xtext version 2.17.0 produces error - xtext

I'm generating Xtext projects programmatically using the Xtext version 2.17.0 (Java 11). The whole process is:
In my own maven project I'm generating those Xtext projects programmatically.
When projects are generated I write grammar to the runtime project and run mvn compile on the parent Xtext project, in order to generate grammar artifacts (like by running Wme2 workflow in Eclipse IDE).
I add org.eclipse.ui.console;bundle-version="3.8.100" to the manifest of the ui project. Then also one jar to the Bundle-ClassPath, so the final Manifest looks like this:
Bundle-ManifestVersion: 2
Bundle-Name: org.mealy.ui
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.mealy.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.mealy,org.mealy.ide,org.eclipse.xtext.ui,org.eclipse
.xtext.ui.shared,org.eclipse.xtext.ui.codetemplates.ui,org.eclipse.ui.e
ditors;bundle-version="3.5.0",org.eclipse.ui.ide;bundle-version="3.5.0"
,org.eclipse.ui,org.eclipse.compare,org.eclipse.xtext.builder,org.eclip
se.xtext.xbase.lib;bundle-version="2.14.0",org.eclipse.xtend.lib;bundle
-version="2.14.0";resolution:=optional,org.eclipse.ui.console;bundle-ve
rsion="3.8.100"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.mealy.ui
Export-Package: org.mealy.ui.internal,org.mealy.ui.quickfix,org.mealy.ui
.contentassist
Bundle-Activator: org.mealy.ui.internal.MealyActivator
Bundle-ClassPath: lib/mealyMachine-1.0-SNAPSHOT.jar,
.
After that I'm generating some source code files etc.
Then I'm manually running mvn package on the parent Xtext project in order to build all the projects and get jars representing Eclipse plugin and language server.
But when running the last point on the 2.17.0 version of the Xtext (with Java 11) something is added to the MANIFEST.MF of the ui Xtext project and mvn package fails with following error:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:1.3.0:p2-metadata-default (default-p2-metadata-default) on project org.mealy.ui: Execution default-p2-metadata-default of goal org.eclipse.tycho:tycho-p2-plugin:1.3.0:p2-metadata-default failed. IllegalArgumentException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:1.3.0:p2-metadata-default (default-p2-metadata-default) on project org.mealy.ui: Execution default-p2-metadata-default of goal org.eclipse.tycho:tycho-p2-plugin:1.3.0:p2-metadata-default failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-p2-metadata-default of goal org.eclipse.tycho:tycho-p2-plugin:1.3.0:p2-metadata-default failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 21 more
Caused by: java.lang.IllegalArgumentException
at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.getCanonicalArtifact(P2GeneratorImpl.java:206)
at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.generateMetadata(P2GeneratorImpl.java:148)
at org.eclipse.tycho.plugins.p2.P2MetadataMojo.attachP2Metadata(P2MetadataMojo.java:157)
at org.eclipse.tycho.plugins.p2.P2MetadataMojo.execute(P2MetadataMojo.java:116)
at org.eclipse.tycho.plugins.p2.P2MetadataDefaultMojo.execute(P2MetadataDefaultMojo.java:33)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 22 more
The Manifest.mf of the UI Xtext project looks at the end like this:
Bundle-ManifestVersion: 2
Bundle-Name: org.mealy.ui
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.mealy.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.mealy,org.mealy.ide,org.eclipse.xtext.ui,org.eclipse
.xtext.ui.shared,org.eclipse.xtext.ui.codetemplates.ui,org.eclipse.ui.e
ditors;bundle-version="3.5.0",org.eclipse.ui.ide;bundle-version="3.5.0"
,org.eclipse.ui,org.eclipse.compare,org.eclipse.xtext.builder,org.eclip
se.xtext.xbase.lib;bundle-version="2.14.0",org.eclipse.xtend.lib;bundle-version="2.14.0";bundle
-version="2.14.0";resolution:=optional,org.eclipse.ui.console;bundle-ve
rsion="3.8.100",
org.eclipse.ui.editors,
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0",
org.eclipse.xtext.ui.shared
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.mealy.ui
Export-Package: org.mealy.ui.internal,org.mealy.ui.quickfix,org.mealy.ui
.contentassist,
org.mealy.ui.contentassist
Bundle-Activator: org.mealy.ui.internal.MealyActivator
Bundle-ClassPath: lib/mealyMachine-1.0-SNAPSHOT.jar,
.
Running the same code with Xtext 2.16.0 and Java 8 doesnt produce such error and doesnt write anything to the manifest when running point 5 from my list.
What could be the problem ?

looks like you do stumbled over a bug. as a workaround you can try to disable manifest merging
eclipsePlugin = {
enabled = true
manifest = {
merge = false
}
}

Related

build of neo4j community is failing.Why?

i have followed all the steps as in Travis link here.
My maven version is
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-60-generic", arch: "amd64", family: "unix"
I got this error when i tried to build with maven
[ERROR] Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header
First i tried to build in windows, then in ubuntu 12.04 , in both i got the same errors.
Below is the error stack trace
[ERROR] Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Some files do not have the expected license header
at com.google.code.mojo.license.LicenseCheckMojo.execute(LicenseCheckMojo.java:64)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Now How can i solve this problem? Even though it is same error as in this SO here
As per the neo4j github documentation
When building on Windows, use -Dlicensing.skip to avoid problems related to line endings.
The license header check can be skipped by appending the following to the command line: -Dlicense.skip=true
Use Java 7
Build the community/license-check submodule first.

maven3 - getting error on mvn dependency:tree command

I've a project that uses maven 3. I get the following error when I run mvn dependency:tree command. Could someone advise why would I get this error?
"mvn -version"
Apache Maven 3.0 (r1004208; 2010-10-04 07:50:56-0400)
Java version: 1.6.0_16
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.7:tree (default-cli) on project : Cannot build project dependency graph: org.apache.maven.project.MavenProject.getProjectBuildingRequest() -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.7:tree (default-cli) on project wesp-dgw: Cannot build project dependency graph
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot build project dependency graph
at org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:233)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
... 19 more
Caused by: org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException: org.apache.maven.project.MavenProject.getProjectBuildingRequest()
at org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.buildDependencyGraph(Maven3DependencyGraphBuilder.java:92)
at org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder.buildDependencyGraph(DefaultDependencyGraphBuilder.java:63)
at org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:216)
... 21 more
Caused by: java.lang.NoSuchMethodException: org.apache.maven.project.MavenProject.getProjectBuildingRequest()
at java.lang.Class.getMethod(Class.java:1605)
at org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.invoke(Maven3DependencyGraphBuilder.java:99)
at org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.buildDependencyGraph(Maven3DependencyGraphBuilder.java:68)
... 23 more
The error goes away with maven 3.0.5. I'm not sure whether that was a bug in maven 3.0 or configuration issue.

jenkins does not recognize checkstyle and pmd reports generated by sonar

I am using sonar to generate Findbugs, Checkstyle and PMD reports, then feeding those reports to jenkins to generate graphs based on the xml files, but i get the following error on jenkins.
[CHECKSTYLE] Parsing of file /home/bldarea/.../checkstyle.xml failed due to an exception:
org.xml.sax.SAXException: Input stream is not a Checkstyle file.
at hudson.plugins.checkstyle.parser.CheckStyleParser.parse(CheckStyleParser.java:69)
at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:53)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2246)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
and similarly for PMD files
[PMD] Parsing of file /home/bldarea/.../pmd.xml failed due to an exception:
org.xml.sax.SAXException: Input stream is not a PMD file.
at hudson.plugins.pmd.parser.PmdParser.parse(PmdParser.java:72)
at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:53)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2246)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
You cannot be sure that the Jenkins plugins use the same version of Checkstyle & PMD than the ones that are embedded in Sonar. So I'm not surprised that such issues can occur.
By the way: I don't see the point to display those results in Jenkins. Sonar UI is far more advanced for quality stuff.
The files you've mentioned doesn't seems like the output reports. Rather they are the rule configuration files. For instance, the PMD report file should not be pmd.xml, rather it should be pmd-results.xml.
Refer {https://issues.jenkins-ci.org/browse/JENKINS-26638?focusedCommentId=220317&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-220317}
Similar issue raised in Jenkin's defect tracking tool. It might help.
I was facing similar issue for PMD [failed due to an exception: org.xml.sax.SAXException: Input stream is not a PMD file.]
As per JIRA ticket(given above) followed below steps,
Using Maven, executed project in eclipse first.
So, PMD created its own pmd.xml file based my file.
Replaced PMD.xml generated by me with one generated by PMD.
imported pmd generated pmd.xml in jenkin
built project and issue got resolved.
jenkins pmd

Error running mvn clean install

using Eclipse to try and build a maven project with Eclipse. Anyway when I try to run mvn clean install I get the following error
Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1
Its calling a MojoExecutionException.
Anyway I am getting the code from a subversion repository which works for others so its not the pom file. I done some googling and it mentions it could be the JBoss version I have running which could be causing the issue. I am using JBoss6.1.0. Also using Maven 3.0.4
Anyone have any ideas? If you need more info just let me know. Thanks.
EDIT: Full stack trace
[ERROR] Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error while running wsconsume
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.Exception: Process terminated with code 1
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumerOutOfProcess(WSContractDelegate.java:133)
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumer(WSContractDelegate.java:99)
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:149)
... 21 more
Well figured it out anyway. Turns out it was a windows limitation with file names. The file path was too long. As such once I moved it to a folder just below root, eg. C:/folder_here then it worked. Also switched to JDK 1.7 because another problem with windows means that if you use 1.6 you need to download another couple of jars. Anyway hope this helps someone else out.

Gail Maven - OSGI Bundle as a Dependency - Resolution Issue

I am trying to use hector-core as a dependency in a grails maven build.
<dependency>
<groupId>me.prettyprint</groupId>
<artifactId>hector-core</artifactId>
<version>1.0-3</version>
<type>bundle</type>
</dependency>
I am getting an error
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-compile (default) on project igiveplatform: Failed to create classpath for Grails execution. Encountered problems resolving dependencies of the executable in preparation for its execution. Failure to find me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core was cached in the local repository, resolution will not be reattempted until the update interval of grails has elapsed or updates are forced
Failed to execute goal on project igiveplatform: Could not resolve dependencies
for project com.igivefirst:igiveplatform:war:0.1-SNAPSHOT: Failure to find
me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core
was cached in the local repository, resolution will not be reattempted until the
update interval of grails has elapsed or updates are forced
The build is trying to download .bundle file instead of .jar which is in the maven repository. Grails builds this project normally.
Thanks in advance!
As recommended below I removed the type tag ... another error now
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-compile (default) on project igiveplatform: Failed to create classpath for Grails execution.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create classpath for Grails execution.
at org.grails.maven.plugin.AbstractGrailsMojo.generateGrailsExecutionClasspath(AbstractGrailsMojo.java:427)
at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:225)
at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:206)
at org.grails.maven.plugin.MvnCompileMojo.execute(MvnCompileMojo.java:41)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Failure to find me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core was cached in the local repository, resolution will not be reattempted until the update interval of grails has elapsed or updates are forced
The dependency type should be jar, not bundle.
(Have a look at a similar question, Why can't maven find an osgi bundle dependency?)

Resources