add version number to java build

This commit is contained in:
Scott Fennell 2020-02-03 12:57:14 -06:00
parent 4e6c4b63a8
commit 619198ea4a
4 changed files with 37 additions and 19 deletions

View File

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.1)
project(trick)
set(TRICK_MAJOR 19)
set(TRICK_MINOR 1)
set(TRICK_TINY dev)
set(TRICK_MINOR 0)
set(TRICK_TINY 1)
#set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

View File

@ -3,4 +3,4 @@
# Build Java
###############################################################
add_custom_target(java COMMAND ${MAVEN_EXECUTABLE} -q package -Dcmake=true -DbuildDirectory=${CMAKE_BINARY_DIR}/libexec/trick/java/build WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_target(java COMMAND ${MAVEN_EXECUTABLE} -q package -Dcmake=true -DbuildDirectory=${CMAKE_BINARY_DIR}/libexec/trick/java/build -DTRICK_VERSION="${TRICK_MAJOR}.${TRICK_MINOR}.${TRICK_TINY}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -6,11 +6,11 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
all:
@echo "Building java application..."
@${MVN} -q package
@${MVN} package -q -Dcmake=false
javadoc:
${MVN} javadoc:javadoc
clean:
@${MVN} -q clean
@${MVN} -q clean -Dcmake=false
@echo java build directory cleaned.

View File

@ -6,16 +6,47 @@
<groupId>trick-java</groupId>
<artifactId>trick-java</artifactId>
<version>1.0</version>
<version>${trick_version}</version>
<name>trick-java</name>
<url>https://github.com/nasa/trick</url>
<profiles>
<profile>
<id>cmake</id>
<build>
<directory>${buildDirectory}</directory>
</build>
<properties>
<trick_version>${TRICK_VERSION}</trick_version>
</properties>
<activation>
<property>
<name>cmake</name>
<value>true</value>
</property>
</activation>
</profile>
<profile>
<id>makefile</id>
<properties>
<trick_version>${env.TRICK_VERSION}</trick_version>
</properties>
<activation>
<property>
<name>cmake</name>
<value>false</value>
</property>
</activation>
</profile>
</profiles>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<trick_version>dev</trick_version>
</properties>
<dependencies>
@ -316,17 +347,4 @@
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<build>
<directory>${buildDirectory}</directory>
</build>
<activation>
<property>
<name>cmake</name>
<value>true</value>
</property>
</activation>
</profile>
</profiles>
</project>