Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.
This repository was archived by the owner on May 23, 2025. It is now read-only.

Directory entries are not included in the generated jar file #52

Description

@TheImplementer

It looks like jar files generated using the groovy_library rule, unlike the ones generated with the java_library one, don't contain directory entries.

For instance, given a java class Test.class under the com.example package, the resulting jar file would contain the following entries (excluding the META-INF directory):

  • com/
  • com/example/
  • com/example/Test.class

At runtime, the following code will then work as expected, returning a URL to the jar file:

ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
URL url = systemClassLoader.getResource("com/example");

The same does not work (the URL returned is null) with a jar generated with the groovy_library rule because the only entry in it is: com/example/Test.class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions