Skip to content
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

Problems building locally #9

Closed
emacdona opened this issue Oct 7, 2014 · 2 comments
Closed

Problems building locally #9

emacdona opened this issue Oct 7, 2014 · 2 comments

Comments

@emacdona
Copy link
Contributor

emacdona commented Oct 7, 2014

I cloned this repo and attempted to build locally (wanted to see if this issue had been resolved: #7 -- please add that feature, btw ;-) ).

I had two problems:

  1. The pom generation in gradle/publish.gradle was creating a bad pom. For some reason, the nested "license" element under "licenses" was being ignored, but its children weren't (I can't explain it)
    I was ending up with a pom that looked like this when attempting to publish to my local maven repo:
    <licenses>
    <name>The Apache Software License, Version 2.0</name>
    <url>http://www.apache.org/licenses/LICENSE-2.0.txt&lt;/url>
    <distribution>repo</distribution>
    </licenses>
  2. There was no "org.kordamp.gradle.markdown.properties" file in the META-INF/gradle-plugins directory of the jar. So once I got past the first problem, I kept getting errors telling me that there was no plugin with such and such id.

Here's a patch with my changes if it helps. The fix to (1) is an ugly hack. If you can't repro locally but are still curious -- please feel free to ask me questions like "What version of <x> are you using".

  From d7f3cc49a2bb3577a989425b60bf993fa2898fe8 Mon Sep 17 00:00:00 2001
  From: Ed MacDonald <[email protected]>
  Date: Tue, 7 Oct 2014 00:23:24 -0400
  Subject: [PATCH] Had to add empty attributes to license xml element or it
   would NOT be included (no idea why). Added property file so that this plugin
   could have an id.

  ---
   gradle/publish.gradle                                                 | 4 ++--
   .../META-INF/gradle-plugins/org.kordamp.gradle.markdown.properties    | 1 +
   2 files changed, 3 insertions(+), 2 deletions(-)
   create mode 100644 src/main/resources/META-INF/gradle-plugins/org.kordamp.gradle.markdown.properties

  diff --git a/gradle/publish.gradle b/gradle/publish.gradle
  index dc3494a..08ed76b 100644
  --- a/gradle/publish.gradle
  +++ b/gradle/publish.gradle
  @@ -48,7 +48,7 @@ def pomConfig = {
       url 'https://github.com/aalmiray/markdown-gradle-plugin'
       inceptionYear '2013'
       licenses {
  -        license {
  +        license("") {
               name 'The Apache Software License, Version 2.0'
               url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
               distribution 'repo'
  @@ -103,4 +103,4 @@ bintray {
           licenses = ['Apache-2.0']
           labels = ['gradle', 'plugin', 'markdown']
       }
  -}
  \ No newline at end of file
  +}
  diff --git a/src/main/resources/META-INF/gradle-plugins/org.kordamp.gradle.markdown.properties b/src/main/resources/META-INF/gradle-plugins/org.kordamp.gradle.markdown.properties
  new file mode 100644
  index 0000000..9ff59db
  --- /dev/null
  +++ b/src/main/resources/META-INF/gradle-plugins/org.kordamp.gradle.markdown.properties
  @@ -0,0 +1 @@
  +implementation-class=org.kordamp.gradle.markdown.MarkdownPlugin
  --
  1.9.3 (Apple Git-50)
@emacdona
Copy link
Contributor Author

I submitted a pull request to address the "org.kordamp.gradle.markdown.properties" problem. The same pull request initially addressed the license generation in the pom too, however I backed that change out because there is an existing pull request that addresses the problem.

@aalmiray
Copy link
Collaborator

Fixed by #10 and #15

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

No branches or pull requests

2 participants