Skip to content

Commit

Permalink
Improve layout of CLI distribution helidon-cli.zip (#947)
Browse files Browse the repository at this point in the history
Signed-off-by: tvallin <thibault.vallin@oracle.com>
  • Loading branch information
tvallin authored Jul 3, 2023
1 parent 435691e commit 68327cb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
19 changes: 19 additions & 0 deletions cli/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,25 @@
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>cli-distribution</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration combine.self="override">
<classifier>cli</classifier>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${mainClass}</mainClass>
<useUniqueVersions>false</useUniqueVersions>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
4 changes: 2 additions & 2 deletions cli/impl/src/main/assembly/distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
<fileSets>
<fileSet>
<directory>${project.build.directory}/libs</directory>
<outputDirectory>/lib/libs</outputDirectory>
<outputDirectory>/lib</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.build.directory}/helidon.jar</source>
<source>${project.build.directory}/helidon-cli.jar</source>
<outputDirectory>/lib</outputDirectory>
</file>
<file>
Expand Down
2 changes: 1 addition & 1 deletion cli/impl/src/main/assembly/helidon
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ build_command() {
shift
done

command="${JAVA_EXEC} ${HELIDON_JAVA_OPS} -jar ${BASEDIR}/lib/helidon.jar ${args}"
command="${JAVA_EXEC} ${HELIDON_JAVA_OPS} -jar ${BASEDIR}/lib/helidon-cli.jar ${args}"
}

#Append variable value
Expand Down
2 changes: 1 addition & 1 deletion cli/impl/src/main/assembly/helidon.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if "%JAVACMD%"=="" set JAVACMD=java
@REM Find script base directory
for %%i in ("%~dp0..") do set "BASEDIR=%%~fi"

set JARFILE=%BASEDIR%\lib\helidon.jar
set JARFILE=%BASEDIR%\lib\helidon-cli.jar
set ARGS=

for %%x in (%*) do (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ void testCliContent() {
//Ensure main directory are present
assertThat(content, hasItems(DIST_BASE_DIR + "/bin"));
assertThat(content, hasItems(DIST_BASE_DIR + "/lib"));
assertThat(content, hasItems(DIST_BASE_DIR + "/lib/libs"));
//Ensure main files are present
assertThat(content, hasItems(DIST_BASE_DIR + "/bin/helidon"));
assertThat(content, hasItems(DIST_BASE_DIR + "/bin/helidon.bat"));
assertThat(content, hasItems(DIST_BASE_DIR + "/lib/helidon.jar"));
assertThat(content, hasItems(DIST_BASE_DIR + "/lib/helidon-cli.jar"));
assertThat(content, hasItems(DIST_BASE_DIR + "/LICENSE.txt"));
}

Expand Down

0 comments on commit 68327cb

Please sign in to comment.