Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,38 @@ Apache 2.0 License

## Requirements

1. Java11 or Higher on OS X
1. Java 11 or Higher on OS X
2. JNA

## Installation
## Getting Started

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
2. include it as a maven depencency in your project:

```xml
<groupId>io.spot-next</groupId>
<artifactId>java-objectivec-bridge</artifactId>
<version>1.0-SNAPSHOT</version>
<dependency>
<groupId>ca.weblite</groupId>
<artifactId>java-objc-bridge</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
```

## Examples

* [Sample wrapper of NSOpenPanel and NSSavePanel](https://gist.github.com/shannah/65007754c2b0f8add4f7)
* [Example using WebKit and .nib file](https://github.com/shannah/Java-Objective-C-Bridge/blob/master/java/test/ca/weblite/objc/TestWebView.java)
* [Loading Nib File](https://github.com/shannah/Java-Objective-C-Bridge/blob/master/java/test/ca/weblite/objc/LoadNibSample.java)
* [Wrapper for NSProcessInfo to Solve App Nap Problem](java/test/ca/weblite/objc/NSProcessInfoUtils.java)
* [Example using WebKit and .nib file](src/test/java/ca/weblite/objc/TestWebView.java)
* [Loading Nib File](src/test/java/ca/weblite/objc/LoadNibSample.java)
* [Wrapper for NSProcessInfo to Solve App Nap Problem](src/test/java/ca/weblite/objc/NSProcessInfoUtils.java)

## JavaDocs & Documentation

* [Documentation](http://solutions.weblite.ca/java-objective-c-bridge/docs)
* [Documentation](http://solutions.weblite.ca/maven/java-objc-bridge/apidocs/index.html)
* Read a [blog post](http://www.shannah.ca/blog/?p=219) about the motivation for this project.

## Contact

* [Mailing List](http://java.net/projects/java-objc-bridge/lists)
* Post your questions in the [Java-Objective-C Google Group](https://groups.google.com/forum/#!forum/java-objective-c-bridge)
* Post bugs and feature requests to the [issue tracker](https://github.com/shannah/Java-Objective-C-Bridge/issues)

## Credits

Expand Down
212 changes: 173 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
<version>1.1-SNAPSHOT</version>
<name>Java-Objective-C-Bridge</name>
<description>A thin bridge that allows for two-way communication from Java to Objective-C.</description>
<licenses>
<license>
<name>Apache 2.0 License</name>
</license>
</licenses>

<profiles>
<profile>
Expand All @@ -23,10 +18,28 @@
<properties>
<xcodeScheme>Release</xcodeScheme>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<xcodeScheme>Debug</xcodeScheme>
Expand All @@ -49,47 +62,63 @@
</developer>
</developers>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<inceptionYear>2012</inceptionYear>

<organization>
<name>Web Lite Solutions Corp.</name>
<url>http://solutions.weblite.ca</url>
</organization>

<issueManagement>
<system>github</system>
<url>https://github.com/shannah/Java-Objective-C-Bridge/issues</url>
</issueManagement>

<url>https://github.com/shannah/Java-Objective-C-Bridge</url>



<scm>
<connection>scm:git:https://github.com/shannah/Java-Objective-C-Bridge.git</connection>
<developerConnection>scm:git:https://github.com/shannah/Java-Objective-C-Bridge.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/shannah/Java-Objective-C-Bridge</url>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>weblite-internal</id>
<name>Web Lite Internal Repository</name>
<url>scp://maven.weblite.ca/swete-data-recovery/home/maven/</url>

</repository>
<site>
<id>weblite-solutions</id>
<url>scp://solutions.weblite.ca/home/weblite_ca/solutions.weblite.ca/maven/java-objc-bridge</url>
</site>
</distributionManagement>

<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.4</version>
</extension>
</extensions>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-native-libs</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/target/native/</directory>
<filtering>false</filtering>
</resource>
</resources>
<outputDirectory>${basedir}/target/classes/ca/weblite/objc</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<!-- -->

<!-- native build -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand All @@ -116,6 +145,31 @@
</configuration>
</plugin>

<!-- copy native libs -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-native-libs</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/target/native/</directory>
<filtering>false</filtering>
</resource>
</resources>
<outputDirectory>${basedir}/target/classes/ca/weblite/objc</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<!-- add java 11 module name to manifest -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -128,7 +182,94 @@
</archive>
</configuration>
</plugin>

<!-- deployment -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<failOnError>false</failOnError>
<!-- <additionalparam>-Xdoclint:none</additionalparam> -->
<additionalOptions>--allow-script-in-comments </additionalOptions>
<useStandardDocletOptions>false</useStandardDocletOptions>

<quiet>true</quiet>
<!-- does not work with revision property! -->
<ignoreClirr>true</ignoreClirr>

<detectLinks>false</detectLinks>
<detectOfflineLinks>false</detectOfflineLinks>
<doclint>all,-html,-syntax</doclint>
<version>false</version>
<nosince>true</nosince>
<author>false</author>
<defaultAuthor>mojo2012</defaultAuthor>
<defaultVersion>1.0</defaultVersion>
<level>public</level>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- This is necessary for gpg to not try to use the pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>

<dependencies>
Expand All @@ -138,12 +279,6 @@
<version>5.4.0</version>
</dependency>

<!-- <dependency> -->
<!-- <groupId>com.nativelibs4java</groupId> -->
<!-- <artifactId>jnaerator-rococoa-runtime</artifactId> -->
<!-- <version>0.12</version> -->
<!-- </dependency> -->

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand All @@ -157,6 +292,5 @@
<scope>test</scope>
</dependency>


</dependencies>
</project>
</project>
Loading