<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2/23/19 12:59 PM, o haya wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:151105984.4120471.1550944797852@mail.yahoo.com">
      <pre class="moz-quote-pre" wrap="">Hi,

I am trying to migrate the application that I had written (a modified version of SAMLWriter.java) earlier using OpenSAML 2.6.6, now, to OpenSAML 3.3.0 using Eclipse and Maven.</pre>
    </blockquote>
    <p><br>
    </p>
    <p>Well, as I said before you don't have to use Maven, nor Eclipse. 
      Use what you are comfortable with.<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:151105984.4120471.1550944797852@mail.yahoo.com">
      <pre class="moz-quote-pre" wrap="">

I am not that familiar with Maven, but anyway, I added dependencies in the pom.xml:</pre>
    </blockquote>
    <p><br>
    </p>
    <p>The use of dependencyManagement is a little overkill for a single
      project like this, but it's not wrong. I don't see any other
      obvious problems.<br>
    </p>
    <br>
    <blockquote type="cite"
      cite="mid:151105984.4120471.1550944797852@mail.yahoo.com">
      <pre class="moz-quote-pre" wrap="">
But, when I do Run As ==> Maven Build ==> clean install -U, I am getting some errors that I haven't been able to resolve so far:

- Configuration cannot be resolved

- IdentifierGenerator cannot be resolved to a type

- SecureRandomIdentifierGenerator cannot be resolved to a type

- SecurityConfiguration cannot be resolved to a type

- SecurityHelper cannot be resolved

- The constructor BasicX509Credential() is undefined

- XMLHelper cannot be resolved
</pre>
    </blockquote>
    <p><br>
    </p>
    <p>3.x is not 2.x.  At the very least all the package names changed,
      so any existing 'import' statements are wrong.  In many cases the
      code itself was refactored or rewritten, so classes and methods
      don't exist anymore, or have different names, or
      method/constructor arguments are different, etc.</p>
    <p>Some of the "cannot be resolved" ones are likely simply package
      changes.  Some of those classes don't exist anymore however, like
      XMLHelper, SecurityHelper, they were replaced by other things.<br>
    </p>
    <p>The Javadocs are your friend:</p>
    <p><a class="moz-txt-link-freetext" href="https://wiki.shibboleth.net/confluence/display/OS30/APIDocumentation">https://wiki.shibboleth.net/confluence/display/OS30/APIDocumentation</a><br>
    </p>
    <p>For usage examples, the best thing is to look at the unit tests
      in the various projects.<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:151105984.4120471.1550944797852@mail.yahoo.com">
      <pre class="moz-quote-pre" wrap="">


For the BasicX509Credential() error, this is the line that it is flagging in my code:

                                   BasicX509Credential credential = new BasicX509Credential();</pre>
    </blockquote>
    <p><br>
    </p>
    <p>IIRC there is no longer a no-arg ctor for that class.  It takes a
      mandatory X509Certificate and optional PrivateKey.  That's a good
      example of the kind of things that changed.<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:151105984.4120471.1550944797852@mail.yahoo.com">
      <pre class="moz-quote-pre" wrap="">



As I said, I am not that familiar with Maven, so I am not sure if I need to add some other dependencies in the pom, or do I need to modify code that uses those types that are getting the errors?</pre>
    </blockquote>
    <p><br>
    </p>
    <p>Yes, definitely many types have been added/removed/modified, so
      the corresponding 2.x code definitely must change.</p>
    <p>Wrt dependencies, you definitely need java-support from our
      projects, although if you're using Maven that will be resolved as
      a transitive dependency, as will all the other deps.  If not using
      Maven then you'd have to manually include all the right jars in
      your project.<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:151105984.4120471.1550944797852@mail.yahoo.com">
      <pre class="moz-quote-pre" wrap="">


Also, as I said I have the dependencies configured for opensaml version 3.3.0, but is there not a 3.4.2 in Maven?

</pre>
    </blockquote>
    <p><br>
    </p>
    <p>Yes, 3.4.2 is the latest.<br>
    </p>
    <p><br>
    </p>
    <br>
  </body>
</html>