Skip to content

Commit

Permalink
Merge pull request #1015 from jdiazgon/cliJar
Browse files Browse the repository at this point in the history
Adding batch files to CLI jar
  • Loading branch information
jdiazgon authored Oct 4, 2019
2 parents 99a3ee8 + 5c4783a commit effb71e
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 17 deletions.
22 changes: 22 additions & 0 deletions cobigen-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,28 @@
</resource>
</resources>
<plugins>
<!-- Add CobiGen bat files for executing the CLI on a console -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources/batchFiles</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions cobigen-cli/src/main/resources/batchFiles/cg.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@echo off
REM echo "Current Java Version is"
REM echo %JAVA_HOME%
setlocal enableDelayedExpansion

IF "%*"=="" (
java -jar %SOFTWARE_PATH%\cobigen-cli\cobigen.jar --help
) ELSE (
java -jar %SOFTWARE_PATH%\cobigen-cli\cobigen.jar %*
)

EXIT /B
7 changes: 7 additions & 0 deletions cobigen-cli/src/main/resources/batchFiles/cg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ "$*" == "" ]; then
java -jar $SOFTWARE_PATH/cobigen-cli/cobigen.jar -help
else
java -jar $SOFTWARE_PATH/cobigen-cli/cobigen.jar $*
fi
12 changes: 12 additions & 0 deletions cobigen-cli/src/main/resources/batchFiles/cobigen.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@echo off
REM echo "Current Java Version is"
REM echo %JAVA_HOME%
setlocal enableDelayedExpansion

IF "%*"=="" (
java -jar %SOFTWARE_PATH%\cobigen-cli\cobigen.jar --help
) ELSE (
java -jar %SOFTWARE_PATH%\cobigen-cli\cobigen.jar %*
)

EXIT /B
7 changes: 7 additions & 0 deletions cobigen-cli/src/main/resources/batchFiles/cobigen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ "$*"=="" ]; then
java -jar $SOFTWARE_PATH/cobigen-cli/cobigen.jar -help
else
java -jar $SOFTWARE_PATH/cobigen-cli/cobigen.jar $*
fi
17 changes: 0 additions & 17 deletions cobigen-cli/src/main/resources/cobigen.bat

This file was deleted.

0 comments on commit effb71e

Please sign in to comment.