Cannot load powertac-common project into eclipse

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot load powertac-common project into eclipse

grampajohn
Administrator
I've tried everything I can think of. The project seems to be a grails plugin, right? The STS version of Eclipse does not seem to know anything about grails. Eclipse Helios (3.6.1) knows about grails, and I have grails installed. So I tried the "import project from git" option to checkout code from a local clone of powertac-common. I've tried setting it up as both a grails project and a grails-plugin project, but in either case I get an empty grails project, without any of the content that was in the git repo. So then I tried just telling eclipse to use the local clone, which clearly has all the content. It won't use that, even as a "new project," apparently because it does not already have a .project file.

So how is this supposed to work? I have some tariff-representation code I need to add. I've spent a good three hours on this and made no progress at all. I must be missing some fundamental concept here.

Any suggestions?

John
Reply | Threaded
Open this post in threaded view
|

Re: Cannot load powertac-common project into eclipse

grampajohn
Administrator
I think I figured out the problem. When you do
   grails create-plugin
you get a directory structure, along with some special files. Two of
these files are called .project and .settings. If these files are not
present, Eclipse will not recognize the project as an existing grails
plugin project. Apparently they were not committed to the github repository.

You can recover by just running
  grails create-plugin powertac-common
again _in the directory above the powertac-common directory_. As far as
I can tell, this does not disturb the existing content, but it does add
the critical files. Now Eclipse can open it.

John


On 01/10/2011 10:04 PM, grampajohn [via Power TAC Developers] wrote:

> I've tried everything I can think of. The project seems to be a grails
> plugin, right? The STS version of Eclipse does not seem to know anything
> about grails. Eclipse Helios (3.6.1) knows about grails, and I have
> grails installed. So I tried the "import project from git" option to
> checkout code from a local clone of powertac-common. I've tried setting
> it up as both a grails project and a grails-plugin project, but in
> either case I get an empty grails project, without any of the content
> that was in the git repo. So then I tried just telling eclipse to use
> the local clone, which clearly has all the content. It won't use that,
> even as a "new project," apparently because it does not already have a
> .project file.
>
> So how is this supposed to work? I have some tariff-representation code
> I need to add. I've spent a good three hours on this and made no
> progress at all. I must be missing some fundamental concept here.
>
> Any suggestions?
>
> John
>
>
> ------------------------------------------------------------------------
> View message @
> http://power-tac-developers.975333.n3.nabble.com/Cannot-load-powertac-common-project-into-eclipse-tp2232486p2232486.html
> To start a new topic under Power TAC Developers, email
> [hidden email]
> To unsubscribe from Power TAC Developers, click here
> <
>

Reply | Threaded
Open this post in threaded view
|

Re: Cannot load powertac-common project into eclipse

grampajohn
Administrator
Looking through a few of the git archives, it appears that the use of .gitignore is quite inconsistent. In the case of powertac-common, it was explicitly ignoring .project and .settings. Other projects have different .gitignore contents, or in some cases do not have a .gitignore.

If we are going to be successful in building and maintaining a system made up of a large number of independent modules like this, we need to be consistent about such things. Here's the (repaired) content of powertac-common/.gitignore in my local archive:
--------------
# IntelliJ IDEA project files
*.iml
*.ipr
*.iws
.idea/

# Deployment directories
target/

# OS generated files
.DS_Store?
.DS_Store
ehthumbs.db
Icon?
Thumbs.db

# Compiled source
*.class

# Cobertura generated files
cobertura.ser
------------
Does this seem correct? Do we need a project-wide "plugin template" that includes all the boilerplate, so folks don't have to struggle with issues like this?

John
Reply | Threaded
Open this post in threaded view
|

Re: Cannot load powertac-common project into eclipse

Carsten Block
Administrator
Thanks for the revised version of the .gitignore file. I think it's fine. I would not recommend to set up a "template" plugin as these templates tend to outdate quickly. 

 "grails create-plugin" nicely creates the base infrastructure for you and I prefer to force plugin developers to go through the "getting started guide" afterwards. Like this they then know which changes to the default plugin structure have to be made and *why*. I added a short step to the guide that shows how to set up .gitignore correctly: https://github.com/powertac/powertac-server/wiki/Plugin-development-getting-started

