سؤال

What files need to be submitted to source control for Projects to share Builders?

I am working on an project using Eclipse (Version Juno Service Release 1 - Build id: 20120920-0800). Our team uses Perforce as a means of source control for this project. To do so we use the P4Eclipse Plugin.

The issue I am having is when I add new Builders to a project.

Image of my Builder

Builder Settings

The Builder works fine locally, but after I submit that change to Perforce, anyone who syncs up gets an error. If they open the Builder settings for the project, the Builder I added has been replaced with an error message:

Invalid external Tool

I have submitted both the .project file and the .launch file. Clearly there is something more I need to submit.

Digging a little deeper, I found that on the other users machine, the .launch file I committed to Perforce had actually been deleted by Eclipse! Just opening the workspace containing the project causes it to delete that file. I believe that is the cause of the "Invalid external Tool" error; not that the tool is corrupt or something, but that it doesn't even exist.

Testing things further, I had the user manually create a new Builder with the exact same name locally. They then closed Eclipse, and revert all the changes they made. So at this point, there local project matches exactly what they had before. But now when they open up Eclipse the Builder I commit loads fine!

This implies that there is some local setting that tells Eclipse "don't delete the .launch; it is needed" and by simply creating one locally (even reverting that change after) that message is set.

So my ultimate question is: what files need to be under source control in order to share a project's Builder settings?


I did another test:

This time i made a copy of my project directory and the workspace directory, then created a new Builder. I then did a compare of the entire project directory and the workspace directory.

In the project directory only the .project and .launch files changed/added but both of those are already source controlled.

In the workspace numerous files changed, but most were binary, and a look through them yielded no references to the Builder I added.

هل كانت مفيدة؟

المحلول 3

I have not been able to find an answer to this.

I have logged a post on the Eclipse forums: http://www.eclipse.org/forums/index.php/m/950400/#msg_950400

I have also logged a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=392611

Neither have any response at the time of writing.

نصائح أخرى

Find a project with builders that launch correctly. Next look at all of the "dot resources" in the project (.project, .classpath, .settings/, etc) and see which of those files contain information used to support builders. Then look at your Perforce config to make sure you aren't ignoring those dot files. Sometimes version control plugins will by default not save dot resource files as they're sometimes machine-dependant. It's possible that not all of the dot files made it to the other machine and the migration function in your builder tooling removed all dot files so as not to have an incomplete configuration.

I would say, that most likely simply they don't have the file and directory, which is referenced by the builder. In the picture at http://tinypic.com/view.php?pic=al3nkg&s=6 it can be seen, that you trigger some application, which is in some parent directory. I think the solution can be, that they have this tool (bootinfo.bat) on some other path, or they don't have it. If this true, eclipse cannot launch it. Its always best to run some workspace contained external tool with eclipse.

I've run into this just now, on Eclipse Kepler. It has miraculously fund the missing builder after Project -> Refresh.

You need to also check in your "your_builder.launch" file generated by eclipse located in your workspace/.externalToolBuilders.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top