Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Document how to add dependency jars for Java Microprofile stack #181

Open
mtamboli opened this issue Nov 4, 2019 · 16 comments
Open

Document how to add dependency jars for Java Microprofile stack #181

mtamboli opened this issue Nov 4, 2019 · 16 comments
Assignees

Comments

@mtamboli
Copy link

mtamboli commented Nov 4, 2019

For Liberty applications which are referencing DB2 jars in server.xml file, there is no easy way to copy those files to container image. There is a way to do this by updating generated application pom file. This can be time consuming to figure out so best to document.

I can certainly see this going into Java MicroProfile guide but not sure if other docs can use it too.

<dependency>
     <groupId>com.microsoft.sqlserver</groupId>
     <artifactId>mssql-jdbc</artifactId>
     <version>6.4.0.jre8</version>
    </dependency>      
...

     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-dependency-plugin</artifactId>
      <version>3.0.1</version>
      <executions>
          <execution>
              <id>copy-resource</id>
              <phase>package</phase>
              <goals>
                  <goal>copy-dependencies</goal>
              </goals>
              <configuration>
               <stripVersion>true</stripVersion>
               <outputDirectory>/project/user-app/target/liberty/wlp/usr/servers/defaultServer/resources/sqljars/</outputDirectory>
               <includeArtifactIds>mssql-jdbc</includeArtifactIds>
              </configuration>
          </execution>
      </executions>
     </plugin>             
@marikaj123
Copy link
Member

It is related to Service binding worked by Arthur and Kyle.

@gecock
Copy link

gecock commented Nov 8, 2019

For this issue we simply wanted to get an example of how to do this kind of thing out there as an example for people who are trying this out.

There is a larger design discussion to be had around making this easier, which should be contained in kabanero-io/collections#160

@kilnerm
Copy link

kilnerm commented Nov 11, 2019

If this is covering how to do this today using maven dependencies then the documentation should be requested from the owner of the java-microprofile Appsody stack.

@mtamboli
Copy link
Author

I think this should be assigned to YK Chang.

@gecock
Copy link

gecock commented Nov 11, 2019

@yeekangc ^^

@marikaj123 marikaj123 assigned kilnerm and unassigned kilnerm Nov 13, 2019
@kilnerm kilnerm removed their assignment Nov 13, 2019
@kilnerm
Copy link

kilnerm commented Nov 13, 2019

@marikaj123 This is not a collections issue so I have removed myself as owner. This needs assigning to the team who own the java-microprofile stack, I believe, as was noted in the previous two comments, that YK Chang (@yeekangc) is a good starting point.

@yeekangc
Copy link

I see at least 2 parts to this:

  1. Document the how today i.e. what has been done. Perhaps @mtamboli and team can help working with the right Docs person (in a guide or whatever appropriate).

  2. Longer term answer on how all these should fit together from the container image up to the template, the stack and the collection. I can see gaps to close and integration issues to work out and may relate to the Service Binding work mentioned above. Can file an issue under Appsody stack repo for this.

FYI, @scottkurz.

@marikaj123
Copy link
Member

@yeekangc - any idea who need to work on this issue beside an ID person?

@yeekangc
Copy link

yeekangc commented Nov 27, 2019

If this needs to be documented now, my suggestion is to update what is needed based on what @mtamboli has worked out.

Going forward, at least for the Liberty/MicroProfile stack, this shall be part of the answer to appsody/stacks#521. When appsody/stacks#521 is resolved, the stack can have documentation that Kabanero documentation can then reference or source from. If this is to be defined by the stack, the source of information shouldn't be captured within Kabanero but by the stack and be taken from there (under Appsody or the stack itself).

As Greg noted, there are broader questions to be answered like what is noted in kabanero-io/collections#160 or from a Service Binding standpoint that is beyond the scope of a stack too.

@Charlotte-Holt
Copy link
Member

@yeekangc @kilnerm Does this need to be updated in the Eclipse MP guide (https://kabanero.io/guides/collection-microprofile/)?

@yeekangc
Copy link

I believe so. @mtamboli, do you have an opinion?

@mtamboli
Copy link
Author

Yes, It would be helpful to document in the guide on how someone will get their database drivers added to the docker image. @nastacio do you think we can link to your guide from Java - MP guide for further details?

@nastacio
Copy link
Contributor

I think that part of the tutorial needs no be formalized by stack owner first. If that workaround is indeed the design we want, then it would be moved to the guide.

@yeekangc
Copy link

I will defer the call to update the documentation/tutorial/guide now or later to the Kabanero team or the respective owner(s). We do have an item in the backlog to look at this for the java-microprofile/openliberty stack and work out the strategic answer. No ETA for that yet but I don't expect it to come tomorrow. The respective team(s) can consider what is appropriate in the mean time. What works today is what there is at the moment.

FYI, @scottkurz.

@scottkurz
Copy link

Latest discussion here.

@marikaj123
Copy link
Member

According to Scott: Ann R. was notified via an email to help the team to put in place the "big picture" plan and the request is in her good hands.
As the big picture gets clear, then we could make decisions about smaller items like should this feature be updated in the java-microprofile stack, java-openliberty stack, or both.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants