Plugin Documentation

Goals available for this plugin:

GoalDescription
xcode:attach-version-infoGenerates a <artifact-id>-<version>-version.xml for reproducibility reasons. This versions.xml contains information about the scm location and revision of the built project and all its dependencies. Expects a sync.info file in the root folder of the project as input. The sync.info file is a property file. If used with perforce it must contain the following entries:
  • type=perforce
  • port=<The url of the perforce server>
  • depotpath=<The path synced on the perforce server>
  • changelist=<The changelist of the change that is being built>
If used with git it must contain the following entries:
  • type=git
  • repo=<The git repository>
  • commitId=<The commitId of the change that is being built>
For git based projects the sync.info file can be created with the following code snipped executed before the xcode-maven-plugin is triggered.
echo "type=git" > sync.info
echo "repo=scm:git:$(git remote -v |awk '/fetch/ {print $2;}')" >> sync.info
echo "commitId=$(git rev-parse HEAD)" >> sync.info
xcode:change-app-idAppends a suffix to the appId. No actions are taken if the suffix is not specified or the suffix has zero length.
xcode:change-artifact-idAppends a suffix to the artifactId. No actions are taken if the suffix is not specified or has zero length.
xcode:change-versions-in-plistUpdates the properties CFBundleVersion and CFBundleShortVersionString inside the plist file(s) that is/are denoted for the given configurations and sdks. The version is updated with a version derived from the maven project version. For CFBundleVersion all version parts containing only numbers are retained. The leading numbers of the first version part containing characters are also retained. Any subsequent version part is ommited. For CFBundleShortVersion the same strategy as described for CFBundleVersion applies. Additionally the version is truncated so that it consists of three numbers separated by two dots.
xcode:check-prerequisitesAssures that the following required prerequisites are fulfilled:
  • Xcode version MIN_XCODE_VERSION or higher is installed
xcode:cleanNo description.
xcode:copy-sourcesCopies sources to the checkout directory below the target directory.
xcode:generate-ota-htmlGenerates over the air html files and prepares the generated artifacts for deployment.
xcode:package-applicationPackages the application built by Xcode and prepares the generated artifact for deployment.
xcode:package-dsymPackages the debug symbols generated during the Xcode build and prepares the generated artifact for deployment. The debug symbols are generated only if the "Generate Debug Symbols" in Xcode is active.
xcode:package-fat-libCalls the lipo tool for creating universal (multi-architecture) libraries and prepares the generated artifacts for deployment.
xcode:package-frameworkPackages the framework built by Xcode and prepares the generated artifact for deployment.
xcode:package-ipaPackages the ipa files and prepares the generated artifacts for deployment.
xcode:package-metadataPackages the AppStore metadata information and prepares the generated artifact for deployment.
xcode:package-xcodeprojPackages the Xcode project with all its resolved binary dependencies. I.e. this archive can be unzipped and directly opened in Xcode. It uses the zip command for packaging. The zip command is called with the -y options to preserver symbolic links and the -r option to follow the paths recursively. The following files and folders get packaged:
  • src/xcode/ (or the directory specified by the Maven parameter xcode.sourceDirectory in you changed the default Xcode project location)
  • pom.xml
  • sync.info
  • target/bundles/
  • target/headers/
  • target/libs/
  • target/xcode-deps/
You can use the additionalArchivePaths and the excludes If called from command line you have to call mvn initialize before in order to make sure that all binary dependencies have been retrieved from the command line. Please note that this goal is not part of the default lifecycle for xcode-lib and xcode-app projects.
xcode:post-deployRegisters a TransferListener on Aether that reacts on successful deployments. For each ipa file deployed successfully a pointer file is written. This pointer file redirects to XXX
xcode:pre-deployRegisters a TransferListener on Aether that reacts on successful deployments. For each ipa file deployed successfully a pointer file is written. This pointer file redirects to XXX
xcode:prepare-xcode-buildPrepares the local build environment. Copies and unpacks the artifacts of the referenced projects into the target folder.
xcode:set-default-configurationSets default values needed during Xcode build.
xcode:set-default-doxygen-configurationSets default values needed during Doxygen generation.
xcode:setup-loggingNo description.
xcode:skip-library-buildPrevents building of libraries or frameworks during Company Build. The apps must be code signed. In case of signing with multiple certificates, e.g Enterprise and Company, apps must be built twice. The libraries and the frameworks do not need to be signed and must be built once.
xcode:update-version-in-pomNo description.
xcode:verification-checkProvides the possibility to perform verification checks.
The check classes and their severities are described in an additional xml document, defined in xcode.verification.checks.definitionFile.
The specific checks have to be implemented in separate projects. These projects define dependency to Xcode Maven Pugin Verification API and must not reference the xcode-maven-plugin project. The Xcode Maven Plugin Verification API project could be found here The coordinates of that projects need to be provided on the check node belonging to the test as attributes groupId, artifactId and version.
The classpath for this goal will be extended by the jars found under the specified GAVs.
Example checks definition:
<checks>
  <check groupId="my.group.id" artifactId="artifactId" version="1.0.0" severity="ERROR" class="com.my.MyVerificationCheck1"/>
  <check groupId="my.group.id" artifactId="artifactId" version="1.0.0" severity="WARNING" class="com.my.MyVerificationCheck2"/>
</checks>
xcode:xcode-packagePackages all the artifacts for Xcode libraries and prepares the generated artifacts for deployment.
xcode:xcode-project-validateValidates if the given project has a predefined structure. The convention expects that the name of the Xcode project is the same as the artifact-Id.
xcode:xcodebuildTriggers the Xcode build.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven3.0
JDK1.6
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.sap.prd.mobile.ios.mios</groupId>
          <artifactId>xcode-maven-plugin</artifactId>
          <version>1.14.5</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>com.sap.prd.mobile.ios.mios</groupId>
        <artifactId>xcode-maven-plugin</artifactId>
        <version>1.14.5</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"