How to configure Xcode to use Maven

Xcode goes out of the box with Ant support (with a few sample projects you can create).

How to configure Xcode to use maven pom.xml files?

Before linking to the project I'm trying to set up, is here:

It uses subfolders, each with its own pom.xml, all are managed using the usual maven build goals:

  • mvn clean install
  • mvn install -o
  • mvn install -o -DskipTests

What creates the problem are nested modules; each of which is installed in the local ~ / .m2 / repository.

For comparison: the eclipse build system refers to banks in ~ / .m2 / repository for external dependencies, but allows the modules in the project to refer to each other.

I need a way to configure something similar for Xcode.

+8
maven xcode geotools
source share
3 answers

You can use this:

mvn ant:ant 

to create a complete ant construct and then use it from xcode. You will need to re-run this task every time you change pom. You can add a shell task to complete it as a first step in your build.

You can also try turning $M2_HOME/bin/mvn into a shell task in an assembly. It may work, but you can never debug problems with it without a lot of black magic.

I would try the previous to the later.

+1
source share

I noticed that there are no answers to this question. If this is not possible, maybe you can just make maven call the ant target to create xcode?

0
source share

You can use Xcode Maven Plugin to use maven in your Xcode.

this one is a git storage hub.

To use the Xcode Maven plugin, the following prerequisites must be met:

  • Mac OS X> = 10.7 (Lion) + Build should run on Mac.
  • JRE 6+ Java must be installed on the computer.
  • Maven> = 3.0.2 Maven 3 must be installed and configured correctly, so that it has access to central repositories.
  • Xcode> = 4.4 Xcode 4.4 or higher must be installed when the plugin executes
  • Call Xcode command line.
0
source share

All Articles