[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-11-16 Thread m...@daniel-spilker.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Spilker closed an issue as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Fixed in 0.19.0.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-38920  
 
 
  JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
Change By: 
 Daniel Spilker  
 
 
Status: 
 Resolved Closed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-11-11 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-38920  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
 Code changed in jenkins User: Daniel Spilker Path: CHANGELOG.md src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPlugin.groovy src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiManifestSpec.groovy src/test/resources/org/jenkinsci/gradle/plugins/jpi/test.mf http://jenkins-ci.org/commit/gradle-jpi-plugin/65547ed4b757b1a476a198c9a5e5d9113be38b80 Log: Merge pull request #81 from daspilker/JENKINS-38920 JENKINS-38920 fixed problem with missing Plugin-Class attribute in generated manifest Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/2acb996a417f...65547ed4b757  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-11-11 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon resolved as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-38920  
 
 
  JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
Change By: 
 SCM/JIRA link daemon  
 
 
Status: 
 Open Resolved  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-11-11 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-38920  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
 Code changed in jenkins User: Daniel Spilker Path: CHANGELOG.md src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPlugin.groovy src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiManifestSpec.groovy src/test/resources/org/jenkinsci/gradle/plugins/jpi/test.mf http://jenkins-ci.org/commit/gradle-jpi-plugin/022c059aba2dd9f4322b4624e03efb696e46b071 Log: fixed problem with missing Plugin-Class attribute in generated manifest [FIXES JENKINS-38920]  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-11-09 Thread piotr.skowro...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Piotr Skowronek commented on  JENKINS-38920  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
 Daniel Spilker, the fix works for me  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-11-08 Thread piotr.skowro...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Piotr Skowronek commented on  JENKINS-38920  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
 Tomorrow I will give it a try.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-11-08 Thread m...@daniel-spilker.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Spilker commented on  JENKINS-38920  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
 PR: https://github.com/jenkinsci/gradle-jpi-plugin/pull/81 Piotr Skowronek and Brian Saville: can you test the PR?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-10-13 Thread bksavi...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Brian Saville commented on  JENKINS-38920  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
 We have run into this as well. The temporary workaround is to do something like gradlew build jpi to actually build the JPI twice to get the Plugin-Class attribute.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-10-12 Thread piotr.skowro...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Piotr Skowronek updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-38920  
 
 
  JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
Change By: 
 Piotr Skowronek  
 

  
 
 
 
 

 
 JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned.To reproduce:1. have a basic gradle project with gradle-jpi-plugin that creates some jenkins plugin2. run: ./gradlew clean (/)3. run: ./gradlew clean jpi  - the resulting hpi plugin contains "faulty" Manifest w/o Plugin-Class attribute (x)4. run: ./gradlew clean jpi  - the resulting hpi plugin contains Manifest with Plugin-Class attribute (!)(/)The problem lies in JpiPlugin.groovy#configureJpi (line with: project.afterEvaluate):{noformat} project.tasks.findByName(LifecycleBasePlugin.ASSEMBLE_TASK_NAME).dependsOn(jpi)project.afterEvaluate { <---jpi.archiveName = "${jpiExtension.shortName}.${jpiExtension.fileExtension}"jpi.extension = jpiExtension.fileExtensionjpi.manifest.attributes(attributesToMap(new JpiManifest(project).mainAttributes)) <--}{noformat}This piece runs the code that collects attributes for Manifest just after "evaluation" aka "configuration" phase, i.e. when sources are not even built yet or the folder 'classes' is old (as it originates from previous build, like in #4 - clean is done after evaluation/configuration).Of course some attributes are being acquired by scanning generated classes,  for example the problematic Plugin-Class attribute is produced only when hudson.Plugin exists and this file appears in classes folder as a result of the assemble task (created by PluginSubtypeMarker extending javax.annotation.processing.AbstractProcessor).I had to use the following workaround in my gradle file to ensure the Plugin-Class attribute is in place regardless of the state of the project:{noformat}task workaround << { project.jpi.manifest.attributes(org.jenkinsci.gradle.plugins.jpi.JpiManifest.attributesToMap(new org.jenkinsci.gradle.plugins.jpi.JpiManifest(project).mainAttributes))}project.tasks.findByName(org.jenkinsci.gradle.plugins.jpi.Jpi.TASK_NAME).dependsOn(workaround){noformat}Apparently this issue was introduced in JENKINS-31426  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
  

[JIRA] (JENKINS-38920) JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned

2016-10-12 Thread piotr.skowro...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Piotr Skowronek created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-38920  
 
 
  JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Daniel Spilker  
 
 
Components: 
 gradle-jpi-plugin  
 
 
Created: 
 2016/Oct/12 8:49 AM  
 
 
Environment: 
 Gradle version: 2.8  Gradle-jpi-plugin version: 0.18.1  JDK: java 7  OS: OSX El Capitan and Linux Ubuntu   
 
 
Priority: 
  Major  
 
 
Reporter: 
 Piotr Skowronek  
 

  
 
 
 
 

 
 JPI plugin Manifest lacks Plugin-Class attribute when Gradle project was previously cleaned. To reproduce: 1. have a basic gradle project with gradle-jpi-plugin that creates some jenkins plugin 2. run: ./gradlew clean  3. run: ./gradlew clean jpi - the resulting hpi plugin contains "faulty" Manifest w/o Plugin-Class attribute  4. run: ./gradlew clean jpi - the resulting hpi plugin contains Manifest with Plugin-Class attribute  The problem lies in JpiPlugin.groovy#configureJpi (line with: project.afterEvaluate): 

 
 project.tasks.findByName(LifecycleBasePlugin.ASSEMBLE_TASK_NAME).dependsOn(jpi)
project.afterEvaluate { <---
jpi.archiveName = "${jpiExtension.shortName}.${jpiExtension.fileExtension}"
jpi.extension = jpiExtension.fileExtension
jpi.manifest.attributes(attributesToMap(new JpiManifest(project).mainAttributes)) <--
}
 

 This piece runs the code that collects attributes for Manifest just after "evaluation" aka "configuration" phase, i.e. when sources are not even built yet or the folder