0
votes

I'm having trouble importing the right stuff in Eclipse so that I can patch some classes for WSO2 Identity Server 5.0.0. With that said, what I need to do might be part of the underlying Carbon 4.2.0. In particular I want to modify stuff in Identity for working with SAML, such as org.wso2.carbon.identity.sso.saml.logout.LogoutRequestSender and other related classes.

So I used the Identity Server Build from Source instructions and was able to build patches and the IS distribution from the command-line with maven. But I'm at a loss how much or how little to import into Eclipse to do any coding work. It seems I get an overload of projects in and tons of errors. I'm totally at a loss how to work with such an explosion of interrelated projects like this.

For starters, I have exported https://svn.wso2.org/repos/wso2/carbon/platform/tags/turing-chunk11/

So I did a search from where the class that I want to start my work, LogoutRequestSender, is located. It's in a few places...

turing-chunk11/components/identity/org.wso2.carbon.identity.sso.saml/4.2.1/src/main/java/org/wso2/carbon/identity/sso/saml/logout/LogoutRequestSender.java

turing-chunk11/components/identity/org.wso2.carbon.identity.sso.saml/4.2.2/src/main/java/org/wso2/carbon/identity/sso/saml/logout/LogoutRequestSender.java

turing-chunk11/components/identity/org.wso2.carbon.identity.sso.saml/4.2.0/src/main/java/org/wso2/carbon/identity/sso/saml/logout/LogoutRequestSender.java

So, do I really only want to import into eclipse this guy? turing-chunk11/components/identity/org.wso2.carbon.identity.sso.saml/4.2.0

Not sure why all these versions are under this chunk. So confusing!

Would someone be willing to explain how I can get up and running and make better sense of this? I would love to contribute! (and fix some things ahead of the release schedule!)

Along with that, if I get that part right, how do I build and set the right things so that IS takes it as a patch?

1

1 Answers

1
votes

The source repository contains multiple versions of the same component shipped with different versions of the product. So you have to identify the correct version of the required components that corresponds to IS 5.0.0 distribution.

The easiest way is to look at your IS pack - <IS>/repository/components/plugins where the binaries of these osgi components are located. If you search for 'org.wso2.carbon.identity.sso.saml' in that directory you'll find org.wso2.carbon.identity.sso.saml_4.2.3.jar, so you now have the version 4.2.3. Do this for each component since those are versioned independently.

With minor modifications to the pom file (removing relative path and adding the wso2 mvn repo), you'll be able to build these components separately, and patch the IS. Note that, to apply a patched jar, create a directory named patch0xyz (xyz should be numbers) under repository/components/patches and place your patched jar there.