| Summary: | external tools builder fails to expand variables | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Nikolay Metchev <nikolaymetchev> |
| Component: | Ant | Assignee: | Jared Burns <jared_burns> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
Please investigate, Jared. When you do the rebuild all do you any resource selected? Both project_loc and project_name rely on having a resource selected to do the variable expansion. It is unlikely these variables will work correctly across multiple projects in an external tool builder situation. Do you want all of the builds to use the same project_name and project_loc? I would have thought that project_loc and project_name would refer to the project that this external tools builder belongs to. I once submitted a request to allow external tools builders to be shared across projects and was told that it created more headache than is worth doing. So if external tools builders only apply to one project it would seem silly to have those variables refer to other projects. It doesn't matter which project I have selected the error occurs because I have several project that have exactly the same external tools builder defined. |
I have defined an external tools builder which runs a batch file located within an eclipse project e.g. ${workspace_loc:/Bootstrap/CreateJavaDebugFile.cmd}. That batch file takes some parameters but those paramaters use eclipse variables e.g.: ${project_loc}\Source\Java\Generated\Make ${project_name} -d When I perform a rebuild all...all the projects that have this external tool builder report the following errors: An error occurred attempting to expand the variable project_loc. No resource selected. An error occurred attempting to expand the variable project_name. No resource selected. and throw the following exception: org.eclipse.core.runtime.CoreException: Could not resolve an argument. at org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil.get Arguments(Unknown Source) at org.eclipse.ui.externaltools.internal.program.launchConfigurations.ProgramLaunch Delegate.launch(Unknown Source) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(Unknown Source) at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild (Unknown Source) at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build (Unknown Source) at org.eclipse.core.internal.events.BuildManager$2.run(Unknown Source) at org.eclipse.core.internal.runtime.InternalPlatform.run(Unknown Source) at org.eclipse.core.runtime.Platform.run(Unknown Source) at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source) at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source) at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source) at org.eclipse.core.internal.events.BuildManager$1.run(Unknown Source) at org.eclipse.core.internal.runtime.InternalPlatform.run(Unknown Source) at org.eclipse.core.runtime.Platform.run(Unknown Source) at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(Unknown Source) at org.eclipse.core.internal.events.BuildManager.build(Unknown Source) at org.eclipse.core.internal.resources.Workspace.build(Unknown Source) at org.eclipse.ui.actions.GlobalBuildAction$1.run(Unknown Source) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (Unknown Source)