Skip to content

Commit

Permalink
Add maven build for gcc-bridge maven-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmoldrich committed Nov 14, 2019
1 parent 0f6a6b5 commit b1a6030
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/gcc-bridge/maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@ project targeting the JVM.
See the [gcc-bridge-example](https://github.com/bedatadriven/gcc-bridge-example) project on GitHub for an example
of how to use the plugin to incorporate C sources in a Maven Project.

## Development builds

At this stage, the maven plugin cannot be built using gradle, and so must be built separatetly. You can do so with the following steps

1. Export the renjin toolchain to your local maven repository by invoking `./gradlew publishToMavenLocal` in the root folder of the Renjin project
2. Ensure the `<version>` in the `pom.xml` in this directory matches the version generated by `allprojects.project.version` in the `build.gradle` of the root folder
3. Invoke `mvn package` in this directory
4. Manually install the jar into your local maven repository:
```mvn install:install-file -Dfile=<path to maven plugn>/target/gcc-bridge-maven-plugin-3.5-betadev.jar -DgroupId=org.renjin -DartifactId=gcc-bridge-maven-plugin -Dversion=<version> -Dpackaging=jar -DpomFile=pom.xml```
_(adapt the `<path>` and `<version>` to suit)_

The `gcc-bridge-example` should now use your local toolchain to build.
111 changes: 111 additions & 0 deletions tools/gcc-bridge/maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.renjin</groupId>
<artifactId>gcc-bridge-maven-plugin</artifactId>
<version>3.5-betadev</version>
<name>Renjin GCC Bridge Maven Plugin</name>

<packaging>maven-plugin</packaging>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<repositories>
<repository>
<id>bedatadriven-public</id>
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>

<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<type>jar</type>
<version>2.2.1</version>
</dependency>

<!-- dependencies to annotations -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.4</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-api</artifactId>
<version>2.7</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<type>jar</type>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.renjin</groupId>
<artifactId>gcc-bridge-compiler</artifactId>
<version>3.5-betadev</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.renjin</groupId>
<artifactId>renjin-soot</artifactId>
<version>2.9.198</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5</version>
<!--
<configuration>
<goalPrefix>gcc-bridge</goalPrefix>
</configuration>
<executions>
<execution>
<id>default-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
<phase>process-classes</phase>
</execution>
<execution>
<id>help-descriptor</id>
<goals>
<goal>helpmojo</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
-->
</plugin>
</plugins>
</build>

</project>

0 comments on commit b1a6030

Please sign in to comment.