Add managing jar file in RAdeployer

20 צפיות
מעבר להודעה הראשונה שלא נקראה

Thomas Collignon

לא נקראה,
11 באוג׳ 2016, 7:52:0911.8.2016
עד IronJacamar Developers
Hello,

Like I said here : https://github.com/ironjacamar/ironjacamar/issues/534, I would know if it's possible to add availability of RADeployer to managing jar files.
Indeed, I want to deal with rar files wrapped in jar file to deploy an application easily in development (jar will be in the classpath)
I have started a PR to do that : https://github.com/ironjacamar/ironjacamar/pull/535

WDYT ?

Thanks

Stefano Maestri

לא נקראה,
11 באוג׳ 2016, 8:04:3711.8.2016
עד IronJacamar Developers
Hi Thomas,

first of all, thank you very much for your interest and contribution.

Regarding your idea and PR I think it would be much better to write a specific deployer outside of IronJacamar eventually extending RaDeployer. Deploying a jar is not the same of fdeploying a rar as you perfectly know, and it's not part of JCA spec. RaDeployer should accept only rar file, and special cases (like use case related to maven you described in the issue) should be developed as custom deployer.
Few more suggestions on how you are doing this (also in your own class):
  • try to be a bit more defensive on file structure and names
  • don't forget temp file cleanup
I would be very happy to comment/help you in this implementation discussing it here in our forum even if it will be turn in a custom deployer outside IJ project.

Looking forward to go on w/ this discussion and read your code

Thanks again for your interest
S.

Thomas Collignon

לא נקראה,
11 באוג׳ 2016, 8:17:3011.8.2016
עד IronJacamar Developers
Thanks Stefano

In fact at the begginning I have made a specific deployer.

But both Deployer (my Specific et RADeployer) was trying to deploy my jar, and RADeployer failed.

How can I tell to RaDeployer to not deploy my jar? (Maybe I can make a PR to let RADeployer be more defensive to exclude jar?)

Stefano Maestri

לא נקראה,
11 באוג׳ 2016, 8:33:4411.8.2016
עד IronJacamar Developers
How is failing? Do you have a stacktrace? The accepts method in RaDeployer should accept and deploy only .rar. It should be already defensive.

regards
S.

Thomas Collignon

לא נקראה,
11 באוג׳ 2016, 8:54:5911.8.2016
עד IronJacamar Developers
My jar include .rar file. This jar is in classpath.
So RaDeployer "see" .rar file.
But when it try to deploy it, I have IO Exception because .rar is in jar file, and I get
Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
In my PR you can see on way to defend that :

if (url.toExternalForm().startsWith("jar")){

Stefano Maestri

לא נקראה,
11 באוג׳ 2016, 9:27:0911.8.2016
עד IronJacamar Developers
Well so this check should be add in accepts method and then a specific deployer should be written. 
Please add an issue describing the problem and send a PR avoiding RaDeployer to run in case rar is inside jar (using accepts method). Please work on 1.2 branch.
If you would like to contribute our project and be sure your changes will not be lost in next version you could do the same on master. Deployer here is a bit different, have a look to AbstractFungalRADeployer class

Thanks again for your contribution and feel free to get back to me if needed.

regards
S.

Thomas Collignon

לא נקראה,
11 באוג׳ 2016, 9:52:3011.8.2016
עד IronJacamar Developers
Ok I Will do that

Thanks again for taking your time to answer me

Thomas Collignon

לא נקראה,
13 באוג׳ 2016, 16:46:5413.8.2016
עד IronJacamar Developers
So I have created this issue : https://github.com/ironjacamar/ironjacamar/issues/558

In the associated PR, I have made littles modifications in order to create my custom implementation who whill extend RADeployer.

If you want I can send you my File.

Stefano Maestri

לא נקראה,
16 באוג׳ 2016, 3:51:5516.8.2016
עד IronJacamar Developers
Thanks a lot for your interest.
I've commented your PR.
For 1.2 you should open issue here https://issues.jboss.org/projects/JBJCA as ecplained in 1.2 developer guide. You can build developer guide from source or you can find it here: 

If you want send me your custom implementation in a private email, I'll be happy to review your code.

thanks again for your interest and contribution.

regards
S.
השב לכולם
השב למחבר
העבר לנמענים
0 הודעות חדשות