Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FISH-5802: exclude .gitkeep file from unpacking #5456

Closed
wants to merge 1 commit into from
Closed

FISH-5802: exclude .gitkeep file from unpacking #5456

wants to merge 1 commit into from

Conversation

rdebusscher
Copy link

Description

The file .gitkeep is not required in the unpacked runtime directory of the Payara Micro instance and its presence prevents using the CDS capabilities fully on JDK17.

Testing

Testing Performed

Testing the creation of the outputlauncher and using it to run an application.

Testing Environment

Zulu 8.52.0.23-CA-macosx (build 1.8.0_282-b08) on Mac 11.8 with Maven 3.8.2

Copy link
Member

@Pandrex247 Pandrex247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this works, wouldn't it make more sense simply to not bundle the .gitkeep file in the payara-micro.jar to begin with? It doesn't belong there anyway

@@ -142,7 +142,7 @@ private void explodeJars() throws IOException {
fileName = entry.getName().substring(LIB_DOMAIN_DIR.length());
}

if (fileName != null) {
if (fileName != null && !fileName.contains("gitkeep")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (fileName != null && !fileName.contains("gitkeep")) {
if (fileName != null && !fileName.equals(".gitkeep")) {

@rdebusscher
Copy link
Author

I tried with excluding the file when payara-micro.jar is assembled, but that breaks the packaging.

 <target name="dumpRuntime">
     <echo message="Dumping Dependencies into the runtime directory" />
    <copy todir="${runtimedir}">
        <fileset dir="${zipdir}">
            <include name="*.jar"/>
            **<exclude name=".gitkeep"/>**
        </fileset>
    </copy>
    <unzip dest="${runtimedir}">
        <fileset dir="${zipdir}">
            <include name="*.zip"/>
            <exclude name="mq**.zip"/>
            **<exclude name=".gitkeep"/>**
        </fileset>
    </unzip>
 </target>

results in

no main manifest attribute, in payara-micro.jar

@rdebusscher
Copy link
Author

Closing this as not putting the .gitkeep files in the payara-micro.jar file is a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants