Using grails 2.5.0 & IntelliJ 13.1.6.
I have a grails app where I am trying to use a locally developed java library built with gradle.
In the IntelliJ project, I have added the java library as a module and I can get at the library source, edit, and run gradle commands, etc.
However, my grails project, which uses the java library, throws "unable to resolve class" errors when compiling. Errors thrown on the 'import' statements in my grails app classes.
Any ideas? Thanks in advance.
Related
I have created a java maven project in eclipse to get response from web services using rest api, but not able to get the response in Anypoint Studio using the same code I am getting error like importing of rest assured and many more. Could anyone help how to run same maven project that i have created in eclipse in MuleSoft Anypoint Studio to get the response. Please let me know if any further information required.
Anypoint Studio only supports Mule projects.
Since it is based on Eclipse You might be able to install the Eclipse plugin for Java to add support for Java projects.
I have updated my STS to v4 few days ago,since then I unable to run my application which has groovy files.
I have installed Groovy Development plugin and tried to build the project using the maven command "clean install".
Maven build has been successfully executed, but when I started my project it throws that the Groovy class has not found exception.
I tried cleaning the project many times, but getting the same ClassNotFoundException for the Groovy classes.
My STS v4 installation details:
Java Build path details:
Error Details, while I am running the project:
That parser class is the groovy class which throws ClassNotFoundException.
Moreover, I the project explorer some strange icon is shown next to those kind of groovy files.
I am also attaching the maven build details,
these build information shows that those groovy files are compiled successfully, but still it throws ClassNotFoundException while starting the application.
NOTE: I gave clean - build, "clean compile" and updated maven project more than 15 times. Yet no luck.
Please help me in reSolving this issue SO!
Found the answer!
Compiler mismatch is the culprit here.
I created a Maven project following the quickstart template as described in the Maven doc site. I can build it. However I'm confused: I can't find any instructions for executing an application built with Maven. I did find the suggestion I type java -cp target/Mus-1.0-SNAPSHOT.jar app.App or something similar, but this fails when I added an external dependency to my Maven project.
Surely there must be some kind of Maven command for executing an App.
I have a project in java on netbeans 7.3 that I need to add more classes to. However, I am working with scala on eclipse. How can I import those classes from my eclipse project and execute them when I run the program on netbeans?
Not sure since I've never really configured stuff - just coded in prepared environments :(
If you are developing a library in your Scala application, i would suggest to use sbt and package the library as a jar and import that jar to your java project.
You will have to define a build file in sbt. I am not sure whether you already defined it and use the sbt package command.
sbt package
Try using sbt
My web project includes Groovy class files.
How should I compile it for my project using Eclipse?
Rest of my team is using IntelliIDEA to use it but I want to set it up in Eclipse.
To start with I have installed a Groovy Plug-In for my Eclipse and installed Groovy on my Windows.
You should be able to right click on the project -> Configure -> Convert to Groovy project.
If your project is a maven project, then you should also install m2eclipse as well as the optional m2eclipse configurator for groovy-eclipse. This will automatically configure your project for Eclipse and groovy.
Hope this links helps you. It has step by step on how to import your existing Groovy Project into eclipse so you can work on it.
http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project
If the project is created using grails create project, I believe all of the .project and .setting files are there for eclipse.
If you have the groovy eclipse plugin installed you should be able to mix your groovy classes into the same packages as your java code. Are you using maven or ant to build your actual war file? If not you will have to make sure that you compile the groovy classes along with the java code. while in eclipse you will be fine. Both ant and maven have facilities for compiling the groovy and java code together for your actual war that you deploy.