Also, I'm currently updating all projects I maintain so that these have (i) consistent .gitignore files and (ii) eclipse meta files re-added back to the committed file set.

Carsten  


Am 13.01.2011 um 04:04 schrieb grampajohn [via Power TAC Developers]:

Looking through a few of the git archives, it appears that the use of .gitignore is quite inconsistent. In the case of powertac-common, it was explicitly ignoring .project and .settings. Other projects have different .gitignore contents, or in some cases do not have a .gitignore.

If we are going to be successful in building and maintaining a system made up of a large number of independent modules like this, we need to be consistent about such things. Here's the (repaired) content of powertac-common/.gitignore in my local archive:
--------------
# IntelliJ IDEA project files
*.iml
*.ipr
*.iws
.idea/

# Deployment directories
target/

# OS generated files
.DS_Store?
.DS_Store
ehthumbs.db
Icon?
Thumbs.db

# Compiled source
*.class

# Cobertura generated files
cobertura.ser
------------
Does this seem correct? Do we need a project-wide "plugin template" that includes all the boilerplate, so folks don't have to struggle with issues like this?

John



View message @ http://power-tac-developers.975333.n3.nabble.com/Cannot-load-powertac-common-project-into-eclipse-tp2232486p2246014.html
To start a new topic under Power TAC Developers, email [hidden email]
To unsubscribe from Power TAC Developers, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Cannot load powertac-common project into eclipse

grampajohn
Administrator
On 01/13/2011 04:20 AM, Carsten Block [via Power TAC Developers] wrote:

> Thanks for the revised version of the .gitignore file. I think it's
> fine. I would not recommend to set up a "template" plugin as these
> templates tend to outdate quickly.
>
> "grails create-plugin" nicely creates the base infrastructure for you
> and I prefer to force plugin developers to go through the "getting
> started guide" afterwards. Like this they then know which changes to the
> default plugin structure have to be made and *why*. I added a short step
> to the guide that shows how to set up .gitignore correctly:
> https://github.com/powertac/powertac-server/wiki/Plugin-development-getting-started
>
> Also, I'm currently updating all projects I maintain so that these have
> (i) consistent .gitignore files and (ii) eclipse meta files re-added
> back to the committed file set.

Excellent. This sounds like a good solution.

John


>
> Carsten
>
>
> Am 13.01.2011 um 04:04 schrieb grampajohn [via Power TAC Developers]:
>
>> Looking through a few of the git archives, it appears that the use of
>> .gitignore is quite inconsistent. In the case of powertac-common, it
>> was explicitly ignoring .project and .settings. Other projects have
>> different .gitignore contents, or in some cases do not have a .gitignore.
>>
>> If we are going to be successful in building and maintaining a system
>> made up of a large number of independent modules like this, we need to
>> be consistent about such things. Here's the (repaired) content of
>> powertac-common/.gitignore in my local archive:
>> --------------
>> # IntelliJ IDEA project files
>> *.iml
>> *.ipr
>> *.iws
>> .idea/
>>
>> # Deployment directories
>> target/
>>
>> # OS generated files
>> .DS_Store?
>> .DS_Store
>> ehthumbs.db
>> Icon?
>> Thumbs.db
>>
>> # Compiled source
>> *.class
>>
>> # Cobertura generated files
>> cobertura.ser
>> ------------
>> Does this seem correct? Do we need a project-wide "plugin template"
>> that includes all the boilerplate, so folks don't have to struggle
>> with issues like this?
>>
>> John
>>
>>
>> ------------------------------------------------------------------------
>> View message @
>> http://power-tac-developers.975333.n3.nabble.com/Cannot-load-powertac-common-project-into-eclipse-tp2232486p2246014.html
>> <http://power-tac-developers.975333.n3.nabble.com/Cannot-load-powertac-common-project-into-eclipse-tp2232486p2246014.html?by-user=t>
>> To start a new topic under Power TAC Developers, email [hidden email]
>> </user/SendEmail.jtp?type=node&node=2247418&i=0>
>
>
>
> ------------------------------------------------------------------------
> View message @
> http://power-tac-developers.975333.n3.nabble.com/Cannot-load-powertac-common-project-into-eclipse-tp2232486p2247418.html
> To start a new topic under Power TAC Developers, email
> [hidden email]
> To unsubscribe from Power TAC Developers, click here
> <
>