I just cloned a Grails project to my local machine (using Mercurial). I am using GGTS for Grails projects, and would like to import the Grails project as an existing project. With a Gradle-built project, I would just apply the Gradle Eclipse plugin and then run gradle eclipse inside the project root.
This generates Eclipse project files and classpath magic for me, so I can import it into my Eclipse workspace.
I'm using GGTS for my Grails projects. But when I open up GGTS and go to Import >> Existing project, and select my Grails project (root dir), it doesn't see the necessary Eclipse project files and can't open it up.
So I ask: is there an equivalent "Grails Eclipse/GGTS" plugin that will allow me to take a Grails project that has no Eclipse files (.project, etc.) and generate them?
The command you are looking for is the Grails command integrate-with. You can read more about it in the Grails documentation.
The integrate-with command will integrate Grails with different IDEs
and build systems based on the arguments provided. For example the
--eclipse command will produce .project and .classpath files for use with Eclipse or Spring Tool Suite (STS).
Related
I try to build a project, which is using the Maven Wrapper. The build works fine on command line. There is also a plug-in for IntelliJ Idea. However, I haven't found any article, how to build such project with Eclipse.
Do you have an experience with project build by ./mvnw command instead of mvn in Eclipse, please?
As implied by the comment from LMC, the Java edition of Eclipse will come with the "m2e" plugin, which will automatically recognize a project with a pom.xml file as a Maven project, and it will automatically note the dependencies, download them, and compile your source code with those artifacts as dependencies.
That deals with dependencies and compilation. If your build is running unit tests with Surefire, or generating code with particular plugins, unless there is a specialized m2e connector for that plugin, Eclipse will not know to do that.
Inside Eclipse, if you need to run a Maven build, you don't need to care about "mvn" vs. "mvnw". Eclipse will have an embedded Maven installation.
I have a maven project in eclipse (was originally a dynamic web project, which was converted to a maven project that has the web-app arch type).
Whenever I upload the project to Github, I, of course, upload the source java and web files, pom.xml, but I also need to upload the .project, .settings, and .classpath files which are Eclipse IDE specific (right?), so that later I can import it directly using eclipse from Github. If the latter files are not uploaded, I cannot import the project later on in eclipse. After importing, I use maven with the respective pom.xml file to download the dependencies and build the war file.
Is there a way to export my project in a form independent from eclipse, i.e., something like a pure maven project? So that, later, it can be imported using e.g., say Intellij or Netbeans only using maven? Or just tell Eclipse to import a maven project from Git, rather than an Eclipse project as it is now. Is there such a thing? If so, how to create it and commit it to Github from Eclipse? Which files/directories do I (not) need?
I have to add/change some features in a Spring boot api which has a blueprint repository. I downloaded the branch from gitlab and opened the same in IntelliJ. But IntelliJ does not detect any framework. Even the basic spring imports are failing. Also I usually use Maven as build tool, but the project requires me to use Gradle, However I am not allowed to download gradle on their environment(even my local). Can anyone please point me in the right directions please.
First, try to build the project from the command prompt:
gradlew clean build
If this is building successfully you are good to use the project in IntelliJ as a normal Java project and add/edit code. If this is not working then check what's the issue and update the question.
To add framework support (in your case Gradle as you mentioned) right-click the project and choose Add Framework Support (mostly at the top of the menu) and choose Gradle.
Edit
After successful gradlew clean build, reimport the project in IntelliJ by selecting build.gradle file.
why do I need to apply: mvn eclipse:eclipse command?
are they equivalent to application container/server?
Is there a file for which customizing is necessary besides web.xml?
when you create a web project using maven, like maven-archetype-webapp. It creates the folder structure as recommend by Maven for a webapp like shown here .
Now when you try to import these folders in Eclipse, it still would look like folders but eclipse cannot understand the nature of these folders. Eclipse relates folders and contents within them to an Eclipse dynamic web project only through its .project , .settings files
So in order for your maven project to be understood by Eclipse, you run the goal mvn eclipse:eclipse. After executing this goal, maven generates the .project, .settings files necessary for eclipse to understand the project as Web project.
This is however optional. You can still import the project as Maven projects within eclipse and continue to use them but you cant rely on Eclipse's features like clean/ build / build automatically.
Though I use eclipse, I dont rely on Eclipse's build feature. I have installed Maven eclipse plugin and that allows me to run maven goals and commands within Eclipse which is as good as running Eclipse's build feature. Hope this helps.
I have a jar codebase (developed and successfully compiled in Intellij IDEA) without class files. I want to make jar with that codebase through windows batch-script only. Please help me to make the jar automatically without opening it in any IDE or any manual operation.
Thanks in advance for the help.
You generally do that using build tools like Ant, Maven. Maven is quite more popular these days.
Convert your intellij project into an Maven project like this (IntelliJ - Convert a Java project/module into a Maven project/module), and then execute call mvn clean package from your windows script to build the jar. The jar will be located under ${project.dir}/target