Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16771

Xcode plugin doesn't read the Source Trees setting from the IDE

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • xcode-plugin
    • None

      My source code relies upon the settings of Source Trees to build (from Xcode IDE -> Preference -> Locations -> Source Trees). It seems that the Xcode plugin doesn't read these settings because the same source code can be built from the command line 'xcodebuild'.

          [JENKINS-16771] Xcode plugin doesn't read the Source Trees setting from the IDE

          lacostej added a comment -

          Can you describe a bit more your configuration and what happens when you try building with the plugin ?
          Any log from both your command line and our plugin to compare ?

          lacostej added a comment - Can you describe a bit more your configuration and what happens when you try building with the plugin ? Any log from both your command line and our plugin to compare ?

          Olivier Guizol added a comment - - edited

          I ended up with the same problem and here's my analysis:
          When building using Xcode.app, we can see that source trees are set in environment variables (when variables are dumped in the logs).
          setenv SOURCE_TREE_NAME=/path/to/source/
          Using Jenkins plugin which calls the command line there is no such line in the logs.

          Looking at the xcode-plugin code, XCodeBuilder.java does not have a source tree parameter. It should be added.
          A solution could be to read the preference file ~/Library/Preferences/com.apple.dt.Xcode.plist and extract the value for the key named IDEApplicationwideBuildSettings. This is a dictionary where the keys are the source tree names and the values are the associated path.

          Another solution would be to provide a new section in the xcode plugin page so that we can set source trees.

          A workaround I tested and seems to work is to set these variables with the EnvInject Plugin.
          Some interesting links: http://stackoverflow.com/questions/12010718/configure-xcode-source-trees-from-command-line
          http://www.cocoabuilder.com/archive/xcode/283358-xcodebuilds-fails-where-xcode-app-succeeds-source-tree-problem.html

          Hope this helps.

          Olivier

          Olivier Guizol added a comment - - edited I ended up with the same problem and here's my analysis: When building using Xcode.app, we can see that source trees are set in environment variables (when variables are dumped in the logs). setenv SOURCE_TREE_NAME=/path/to/source/ Using Jenkins plugin which calls the command line there is no such line in the logs. Looking at the xcode-plugin code, XCodeBuilder.java does not have a source tree parameter. It should be added. A solution could be to read the preference file ~/Library/Preferences/com.apple.dt.Xcode.plist and extract the value for the key named IDEApplicationwideBuildSettings. This is a dictionary where the keys are the source tree names and the values are the associated path. Another solution would be to provide a new section in the xcode plugin page so that we can set source trees. A workaround I tested and seems to work is to set these variables with the EnvInject Plugin. Some interesting links: http://stackoverflow.com/questions/12010718/configure-xcode-source-trees-from-command-line http://www.cocoabuilder.com/archive/xcode/283358-xcodebuilds-fails-where-xcode-app-succeeds-source-tree-problem.html Hope this helps. Olivier

            Unassigned Unassigned
            alex_barna Tzuchien
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: