Hi Taher,

Having OFBiz project declare as a gradle project in eclipse is useful to
see all gradle task and be able to run it.
With these modifications it's the case.


It's not an important point and gradle --gui (even if it less clear) is
usable.

Olivier


Le 25/11/2016 à 19:58, Taher Alkhateeb a écrit :
> Hi Olivier,
> 
> Thank for your research on this. So I have a question before putting an
> opinion; what is the purpose of modifying the the generated project. What
> is the achieved outcome?
> 
> Taher Alkhateeb
> 
> On Fri, Nov 25, 2016 at 12:04 PM, Olivier Heintz <
> holivier.li...@ofbizextra.org> wrote:
> 
>> End of my test ;-) and my conclusions :
>> To have ofbiz in eclipse and being declare as a gradle project, it's
>> necessary to complete the gradle eclipse task before doing the import
>> existing project in eclipse :
>>
>> 1°) to have a correct .project file
>> it's necessary to add to build.gradle (before running gradlew eclipse)
>> eclipse {
>>         project {
>>           //Eclipse project's comment which appair in Gradle tasks view
>> behind
>> ofbiz
>>           comment = 'All the main gradle task'
>>           //Append gradle natures :
>>           natures 'org.eclipse.buildship.core.gradleprojectnature'
>>           //Append the gradle build command:
>>           buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
>>         }
>>   }
>>
>> 2°) it's necessary to add the file
>> org.eclipse.buildship.core.prefs in .settings directory (created by
>> gradle eclipse task)
>> this file contain only :
>>> build.commands=org.eclipse.jdt.core.javabuilder
>>> connection.arguments=
>>> connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
>>> connection.java.home=null
>>> connection.jvm.arguments=
>>> connection.project.dir=
>>> derived.resources=.gradle,build
>>> eclipse.preferences.version=1
>>> natures=org.eclipse.jdt.core.javanature
>>> project.path=\:
>>
>> I have not found if it's easy to configure the eclipse gradle plugin to
>> generate this file.
>>
>> I'm waiting opinions about theses two modifications before updating
>> eclipse wiki page.
>>
>> Le 23/11/2016 à 22:48, Olivier Heintz a écrit :
>>> It seems that the only problem is in the .project file because after a
>>> cleanAll if I use ./gradlew eclipse and after I replace the .project
>>> file by
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <projectDescription>
>>>       <name>ofbiz</name>
>>>       <comment></comment>
>>>       <projects>
>>>       </projects>
>>>       <buildSpec>
>>>               <buildCommand>
>>>                       <name>org.eclipse.jdt.core.javabuilder</name>
>>>                       <arguments>
>>>                       </arguments>
>>>               </buildCommand>
>>>               <buildCommand>
>>>                       <name>org.eclipse.buildship.
>> core.gradleprojectbuilder</name>
>>>                       <arguments>
>>>                       </arguments>
>>>               </buildCommand>
>>>       </buildSpec>
>>>       <natures>
>>>               <nature>org.eclipse.jdt.core.javanature</nature>
>>>               <nature>org.eclipse.buildship.core.gradleprojectnature</
>> nature>
>>>       </natures>
>>> </projectDescription>
>>>
>>> All seems works correctly.
>>>
>>> PS: I am surprised because I thought I did this as first test this
>>> morning when I have started working on configuration on new eclipse
>> version.
>>> So in the next days, I will restart a full new install to check if it's
>>> really only this problem.
>>>
>>>
>>> Le 23/11/2016 à 18:45, Olivier Heintz a écrit :
>>>> Thank you very much Taher,
>>>>
>>>> I will used the gui.
>>>>
>>>> The fun fact is : when I test it (and compare what I have in eclipse), I
>>>> have used the cleanEclipseClasspath and after the eclipseClasspath and
>> .....
>>>> it seen to solve the eclipse pb !
>>>> So I will continue to trying to solve the way to have ofbiz with gradle
>>>> in eclipse ;-) and If I succeeded I will complete the eclipse wiki page.
>>>>
>>>> Thank
>>>>
>>>> Le 23/11/2016 à 17:49, Taher Alkhateeb a écrit :
>>>>> Hi Olivier,
>>>>>
>>>>> It might be a bit quirky to control it from eclipse because of the way
>> it
>>>>> treats sub-projects. If you like a GUI to work with, then I recommend
>>>>> ./gradlew --gui. It's fun to work with and you can save your favorite
>>>>> commands.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Taher Alkhateeb
>>>>>
>>>>> On Wed, Nov 23, 2016 at 7:41 PM, Olivier Heintz <
>>>>> holivier.li...@ofbizextra.org> wrote:
>>>>>
>>>>>> I'm trying to load ofbiz project in eclipse and declare it as a gradle
>>>>>> but it generate a lot of sub-project and error in java build.
>>>>>>
>>>>>> My process :
>>>>>> 1) download ofbiz
>>>>>> 2) ./gradlew eclipse
>>>>>> 3) open eclipse (Neon Java default config) in a new workspace,
>>>>>> 4) import existing project
>>>>>> ofbiz is recognize as a java project and there is no error
>>>>>> 5) button configure as gradle project
>>>>>>
>>>>>> => it generate one project by component
>>>>>> => if generate error in build in Project and External Dependencies
>>>>>> (org.eclipse.buildship.core.gradleclasspathcontainer)
>>>>>>    application(missing)
>>>>>>
>>>>>> ------
>>>>>> I have read the jira OFBIZ-7779
>>>>>> <https://issues.apache.org/jira/browse/OFBIZ-7779>
>>>>>> but I have not found what I'm not doing correctly ...
>>>>>>
>>>>
>>>
>>>
>>
> 

Reply via email to