#894 Using separate javac output folder for each package
Closed: migrated 3 years ago by dmoluguw. Opened 10 years ago by edewata.

Currently all Java codes from different packages are compiled into the same output folder:

javac(<jar package>
    SOURCES
        <java package 1>/*.java
        <java package 2>/*.java
    OUTPUT_DIR
        ${CMAKE_BINARY_DIR}/classes
)

Then they are packaged into a jar file by explicitly listing the files for that package.

jar(<jar package>
    INPUT_DIR
        ${CMAKE_BINARY_DIR}/classes
    FILES
        <java package 1>/*.class
        <java package 2>/*.class
)

If the list of files is wrong, the files could be packaged into a wrong jar file, and it can be difficult to troubleshoot (e.g. class loading issue).

Ideally they should be compiled into separate folders and the list of files should be simplified to include all files:

javac(<jar package>
    SOURCES
        *.java

    OUTPUT_DIR
        ${CMAKE_BINARY_DIR}/<jar package>
)

jar(<jar package>
    INPUT_DIR
        ${CMAKE_BINARY_DIR}/<jar package>
    FILES
        *.class
)

The build folder separation has been done in ticket #2505. The remaining work is to remove the explicit list of classes to include in the JAR file.

Metadata Update from @edewata:
- Issue set to the milestone: UNTRIAGED

7 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1461

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata