-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven Publishing #25
Maven Publishing #25
Conversation
Professor, this is my attempt to publish Specimin to a local Maven repository. I must admit that I find Gradle's documentation a bit difficult to grasp, so I am not very confident about this PR. There are sections in the build file that are puzzling to me, and I've added comments to highlight those areas. As for publishing Specimin to Maven Central, I couldn't find clear instructions in Gradle's documentation (or maybe I misunderstood it). I found upon this link , which suggests that we need to first publish our project to an approved repository like Sonatype OSS Nexus. I think this step might involve several authentication processes, so I believe it might be best if you handle it. However, if you prefer, I'd be happy to give it a shot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's focus this PR on just the changes necessary to get ./gradlew publishToMavenLocal
working. You can test whether this works by running ./gradlew publishToMavenLocal
and then checking if there is a jar file for specimin in your local Maven repository, which will be located at ~/.m2/repository
.
As an example, this build file contains just what's needed for local publication.
With respect to publishing onto Maven Central: I'd like to do that, too, but it is much less urgent.
build.gradle
Outdated
url = '' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This license is incorrect: Specimin is MIT licensed (see LICENSE
at the top-level of the repository.
build.gradle
Outdated
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifactId = 'Specimin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use all lower-case for artifactId.
build.gradle
Outdated
@@ -78,3 +81,69 @@ spotless { | |||
|
|||
compileJava.dependsOn 'spotlessApply' | |||
check.dependsOn requireJavadoc | |||
|
|||
// This groupId is just for temporal use | |||
group = 'njit.edu' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be more specific than njit.edu
. Also, group names should be "reversed urls": that is, they should be in the opposite order compared to what you'd type into a web browser. (So, e.g., com.example.*
rather than example.com.*
.)
Let's use edu.njit.jerse
as the groupId for now.
build.gradle
Outdated
|
||
// This groupId is just for temporal use | ||
group = 'njit.edu' | ||
version = '1.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a version like 0.1
, since we don't intend for Specimin to be used by people outside of our research team yet.
build.gradle
Outdated
// I am not sure which id and email you would like to use | ||
id = '' | ||
name = 'Martin Kellogg' | ||
email = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use [email protected]
(this is the same email address that you can find on my website).
Professor, I have updated the build file to be able to do local maven publishing. I have tried publishing Specimin myself and there are jar files in my local maven repository. So I think we're good to go. |
Thank you for helping me remove those unused lines. |
No description provided.