Skip to content

Commit 9ab62ff

Browse files
author
Matthias Fuchs
committed
updated readme, added xcodebuild to maven
1 parent 563dc47 commit 9ab62ff

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ Apache 2.0 License
1010

1111
## Requirements
1212

13-
1. Java7 or Higher on OS X
13+
1. Java11 or Higher on OS X
1414
2. JNA
1515

1616
##Installation
1717

18-
1. Add [ObjCBridge.jar](https://github.com/shannah/Java-Objective-C-Bridge/blob/master/dist/ObjCBridge.jar?raw=true) and [jna.jar](https://github.com/shannah/Java-Objective-C-Bridge/blob/master/dist/jna-4.0.0.jar?raw=true) to your classpath.
19-
2. **Optional** - Add [libjcocoa.dylib](https://github.com/shannah/Java-Objective-C-Bridge/blob/master/dist/libjcocoa.dylib?raw=true) to your library path. It will first check to see if libjcocoa.dylib in in the library path. It is isn't, it will simply extract it to the temp directory and use that one.
18+
1. Check out the project and use `mvn clean install` (for debug builds) or `mvn clean install -Drelease=true` (for release builds) to build it
19+
2. include it as a maven depencency in your project:
20+
21+
```xml
22+
<groupId>io.spot-next</groupId>
23+
<artifactId>java-objectivec-bridge</artifactId>
24+
<version>1.0-SNAPSHOT</version>
25+
```
2026

2127
##Examples
2228

pom.xml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,51 @@
3333
<version>3.1.0</version>
3434
<executions>
3535
<execution>
36-
<id>copy-resources</id>
37-
<!-- here the phase you need -->
38-
<phase>validate</phase>
36+
<id>copy-native-libs</id>
37+
<phase>process-resources</phase>
3938
<goals>
4039
<goal>copy-resources</goal>
4140
</goals>
4241
<configuration>
43-
<outputDirectory>${basedir}/target/classes/ca/weblite/objc</outputDirectory>
4442
<resources>
4543
<resource>
46-
<directory>dist/${xcodeScheme}/</directory>
44+
<directory>${basedir}/dist/${xcodeScheme}/</directory>
4745
<filtering>false</filtering>
4846
</resource>
4947
</resources>
48+
<outputDirectory>${basedir}/target/classes/ca/weblite/objc</outputDirectory>
5049
</configuration>
5150
</execution>
5251
</executions>
5352
</plugin>
5453

54+
<!-- -->
55+
56+
<plugin>
57+
<groupId>org.codehaus.mojo</groupId>
58+
<artifactId>exec-maven-plugin</artifactId>
59+
<version>1.6.0</version>
60+
<executions>
61+
<execution>
62+
<id>xcodebuild</id>
63+
<phase>generate-resources</phase>
64+
<goals>
65+
<goal>exec</goal>
66+
</goals>
67+
</execution>
68+
</executions>
69+
<configuration>
70+
<executable>xcodebuild</executable>
71+
<arguments>
72+
<argument>-scheme</argument>
73+
<argument>libjcocoa</argument>
74+
<argument>-configuration</argument>
75+
<argument>${xcodeScheme}</argument>
76+
<argument>build</argument>
77+
</arguments>
78+
</configuration>
79+
</plugin>
80+
5581
<plugin>
5682
<groupId>org.apache.maven.plugins</groupId>
5783
<artifactId>maven-jar-plugin</artifactId>

0 commit comments

Comments
 (0)