You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Roger Debry <DE...@uvu.edu> on 2018/09/28 13:59:46 UTC

Netbeans won't create a project from cloned source

I have students who are writing their first Java programs, and pushing them to GitHub. I want to clone their projects so that I can grade them. I tried a simple “Hello world” Java application as a test to make sure that all of my instructions were accurate and that I could in fact clone a Java project from GitHub. As I explained, Netbeans 9 will clone the source code files, but when it goes to create the project, it brings up the new project dialogue and then creates a Java application with an empty main(). The URL of this test program is https://github.com/debryro/test.git

Roger deBry

Re: Netbeans won't create a project from cloned source

Posted by Peter Hull <pe...@gmail.com>.
On Fri, 28 Sep 2018 at 14:59 Roger Debry <DE...@uvu.edu> wrote:

> I have students who are writing their first Java programs, and pushing
> them to GitHub.
>
Are  the students all using NetBeans? If so it might be easier for you to
create and push an 'empty' NB project (just what New Java Application...
produces), have the students fork that using GitHub's UI and then clone
their forks.

Using your test repo I was able to clone and create a NB project by
selecting the Java Project with Existing Sources option and giving it the
src subdirectory. But if they come up with an unconventional file layout
this might not be straightforward.

Re: Netbeans won't create a project from cloned source

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
Consider using Maven-based projects (more or less the industry standard, so
why not) even for the very first Java programs, which would have as a side
effect that NetBeans would open them automatically from Git without any
additional steps.

Gj


On Friday, September 28, 2018, John McDonnell <mc...@gmail.com>
wrote:

> Hi Roger,
>
> Just tried this and your correct with how it seems to work.
>
> I guess the problem here is that the projects don't follow a particular
> format, and so NetBeans might struggle, and the wizard is an attempt to
> allow you to create a project around the sources, using the Java Project
> from Existing Sources option maybe?
> Using this option you'll need to ensure you select the correct project
> folder as the wizard will attempt to create a new project (or at least it
> looked like it for me there), and ensure you set the correct source and
> test folders so that NetBeans can handle those correctly.
>
> Alternatively you could try selecting the Open Sources in Favourites
> option in the Clone Completed dialog and select close.  This would allow
> you to see the clones sources without any interference from the IDE.
>
> Regards
>
> John
>
>
>
> On Fri, 28 Sep 2018 at 14:59, Roger Debry <DE...@uvu.edu> wrote:
>
>> I have students who are writing their first Java programs, and pushing
>> them to GitHub. I want to clone their projects so that I can grade them. I
>> tried a simple “Hello world” Java application as a test to make sure that
>> all of my instructions were accurate and that I could in fact clone a Java
>> project from GitHub. As I explained, Netbeans 9 will clone the source code
>> files, but when it goes to create the project, it brings up the new project
>> dialogue and then creates a Java application with an empty main(). The URL
>> of this test program is https://github.com/debryro/test.git
>>
>> Roger deBry
>>
>

Re: Netbeans won't create a project from cloned source

Posted by John McDonnell <mc...@gmail.com>.
Hi Roger,

Just tried this and your correct with how it seems to work.

I guess the problem here is that the projects don't follow a particular
format, and so NetBeans might struggle, and the wizard is an attempt to
allow you to create a project around the sources, using the Java Project
from Existing Sources option maybe?
Using this option you'll need to ensure you select the correct project
folder as the wizard will attempt to create a new project (or at least it
looked like it for me there), and ensure you set the correct source and
test folders so that NetBeans can handle those correctly.

Alternatively you could try selecting the Open Sources in Favourites option
in the Clone Completed dialog and select close.  This would allow you to
see the clones sources without any interference from the IDE.

Regards

John



On Fri, 28 Sep 2018 at 14:59, Roger Debry <DE...@uvu.edu> wrote:

> I have students who are writing their first Java programs, and pushing
> them to GitHub. I want to clone their projects so that I can grade them. I
> tried a simple “Hello world” Java application as a test to make sure that
> all of my instructions were accurate and that I could in fact clone a Java
> project from GitHub. As I explained, Netbeans 9 will clone the source code
> files, but when it goes to create the project, it brings up the new project
> dialogue and then creates a Java application with an empty main(). The URL
> of this test program is https://github.com/debryro/test.git
>
> Roger deBry
>