OHDSI Home | Forums | Wiki | Github

SqlRender source/javadoc artifacts to repository?

@lee_evans @schuemie, Is the CI server building/deploying SqlRender? If so, can we have the source jar also deployed.
To do so, we need to add maven source plugin (javadoc is an option as well). Thanks.

http://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html

I don’t believe it currently is unless someone else set this up. I loaded a version (now out of date) of the SqlRender library when we first launched the repository, but before jenkins was available.

@Frank is correct.

We could set up additional build jobs on the Jenkins CI server. Currently we only have Cyclops and WebAPI builds setup.

I’m busy at the moment working on the new vocab v5 download website but I’ll add the following to my future to-do list:

  1. deploy maven source/javadoc plugins on the OHDSI CI server
  2. setup CI server build jobs for
  • SqlRender
  • Hermes
  • Circe
  • Heracles

BTW The latest webapi jar is always available in the ohdsi nexus snapshots here:
http://repo.ohdsi.org:8085/nexus/#view-repositories;releases~browseindex

I guess SqlRender should have a Maven POM file, which is now the OHDSI standard.

I have zero experience with Maven (I’m still trying to learn ANT after a life-long use of JarDesc only).

Any help would be greatly appreciated.

Looks like the java-src folder doesn’t contain any third-party dependencies, so the compiling/packaging into a jar file seems pretty straight forward, unless I’m missing something. Is there any more to building the java artifacts? Did you envision maven support doing more (e.g. something with R)?

Nope. Just building the Java would be fine. I would think the most important thing is that the CSV file gets included in the JAR.

What CSV file?

FYI, I have submitted a pull request for you to review. mvn clean package will creater binary jar, source jar, & javadoc jar. See pull request for additional detail. Let me know if you have any questions. Once merged, we can get @lee_evans to create a jenkins job to push this to snapshots repo.

I’ve now created the jenkins job.

Thanks Lee, from a quick glance at nexus, it looks good.

@alfranke the maven source and javadoc plugins are deployed on the Jenkins CI server so the SqlRender sources.jar and javadoc.jar are also pushed to the OHDSI Nexus snapshots repo by the SqlRender Jenkins build.

Feel free to update the WebAPI pom.xml to add the maven source and javadoc plugins, if you want source and javadoc jars deployed for WebAPI too.

Great work guys!

I’m very new to Maven, so forgive my ignorance. Do we now add links to Nexus and/or Jenkins from the SqlRender GitHub repository? Some mention in the Readme file?

Here’s something you could add to the readme.

#Getting Started

  1. First add the SqlRender repository so that maven can find and download the SqlRender artifact automatically:
<repositories>
	<repository>
		<id>ohdsi</id>
		<name>repo.ohdsi.org</name>
		<url>http://repo.ohdsi.org:8085/nexus/content/repositories/releases</url>
	</repository>
	<repository>
		<id>ohdsi.snapshots</id>
		<name>repo.ohdsi.org-snapshots</name>
		<url>http://repo.ohdsi.org:8085/nexus/content/repositories/snapshots</url>
		<releases>
			<enabled>false</enabled>
		</releases>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
</repositories>

2: Include the SqlRender dependency in your pom.xml

<dependency>
	<groupId>org.ohdsi.sql</groupId>
	<artifactId>SqlRender</artifactId>
	<version>1.0.0-SNAPSHOT</version>
</dependency>

Done

t