It's all about the answers!

Ask a question

How do I get an IBM i build definition to push java class files?


Christian Aasland (14) | asked Mar 02 '22, 6:05 p.m.
edited Mar 04 '22, 9:27 a.m.
I've got an IBM i project which is mostly c/c++, some CL, and a few Java classes.

The IBM i build definition properly sends all the files in QSYS but it isn't sending any of the java classes which are in IFS. How can I get the build to push the java classes?

The java classes are in the repository workspace. The remote reconciler has the 'Push on build' box checked.

Comments
Ralph Schoon commented Mar 04 '22, 9:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't know how the IBM i stuff  works. I do not know what the extension of the "Java classes" is. I don't know how the reconciler works either. The Jazz SCM system has the .jazzignore files where you can exclude files from being version controlled. In addition Eclipse has settings which files to handle as source and which to handle as binary that are ignored in SCM.


Christian Aasland commented Mar 09 '22, 2:41 p.m.
Hi Ralph, I can't find anyone who knows how the IBM i stuff works either, so we have that in common.
The Java source files (.java) exist in the sandbox, workspace and the stream.
The "remote reconciler" is how RDi associates an IFS directory with where the classes (.class) is sent. In the RDi reconciler I can trigger a manual 'push' to that directory - which pushes both the .java and .class to the IFS.
It appears that this might be an RDi-only operation, as I don't see a way to tell the build definition where the java classes should go.

Ralph Schoon commented Mar 10 '22, 3:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Very sorry that I can't really help here. 

Files with extension .java should be considered as versionable files by EWM. If they sit in an EWM workspace/sandbox they should be available to check into change sets and then it should be possible to deliver them. I am not sure how that maps to the IBM I stuff, I am afraid. 

One answer



permanent link
jeff tickner (51710) | answered Mar 14 '22, 6:34 p.m.

 Christian I answered your other version of this question about 'IFS files' but you didn't say in that one you were talking about java. You also haven't specified what Build style you are using since there are more than one or specifying what version of RTC which dictates what Build styles you have available.


As I said in your other question you can define your own types based on extensions BUT if you do that with .java you don't get the java built into classes. The IBM i builds are specifically to manage source that lives in sourcefiles and my other answer was a hack for config files like PCML.

Save yourself a LOT of time and just manage your java files in a java project and do a normal RTC java build with the target the IFS, stop trying to use the IBM i build to do something it's not supposed to do just because the build results happen to live on the IBM i in the IFS. yes it will be a different build then your native IBM i stuff but it will be a big effort to manage them in the IBM i build and it probably won't work that well anyway. You might be able to get it to work with a very simple java app but anything complex with lots of dependencies will probably fall down.


Comments
Christian Aasland commented Mar 14 '22, 6:58 p.m.
We use the 'Command' build style - i.e. push all the source files and then we call a program to build it. That packages up our product (including creating the jar files from the .class files) and places it with everything else we need to distribute it.

In the other issue I took a slightly different tack - if I can just get the Java source to the IBM i, then I could use PASE to build the .class files.

Your statement:
stop trying to use the IBM i build to do something it's not supposed to do
is helpful because it confirms what I've been suspecting but haven't found explicitly stated in any of the documentation. If we can't make it work then we might move off EWM/RDi and find something else.


Christian Aasland commented Mar 14 '22, 7:10 p.m.
As a bit of background ... our current build process requires someone to go into remote reconciler and manually push the generated .class files to the IBM i, then they can request a build for the rest of the product.

For various reasons we've had a distro go out with missing or downlevel Java parts because the manual steps to push the java wasn't done, so we're trying to create a distro build process that will rely less on manual human steps - and ideally can be built without someone needing to get into RDi (like from the Jazz 'request build' page).

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.