lapps/lapps.github.io

Code structure guidelines

marcverhagen opened this issue · 8 comments

How is the code in general organized. What are the package dependencies, what kind of dependencies are we using (from lappsgrid? from somewhere else). When cloning a repo to a local disk, where should it be put relative to others.

This is related to issue 6 in lapps.github.io (Clean up github.com/lapps repo)

Issue #6 is just a to-do item for me to remove the odrl repositories and anything else that is not directly related to core lappsgrid. Not sure I understand your question re: code organization and package dependencies.

When cloning a repo to a local disk it can be placed anywhere.

Well, yes, I can put a repo anywhere, but there are dependencies between repos ( or maybe there are not) and being a Java nitwit I don't know how to deal with that except for fiddling with the classpath, which I find a pain in the extreme lower back. As for the organization, Kyeongmin had some question on how the structure used works in Intellij (he had little success loading code), but he will contact you off-waffle on that.

This was posted on my request, while discussing with Marc.
The reason I was confused was that many dependency packages in some POMs cannot be found on maven central repo. That's why I though it might be the case that these packages are to be locally connected.

So, I wonder if I need to add remote repo other than maven central to get dependencies by 'mvn package'

There are dependencies between Java projects, but not GitHub repositories (other than the fact the repos contain the projects). The Java dependencies are handled by Maven (see the pom.xml file in any project) and not by file system layout. Maven handles all the PITA classpath stuff.

On Jun 9, 2015, at 2:40 PM, marcverhagen notifications@github.com wrote:

Well, yes, I can put a repo anywhere, but there are dependencies between repos ( or maybe there are not) and being a Java nitwit I don't know how to deal with that except for fiddling with the classpath, which I find a pain in the extreme lower back. As for the organization, Kyeongmin had some question on how the structure used works in Intellij (he had little success loading code), but he will contact you off-waffle on that.


Reply to this email directly or view it on GitHub.


Research Associate
Department of Computer Science
Vassar College
Poughkeepsie, NY

Hi Keigh,

We haven't started deploying artifacts to Maven Central yet; that is on my to-do list.

In the meantime you will have to add the ANC's Nexus repository to your Maven settings.xml file (~/.m2/settings.xml) See https://lapps.github.io/Maven.html for the appropriate settings.

Keith

On Jun 9, 2015, at 2:41 PM, Keigh Rim notifications@github.com wrote:

This was posted on my request, while discussing with Marc.
The reason I was confused was that many dependency packages in some POMs cannot be found on maven central repo. That's why I though it might be the case that these packages are to be locally connected.

So, I wonder if I need to add remote repo other than maven central to get dependencies by 'mvn package'


Reply to this email directly or view it on GitHub.


Research Associate
Department of Computer Science
Vassar College
Poughkeepsie, NY

Okay, I think I found an answer, and another problem.

I did edit .m2/settings.xml on the day 1. What I missed was to wrap the code snippet with <repositories>... </repositories> tag. This solved the dependency issue, at least in CLI.

I took next move to intellij to see if that worked there as well, which did not.
Intellij did not seem to recognize ANC's repos stated in .m2/settings.xml.
Then I tried to put those repo information directly into POM, which successfully brought up the list of relevant repos (hooray~), but failed to index those repos, resulting in failure in getting dependencies.
To get repos to be indexed, the answer was using maven 2 (not 3) bundled in intellij.

So now it seems things are working, though I think I need to figure out what's going on with intellij not seeing repos in .m2/settings.xml.

I took me unnecessarily long time to find out that I had a syntax error in my settings.xml.
It works fine now. Closing issue