You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@edgent.apache.org by Dale LaBossiere <dm...@gmail.com> on 2016/09/30 13:57:53 UTC

Heads up: changes to Eclipse based Edgent runtime development environment

I’ve merged EDGENT-251 / PR-201 which changes how Eclipse builds deal with references to 3rd-party jars.
When you rebase and pickup commit bd71ad8 your Eclipse based Edgent runtime builds will fail until you take the necessary action.
See EDGENT-251 for details: https://issues.apache.org/jira/browse/EDGENT-251 <https://issues.apache.org/jira/browse/EDGENT-251> 

— Dale

Re: Heads up: changes to Eclipse based Edgent runtime development environment

Posted by Susan Cline <ho...@pacbell.net>.
Very impressive Dale and Queenie.  I went through the instructions and everything worked flawlessly!

Thank you Dale for all the work you have put in to transition to gradle, and thanks Queenie for your note.

Cheers,

Susan

> On Oct 3, 2016, at 12:13 PM, Dale LaBossiere <dm...@gmail.com> wrote:
> 
> Queenie, thanks for the detailed sharing of your experience!
> It’s great to get confirmation that everything went smoothly for someone else  :-)
> 
> — Dale
> 
>> On Oct 3, 2016, at 3:02 PM, Queenie Ma <qu...@apache.org> wrote:
>> 
>> Now that the Gradle work is mostly completed, I would like to share my
>> experiences setting up my repository to use Gradle to build via the command
>> line and to integrate with my Eclipse development environment.
>> 
>> I started by re-cloning my GitHub repository to remove all of the generated
>> Ant-related directories and files.
> ...
> 


Re: Heads up: changes to Eclipse based Edgent runtime development environment

Posted by Victor Dogaru <vd...@gmail.com>.
This is another confirmation that switching to use Gradle is a smooth
experience :-)

One thing which I noticed is that if you import Eclipse projects from the
source "General > Existing projects into Workspace", you end up importing
the scripts project from ./build/distributions/java8/scripts rather than
the one from the Git repository.  You need to make sure that you import
projects using the Git import source, as specified in the DEVELOPMENT page.

Victor

On Mon, Oct 3, 2016 at 12:13 PM, Dale LaBossiere <dm...@gmail.com>
wrote:

> Queenie, thanks for the detailed sharing of your experience!
> It’s great to get confirmation that everything went smoothly for someone
> else  :-)
>
> — Dale
>
> > On Oct 3, 2016, at 3:02 PM, Queenie Ma <qu...@apache.org> wrote:
> >
> > Now that the Gradle work is mostly completed, I would like to share my
> > experiences setting up my repository to use Gradle to build via the
> command
> > line and to integrate with my Eclipse development environment.
> >
> > I started by re-cloning my GitHub repository to remove all of the
> generated
> > Ant-related directories and files.
> ...
>
>

Re: Heads up: changes to Eclipse based Edgent runtime development environment

Posted by Dale LaBossiere <dm...@gmail.com>.
Queenie, thanks for the detailed sharing of your experience!
It’s great to get confirmation that everything went smoothly for someone else  :-)

— Dale

> On Oct 3, 2016, at 3:02 PM, Queenie Ma <qu...@apache.org> wrote:
> 
> Now that the Gradle work is mostly completed, I would like to share my
> experiences setting up my repository to use Gradle to build via the command
> line and to integrate with my Eclipse development environment.
> 
> I started by re-cloning my GitHub repository to remove all of the generated
> Ant-related directories and files.
...


Re: Heads up: changes to Eclipse based Edgent runtime development environment

Posted by Queenie Ma <qu...@apache.org>.
Now that the Gradle work is mostly completed, I would like to share my
experiences setting up my repository to use Gradle to build via the command
line and to integrate with my Eclipse development environment.

I started by re-cloning my GitHub repository to remove all of the generated
Ant-related directories and files.

$ git clone git@github.com:queeniema/incubator-edgent.git

Then, I updated my cloned repository with the latest changes from the
remote repository (my remote is called 'upstream').

$ git co master;git fetch upstream;git merge upstream/master;git push

Where I would normally use Ant to build the Edgent code, I used Gradle,
following the steps in the DEVELOPMENT.MD file. The first command below
automatically downloaded Gradle 3.1 for me. The second command ran the
default 'assemble' task, which built all code and Javadoc into
'build\distributions'.

$ ./gradlew --version
$ ./gradlew

The build was successful and completed in about 17 seconds. I tried
compiling and running a sample Edgent application (Console Water Detector)
from the command line as follows. It was successful.

$ java -cp
build/distributions/java8/samples/lib/edgent.samples.console.jar:.
org.apache.edgent.samples.console.ConsoleWaterDetector

I then made some changes to the application and re-compiled using:
./gradlew. It was very quick (about 2 seconds)!

Usually, I use Eclipse to run my applications, so I wanted to set that up
as well. Based on the comments in the DEVELOPMENT.MD file, I knew that I
would need to perform some addtional steps that I did not need to do when
using Ant since the 3rd party JARs are no longer included in the Git
repository. I started with a fresh workspace by deleting the Edgent
directories from my workspace. Here are the steps I followed:


   1. From the File menu, select 'Import'
   2. From the Git folder, select 'Projects from Git' and click 'Next'
   3. Select 'Existing local repository' and click 'Next'
   4. Select the 'incubator-edgent' Git repository (it was already
   displayed since I had added it previously when creating the workspace) and
   click 'Next'. Otherwise, click 'Add' and navigate to the Git repository (in
   my case, '/Users/queeniema/github/incubator-edgent').
   5. Select 'Import existing Eclipse projects' and click 'Next'
   6. In the Import Projects window, make sure that the 'Search for nested
   projects' checkbox is selected. Click 'Finish' to bring in all Edgent
   projects. There will be errors in your workspace.
   7. Run a Gradle task to make all of the dependant 3rd party JARs
   available to Eclipse. When the command finishes, refresh your Eclipse
   workspace (File > Refresh) so that it rebuilds the projects. There should
   be no errors in your workspace.
      - $ ./gradlew setupExternalJars


I tried running the Console Water Detector application once more, this time
from Eclipse, by right-clicking on the ConsoleWaterDetector.java file and
selecting 'Run As' > 'Java Application'. It ran successfully as it did
before! Success!

Overall, my experience in switching over from Ant to Gradle went smoothly
thanks to the clear documentation instructions, and I didn't run into any
issues. I hope this will help others set up their environments as well!

--
Queenie


On Fri, Sep 30, 2016 at 6:57 AM, Dale LaBossiere <dm...@gmail.com>
wrote:

> I’ve merged EDGENT-251 / PR-201 which changes how Eclipse builds deal with
> references to 3rd-party jars.
> When you rebase and pickup commit bd71ad8 your Eclipse based Edgent
> runtime builds will fail until you take the necessary action.
> See EDGENT-251 for details: https://issues.apache.org/
> jira/browse/EDGENT-251 <https://issues.apache.org/jira/browse/EDGENT-251>
>
> — Dale