xcode maven plugin unable to build library
I'm trying to build my first iOS library using XCode Maven Plugin from scratch - for test purpose, only from resources added after choose 'Empty Application' from Xcode new project template. Below is my directory layout:
xcode-maven-hello-master pom.xml src xcode MavenTest AppDelegate.h AppDelegate.m MavenTest-Info.plist // other files (assets, etc.) MavenTest.xcodeproj
And there is my configuration file: (pom.xml)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>my.package</groupId> <artifactId>MavenTest</artifactId> <version>1.0-SNAPSHOT</version> <packaging>xcode-lib</packaging> <build> <plugins> <plugin> <groupId>com.sap.prd.mobile.ios.mios</groupId> <artifactId>xcode-maven-plugin</artifactId> <version>1.13.0</version> <extensions>true</extensions> </plugin> </plugins> </build> </project>
As you can see, my artifactId is the same as Xcode project name. Packaging is set to xcode-lib. I've also set extensions tag (true) and changed in XCode Preferences derived data folder relative to project folder with name build. But after invoking: mvn clean install I got following error:
Failed to execute goal com.sap.prd.mobile.ios.mios:xcode-maven-plugin:1.13.0:xcode-package (default-xcode-package) on project MavenTest: Execution default-xcode-package of goal com.sap.prd.mobile.ios.mios:xcode-maven-plugin:1.13.0:xcode-package failed: /Users/kuba/Desktop/xcode-maven-hello-master/target/checkout/src/xcode/build/Release-iphoneos/libMavenTest.a should be attached but does not exist
My library wasn't created. But I can't figure out what I'm doing wrong. If any of you have successfully built library and could explain me how to do it correctly? After invoking mvn install my library should be placed in local repository? I would appreciate any help!
I think you should try choosing an iOS static library project template instead of the empty application template if you want to create a library project. Could you try with this change?