mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Restructure WPILibJ to share code.
wpilibJavaDevices now contains RoboRIO specific code and wpilibJava has shared high level information. The restructuring was mostly just copy and paste. The three big exceptions are Timer, RobotState and HLUsageReporting. Those require some dependencies injection since that appears to be the cleanest way to share the code. Change-Id: Ie7011e32bc95953a87801a9905b3bfec7f8de285
This commit is contained in:
@@ -13,37 +13,29 @@
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../maven-utilities/athena/library-jar/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
<!-- repository>
|
||||
<id>sonatype</id>
|
||||
<name>Sonatype OSS Snapshots Repository</name>
|
||||
<url>http://oss.sonatype.org/content/groups/public</url>
|
||||
</repository -->
|
||||
<!-- For old snapshots, please use groupId `com.jnaerator` and the following repo -->
|
||||
<!-- repository>
|
||||
<id>nativelibs4java-repo</id>
|
||||
<url>http://nativelibs4java.sourceforge.net/maven</url>
|
||||
</repository -->
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJava</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJava</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaJNI</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>so</type>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaDevices</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaJNI</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>so</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
@@ -57,7 +49,7 @@
|
||||
<configuration>
|
||||
<target>
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
|
||||
classpathref="maven.plugin.classpath" />
|
||||
classpathref="maven.plugin.classpath" />
|
||||
|
||||
<property name="mvn.wpilibJava.jar.path" value="${edu.wpi.first.wpilibj:wpilibJava:jar}"/>
|
||||
|
||||
@@ -70,7 +62,23 @@
|
||||
</then>
|
||||
<else>
|
||||
<copy todir="${project.build.directory}/classes" >
|
||||
<fileset dir="${mvn.wpilibJava.jar.path}" />
|
||||
<fileset dir="${mvn.wpilibJava.jar.path}" />
|
||||
</copy>
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<property name="mvn.wpilibJavaDevices.jar.path" value="${edu.wpi.first.wpilibj:wpilibJavaDevices:jar}"/>
|
||||
|
||||
<available file="${mvn.wpilibJavaDevices.jar.path}" type="file" property="mvn.wpilibJavaDevices.jar.isfile" />
|
||||
|
||||
<if>
|
||||
<isset property="mvn.wpilibJavaDevices.jar.isfile" />
|
||||
<then>
|
||||
<unzip src="${mvn.wpilibJavaDevices.jar.path}" dest="${project.build.directory}/classes" />
|
||||
</then>
|
||||
<else>
|
||||
<copy todir="${project.build.directory}/classes" >
|
||||
<fileset dir="${mvn.wpilibJavaDevices.jar.path}" />
|
||||
</copy>
|
||||
</else>
|
||||
</if>
|
||||
@@ -86,144 +94,88 @@
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy todir="${project.build.directory}/classes/linux-arm"
|
||||
file="${edu.wpi.first.wpilibj:wpilibJavaJNI:so}" />
|
||||
<copy todir="${project.build.directory}/classes/linux-arm"
|
||||
file="${edu.wpi.first.wpilibj:wpilibJavaJNI:so}" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ant-contrib</groupId>
|
||||
<artifactId>ant-contrib</artifactId>
|
||||
<version>1.0b3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<groupId>ant-contrib</groupId>
|
||||
<artifactId>ant-contrib</artifactId>
|
||||
<version>1.0b3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
|
||||
<!-- <plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJava</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>fetch-dependencies</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaJNI</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>so</type>
|
||||
<destFileName>libwpilibJavaJNI.so</destFileName>
|
||||
<outputDirectory>${project.build.directory}/classes/linux-arm</outputDirectory>
|
||||
</artifactItem>
|
||||
COMMENT BEGIN <artifactItem>
|
||||
<groupId>edu.wpi.first.wpilib.hal</groupId>
|
||||
<artifactId>libHALAthenaJava</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>so</type>
|
||||
<destFileName>libHALAthenaJava.so</destFileName>
|
||||
<outputDirectory>${project.build.directory}/classes/linux-arm</outputDirectory>
|
||||
</artifactItem> COMMENT END
|
||||
</artifactItems>
|
||||
<overWriteReleases>false</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin> -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install-jar</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>install</goal>
|
||||
</goals>
|
||||
<id>install-jar</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>install</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.apache.maven.plugins
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-dependency-plugin
|
||||
</artifactId>
|
||||
<versionRange>[2.8,)</versionRange>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<execute />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<versionRange>[2.8,)</versionRange>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.apache.maven.plugins
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-dependency-plugin
|
||||
</artifactId>
|
||||
<versionRange>[2.8,)</versionRange>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<execute />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<versionRange>[2.8,)</versionRange>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user