Today we'll try to provide a (better) alternative to one cumbersome SAP standard process - deploying custom jars to SAP Sourcing.
I've always wondered who would go to such pain just to add one .jar to the classpath, when even standard Java has better options. And why?!
For example, my code breaks about 100 times before it's ready to be fully tested. That means I would need about 1 year of BASIS time just to do 100 repacks and redeploys to test a piece of code.
So, let's keep it simple:
STEP 1 - You'll obviously need a jar :smile: . Nothing better than a Hello World
STEP 2 - Copy jar file anywhere on the Sourcing server
STEP 3 - That's ALL there is. We just need to use it now, like this:
// load jar before imports - this is where BeanShell beauty comes in
this.interpreter.getClassManager().addClassPath(new File("/usr/sap/xfer/CLM/btoma/Import/Path/HelloWorld.jar").toURI().toURL());
// @bogdan.toma
import com.tnd.eso.addons.playground.HelloWorld;
HelloWorld helloWorld = new HelloWorld();
throw new ApplicationException(session, helloWorld.getWorldStatus());
>>>>> result from testing STEP 3 on a toolbar script:
Indeed the world is doomed if we have to follow that 'custom jar deployment' process.
Regards,
Bogdan Toma
Check out some other cool topics below.
-------------------------------------------------------
SAP Sourcing scripts - editing and source control maintenance
[ANN] ScriptsRepo - Deploy Tool for SAP Sourcing Scripts