Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse uses an old PATH reference to command(Eclipse uses an old PATH reference to command)
Eclipse uses an old PATH reference to command [message #1698829] Thu, 18 June 2015 05:01 Go to next message
Eclipse UserFriend
I have an Eclipse gradle project. Where I run a pod command line task. Here is the ``build.gradle``file:

```
import java.io.File;

// The 'java' plugin must be applied before the 'j2objc' plugin
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: myPlugin

sourceCompatibility = 1.7
version = '1.0'

repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}

dependencies {
}




class MyTask extends DefaultTask {

@TaskAction
def task() {

def xcodeProjectDir = "${project.projectDir}/../ios"

try {
project.exec {
workingDir xcodeProjectDir
executable "pod"
args "install"
}
}
catch (Exception exception) {
throw exception
}
}

}


class myPlugin implements Plugin<Project> {

@Override
void apply(Project project) {
project.with {

project.tasks.create(name: 'amyTask', type: MyTask) {
description 'A Test Task'
}

}
}

}
```

When I run this task I can see that Eclipse uses an old version (0.36.0) of cocoapods. On my system I have installed 0.37.2. From the Terminal I can versify this with ``pod --version``.

Running the task in eclipse leads to:

```
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:

export LANG=en_US.UTF-8

[!] Unable to load a specification for the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-plugins-0.4.1`
[!] Unable to load a specification for the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-0.4.3`
[!] Unable to load a specification for the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-trunk-0.6.0`
Analyzing dependencies
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0/lib/cocoapods/user_interface/error_report.rb:119:in ``': No such file or directory - git (Errno::ENOENT)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0/lib/cocoapods/user_interface/error_report.rb:119:in `git_information'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0/lib/cocoapods/user_interface/error_report.rb:38:in `report'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0/lib/cocoapods/command.rb:59:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:374:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:315:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:303:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0/lib/cocoapods/command.rb:46:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0/bin/pod:44:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':j2objcXcode'.
> Process 'command 'pod'' finished with non-zero exit value 1
```

Is there a way to update the cocoapod version eclipse uses? Eclipse seems to use an old PATH.

Re: Eclipse uses an old PATH reference to command [message #1699104 is a reply to message #1698829] Sun, 21 June 2015 05:20 Go to previous message
Eclipse UserFriend
I have no clue how Eclipse would interact with cocoapods. Note that in this forum we focus on tools for Java development.
If you explain through which Eclipse plugin you are invoking all this, maybe we can point you to a forum where folks know more about your situation.
Previous Topic:Eclipse won't connect to git server using ssh private key on the new format
Next Topic:Debugging run configuration
Goto Forum:
  


Current Time: Mon Apr 28 02:22:53 EDT 2025

Powered by FUDForum. Page generated in 0.02324 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top