Skip to content

Commit

Permalink
32: Provide P2 repository
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Jun 7, 2017
1 parent e1184da commit be7fca6
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 10 deletions.
48 changes: 45 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>
<groupId>si.uom</groupId>
<artifactId>si-parent</artifactId>
<version>0.7-SNAPSHOT</version>
<version>0.7</version>
<packaging>pom</packaging>
<name>International System of Units (SI)</name>
<description>Units of Measurement SI (Système International d'Unités)</description>
Expand All @@ -20,13 +20,14 @@
<jdkVersion>1.7</jdkVersion>
<jsr.version>1.0</jsr.version>
<si.version>${project.version}</si.version>
<si.quantity.version>0.6.6</si.quantity.version><!-- To handle quantity separately, makes deployment easier -->
<si.quantity.version>0.6.6</si.quantity.version><!-- To handle quantity
separately, makes deployment easier -->
<project.build.javaVersion>${jdkVersion}</project.build.javaVersion>
<maven.compile.targetLevel>1.6</maven.compile.targetLevel>
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
</properties>
<modules>
<module>quantity</module>
<module>quantity</module>
<module>units</module>
<module>units-java8</module>
</modules>
Expand Down Expand Up @@ -139,4 +140,45 @@
<url>scp://unitsofmeasurement.github.io/www/docs/lib/</url>
</site>
</distributionManagement>

<profiles>
<profile>
<id>p2</id>
<build>
<plugins>
<plugin>
<groupId>org.reficio</groupId>
<artifactId>p2-maven-plugin</artifactId>
<version>1.2.0</version>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<artifacts>
<!-- specify your depencies here -->
<!-- groupId:artifactId:version -->
<artifact>
<id>javax.measure:unit-api:${jsr.version}</id>
<id>tec.uom.lib:uom-lib-common:${jsr.version}</id>
<!-- >id>tec.uom:uom-se:${project.version}</id -->
<id>tec.uom:uom-se:1.0.7</id> <!-- TODO define SE version in parent -->
<id>si.uom:si-quantity:${project.version}</id>
<id>si.uom:si-units-java8:${project.version}</id>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<pluginRepositories>
<pluginRepository>
<id>reficio</id>
<url>http://repo.reficio.org/maven/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion quantity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>si.uom</groupId>
<artifactId>si-parent</artifactId>
<version>0.7-SNAPSHOT</version>
<version>0.7</version>
</parent>
<artifactId>si-quantity</artifactId>
<name>SI Quantities</name>
Expand Down
4 changes: 2 additions & 2 deletions units-java8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>si.uom</groupId>
<artifactId>si-parent</artifactId>
<version>0.7-SNAPSHOT</version>
<version>0.7</version>
</parent>
<artifactId>si-units-java8</artifactId>
<name>SI Units for Java SE 8</name>
Expand All @@ -15,7 +15,7 @@
<properties>
<!-- Versions -->
<jdkVersion>1.8</jdkVersion>
<se.version>1.0.7-SNAPSHOT</se.version>
<se.version>1.0.7</se.version>
<project.build.javaVersion>${jdkVersion}</project.build.javaVersion>
<maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
Expand Down
4 changes: 2 additions & 2 deletions units/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>si.uom</groupId>
<artifactId>si-parent</artifactId>
<version>0.7-SNAPSHOT</version>
<version>0.7</version>
</parent>
<artifactId>si-units</artifactId>
<name>SI Units</name>
Expand All @@ -15,7 +15,7 @@
<!-- ======================================================= -->
<properties>
<!-- Versions -->
<ri.version>1.0.3-SNAPSHOT</ri.version>
<ri.version>1.0.3</ri.version>
<project.build.javaVersion>${jdkVersion}</project.build.javaVersion>
<maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
Expand Down
2 changes: 1 addition & 1 deletion units/src/test/java/si/uom/PrefixTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void testKilo() {
@Test
public void testMega() {
Unit<Mass> m1 = MEGA(GRAM);
assertEquals("t", m1.toString()); // Passes in Maeven/CI
assertEquals("Mg", m1.toString()); // Passes in Maven/CI
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion units/src/test/java/si/uom/QuantityPrefixTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class QuantityPrefixTest {
@Test
public void testKilo() {
// TODO how to handle equals for units?
assertEquals(KILOGRAM.getSymbol(), KILO(GRAM).getSymbol());
assertNull(KILO(GRAM).getSymbol());
assertEquals(KILOGRAM.toString(), KILO(GRAM).toString());
}

Expand Down

0 comments on commit be7fca6

Please sign in to comment.