Skip to content

Plugin should be able to build workspace. #17

@hiro0824

Description

@hiro0824

I specified xcode workspace location as follows:

  <plugin>
    <groupId>ca.mestevens.ios</groupId>
    <artifactId>xcode-maven-plugin</artifactId>
    <version>0.9.3</version>
    <extensions>true</extensions>
    <configuration>
        <buildSimulator>true</buildSimulator>
        <buildDevice>false</buildDevice>
        <xcodeWorkspace>${basedir}/morning.xcworkspace</xcodeWorkspace>
    </configuration>
  </plugin>

and tried to run "mvn compile", however, I got error as follows:


[INFO] --- xcode-maven-plugin:0.9.3:xcode-build (default-xcode-build) @ morning ---
[info] xcodebuild: error: You cannot specify both an Xcode 3 project and a workspace.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.428 s
[INFO] Finished at: 2015-07-24T15:20:52-07:00
[INFO] Final Memory: 10M/309M
[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal ca.mestevens.ios:xcode-maven-plugin:0.9.3:xcode-build (default-xcode-build) on project morning: Process [/usr/bin/xcodebuild, -project, /Users/hiro/Work/Develop/MavenPlugins/xcode-maven-plugin/ca.mestevens/samples/morning/morning.xcodeproj, -scheme, morning, -workspace, /Users/hiro/Work/Develop/MavenPlugins/xcode-maven-plugin/ca.mestevens/samples/morning/morning.xcworkspace, build, -sdk, iphonesimulator, CONFIGURATION_BUILD_DIR=/Users/hiro/Work/Develop/MavenPlugins/xcode-maven-plugin/ca.mestevens/samples/morning/target/build/iPhone-simulator] returned 64. -> [

It looks the reason why xcode-maven-plugin failed to build the workspace is -project and -workspace are specified in same command.
When I run the following command (I removed -project from the command above), I could build the workspace.

$>xcodebuild -scheme morning -workspace /Users/hiro/Work/Develop/MavenPlugins/xcode-maven-plugin/ca.mestevens/samples/morning/morning.xcworkspace build -sdk iphonesimulator CONFIGURATION_BUILD_DIR=/Users/hiro/Work/Develop/MavenPlugins/xcode-maven-plugin/ca.mestevens/samples/morning/target/build/iPhone-simulator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions