gradle-eclipse

How to convert Java Gradle project to Dynamic Web Project?

独自空忆成欢 提交于 2020-08-02 04:13:48
问题 I am following this article https://www.linkedin.com/pulse/building-jax-rs-project-eclipse-gradle-neeraj-malhotra On how to build a JAX-RS project in Eclipse with Gradle I am using Eclipse Java EE IDE for Web Developers. Version: Oxygen.2 Release (4.7.2) Build id: 20171218-0600 My target runtime is WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) my gradle build file apply plugin: 'war' apply plugin: 'eclipse-wtp' sourceCompatibility = 1.8 repositories { mavenCentral() } dependencies {

How to convert Java Gradle project to Dynamic Web Project?

▼魔方 西西 提交于 2020-08-02 04:12:05
问题 I am following this article https://www.linkedin.com/pulse/building-jax-rs-project-eclipse-gradle-neeraj-malhotra On how to build a JAX-RS project in Eclipse with Gradle I am using Eclipse Java EE IDE for Web Developers. Version: Oxygen.2 Release (4.7.2) Build id: 20171218-0600 My target runtime is WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) my gradle build file apply plugin: 'war' apply plugin: 'eclipse-wtp' sourceCompatibility = 1.8 repositories { mavenCentral() } dependencies {

How to run a gradle task from a java code?

本小妞迷上赌 提交于 2020-05-15 10:27:00
问题 I need to run the gradle eclipse task to an external gradle project from a java method, is it possible to do it using the Gradle Tooling API ? 回答1: The Gradle forum gives a nice example for doing this programmatically but since it disregards the projects individual gradle wrapper, it can't gurantee the smooth execution of your build and even break your application. For more information why you always should rely on the gradle wrapper read here and here. Using the Gradle wrapper The

Chinese characters in gitignore

落爺英雄遲暮 提交于 2020-02-08 09:32:39
问题 I am using git for bunch of my java projects. I want to ignore .classpath, bin, .gradle and bunch of other files and folders. I cannot access this files / folders in eclipse to ignore them from eclipse. Hence I decided to edit the .gitignore file. The file contains random chinese characters. I still went ahead and updated the .gitignore file with the required file list. However, when I ignore any other file from eclipse, the .gitignore is again appended with chinese characters. Is this

How to get SVN revision in Gradle for Android?

时光毁灭记忆、已成空白 提交于 2019-12-24 13:32:11
问题 I have field (svn revision) in resource. How can I get svn revision in my field using by Gradle, that not to do that by my hands? 回答1: You could modify the following solution, explained here, which prints out the current SVN revision. // File: build.gradle task svninfo << { new ByteArrayOutputStream().withStream { os -> def result = exec { executable = 'svn' args = ['info'] standardOutput = os } def outputAsString = os.toString() def matchLastChangedRev = outputAsString =~ /Last Changed Rev:

Get JavaDoc jars for dependencies in Gradle

时光怂恿深爱的人放手 提交于 2019-12-24 07:36:01
问题 I am working on a Gradle task to create a project for an IDE based on Eclipse. This requires to generate both a .project and a .classpath file. This part is absolutely no problem and I can use the Gradle Eclipse Plugin via apply plugin: 'eclipse' , to let my task depend on eclipseProject and eclipseClasspath with altered configurations. But an additional requirement says, that the whole project must be portable (even to environments without Gradle), so it is not possible to just define the

eclipse gradle workspace resolution between gradle projects not working

北城余情 提交于 2019-12-23 10:28:22
问题 2 gradle projects, A and B where A has compile dependency on B defined. Remappig of JARs is enabled for maven & gradle projects. I've tried with custom tooling model enabled and disabled. I have local repositories defined in a file under init.d directory. Question 1: Why do I get an error of undersolved dependency for project B while resolving dependencies for A? Even though B isn't deployed to any of the repositories local workspace resolution should kick in and resolve it in same way as it

How to add gradle generated source folder to Eclipse project?

不羁的心 提交于 2019-12-21 04:07:10
问题 My gradle project generates some java code inside gen/main/java using annotation processor. When I import this project into Eclipse, Eclipse will not automatically add gen/main/java as source folder to buildpath. I can do it manually. But is there a way to automate this? Thanks. 回答1: You can easily add the generated folder manually to the classpath by eclipse { classpath { file.whenMerged { cp -> cp.entries.add( new org.gradle.plugins.ide.eclipse.model.SourceFolder('gen/main/java', null) ) }

Spring Tool Suite not possible to create new project with Gradle: Can not import using Gradle (STS) because STS Gradle Tooling is not installed

杀马特。学长 韩版系。学妹 提交于 2019-12-20 06:37:29
问题 I'm using the Spring Tool Suite: Version: 3.9.0.RELEASE Build Id: 201707061903 Platform: Eclipse Neon.3 (4.6.3) And the Gradle plugin installed: Buildship: Eclipse Plug-ins for Gradle 2.1.1.v20170713-0942 org.eclipse.buildship.feature.group Eclipse Buildship I'm trying to create a new Spring Starter Project, but I've this message when I select the type "Gradle (Buildship 1.x)" or "Gradle (Buildship 2.x)" or "Gradle (STS)" Can not import using Gradle (Buildship 2.x) because Buildship Gradle

Running Gradle project via Eclipse errors “system Cannot find System Java Compiler”

自闭症网瘾萝莉.ら 提交于 2019-12-17 16:09:10
问题 When I run Gradle project via Eclipse I get below error. system Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory. Could not execute build using Gradle installation 'C:\gradle-1.2-all\gradle-1.2'. But I have installed JDK 1.7 and set the JAVA_HOME environment variable. 回答1: Go to File -> Other Settings -> Default Project Structure Now Set your JDK location 回答2: In Preference