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

add log4j 1.2.17 metadata #369

Merged
merged 6 commits into from
Sep 12, 2023
Merged

add log4j 1.2.17 metadata #369

merged 6 commits into from
Sep 12, 2023

Conversation

FoghostCn
Copy link
Contributor

@FoghostCn FoghostCn commented Aug 16, 2023

What does this PR do?

add metadata for log4j 1.2.17

Checklist before merging

@FoghostCn FoghostCn requested a review from a team as a code owner August 16, 2023 12:03
@FoghostCn FoghostCn requested a review from msupic August 16, 2023 12:03
@FoghostCn FoghostCn requested a review from msupic September 8, 2023 13:32
@FoghostCn FoghostCn force-pushed the master branch 2 times, most recently from 77e173d to 341af5b Compare September 11, 2023 05:17
assert log file content
@msupic
Copy link
Contributor

msupic commented Sep 11, 2023

@FoghostCn - tests are failing. It looks like that some metadata are missing:

JUnit Jupiter:Log4jTest:consoleInfoLoggerProperties()
    MethodSource [className = 'log4j.log4j.Log4jTest', methodName = 'consoleInfoLoggerProperties', methodParameterTypes = '']
    => java.lang.NoClassDefFoundError: Could not initialize class org.apache.log4j.LogManager
       org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
       log4j.log4j.Log4jTest.consoleInfoLoggerProperties(Log4jTest.java:52)

@FoghostCn
Copy link
Contributor Author

I have regenerate a reflect-config.json file,it should be right

@msupic
Copy link
Contributor

msupic commented Sep 11, 2023

@FoghostCn - Tests are still failing. You can reproduce the issue locally by executing
./gradlew test -Pcoordinates=log4j:log4j:1.2.17

@FoghostCn
Copy link
Contributor Author

FoghostCn commented Sep 11, 2023

Thank you so much,I've run successed locally

@msupic
Copy link
Contributor

msupic commented Sep 11, 2023

Resource metadata for log4j.xml and log4j.dtd already exists here: metadata/log4j/log4j/1.2.17/resource-config.json, so you can just add the following entry to the same file instead of creating new resource-config.json file that is used only in tests

      {
        "condition": {
          "typeReachable": "org.apache.log4j.helpers.Loader"
        },
        "pattern": "\\Qlog4j.properties\\E"
      }

@FoghostCn
Copy link
Contributor Author

Resource metadata for log4j.xml and log4j.dtd already exists here: metadata/log4j/log4j/1.2.17/resource-config.json, so you can just add the following entry to the same file instead of creating new resource-config.json file that is used only in tests

      {
        "condition": {
          "typeReachable": "org.apache.log4j.helpers.Loader"
        },
        "pattern": "\\Qlog4j.properties\\E"
      }

done

@msupic msupic merged commit 65aa0e0 into oracle:master Sep 12, 2023
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