-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
plugin.properties in 3.3.x #377
Comments
We can take a look on Changelog document to see if we can identify a change (commit) which can have an impact. |
The changelog doesn't contain 3.3.1 ? |
I forgot to create a release entry for 3.3.1. It contains only a fix for a critical bug (#371). |
Can you create a test unit? I think that the correct place for this test is PropertiesPluginDescriptorFinderTest and you can use PluginJar to create the plugin jar in a dynamically mode. |
The demo application uses |
I managed to clone the repo but the run-demo.sh fails? I have no clue on how to work with Maven.
Why is it complaining about jar files? |
From log ( |
Indeed it works with java 11. Now, I tried modifying one of the JARs to add the plugin.properties file but as soon as I run the demo the JAR is overwritten. Is this expected? I guess it's something Maven is doing automatically? How can I have a demo plugin using the plugin.properties instead the manifest.mf? |
Good.
So, after running the demo for the first time (via
Now, to avoid overwriting of the plugins JAR files is enough to start demo using:
Edit each plugin JAR:
|
Thank you for the details, I feel like a newbie but I guess it's because all my projects are managed and fully automated through Gradle and I've never used Maven. I successfully followed your instructions, edited the JAR to add the plugin.properties and removed the Plugin lines in the manifest. I've tested on Mac OS X both 1.8.0_121 and 11.0.5 and it works. Under Windows 10 with Java 13.0.1 (and the exact same demo-dist that I copied) it fails as it doesn't find the plugin.properties nor the details in the manifest. Could it be a bug specifically under Windows ? I will try installing Java 13 on my Mac and re-run with it. Edit : Ok it was faster than I thought installing JDK 13. Tested with 13.0.2 on my Mac and it works. It also works on Mac with AdoptOpenJDK 14.0.1. Is there something more to do about this? I guess an automated test would be useful but it seems it would have to be ran on Windows to reveal the problem. |
@MacTrophy |
At the present I am missing time to setup a debugging environment and/or to do remote debugging for the demo. Have you been able to try it on your Window machine? Here is the complete output of the demo on Windows, there is an error but I guess its expected as the manifest doesn't contain any plugin description.
|
Something is not good in the log supplied by you.
I tested on my dev machine (Ubuntu) and everything works as expected using manifest and properties file for plugin descriptor. By default the demo uses a
If I run demo without any modification then in log you have something like:
In this scenario, it's clear that Now it's time to switch from
The next step is to add
Now, if we run the demo, then in log you have something like:
In this scenario is clear that That is all. |
@MacTrophy What is the status of this issue? Do you need more information? |
I've been over my head with other projects recently, I've locked my projects on 3.2. I will retry this as soon as I can and let you know, should be able to do this this week. Otherwise have you been able to try yourself on Windows? On Linux and MacOS X everything works properly, I only had the issues on Windows. Thank you |
@decebals I've been trying to get PF4J setup in Eclipse to try to debug the demo but I can't manage to get it working. I have really limited experience with git and no experience at all with Maven, do you have instructions on how to get the project up and running? Are you running it in Eclipse? Currently all projects have dependencies issues, most of them even fail to find the classes in org.pf4j package but the build path seems correct. I've found https://pf4j.org/dev/how-to-build.html but this page doesn't feel complete or up-to-date, is the JDK dependency really JDK 7? Even running straight in command line with "mvn" it doesn't work it fails whether I try with JDK 7, 8 and 14. My plan was to get the demo working within Eclipse on my Mac then install and debug in Eclipse on Windows but for now I can't compile the project, I'm a bit stuck. Have you had the chance to try the demo on Windows? I've tried again, on MacOS X I get results according to what you explained on 2020-05-30 but on Windows I get the result I had on 2020-05-28. I verified and my plugin doesn't have anything plugin-related in the manifest and the plugin.properties is at the root of the plugin's JAR with required config as it would work with 3.2. |
I was able to reproduce you problem on Windows.
I attached the test program (see below zip file) |
The cause of this issue is a method
Zip file is closed and as result, extensionPath (that is instance of ZipPath) is closed when it gets to Files.walkFileTree(...) in readExtensions |
@MacTrophy |
Great news the demo now works on Windows with 3.5.0-SNAPSHOT! I even tried with the old plugin files I tested 3.3 and 3.4 with the 3.5 and it works, I guess this is conclusive enough? Also, I managed to build the pf4j-3.5.0-SNAPSHOT.jar and use it my software and it works! |
Solved by #388. Thanks @valkuc for solution and @MacTrophy for reporting! |
Hi Team,
but from below logs could see connector-orchestration-plugin@2021.1.10 is starting I am not able to figure out why this is happening ..need help here .. thank you
|
@Sangeeta-Yelgod-by Is it your comment related to description of this issue. If not, please reopen a new issue. Thanks! |
Now I see that you created #466. We will move the discussion on this topic in #466. |
Has something changed between 3.2 and 3.3.1 that could have impacted the access to the
plugin.properties
at the root of JARs for the plugins? With the exact same JAR for my plugins using PF4J 3.2.0 everything works but for 3.3.0 and 3.3.1 I get lines such asin debug verbosity level for all my plugins. This in turn makes the dependencies loading fail therefore only plugins with no dependencies will work.
The text was updated successfully, but these errors were encountered: