@DataBoundSetter
I'm trying to use filed-based databinding : public class MyBuildWrapper extends BuildWrapper { @DataBoundSetter public String data; // no constructor I receive this error : Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class com.MyBuildWrapper at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:177) Running 1.568 Does this actually work ? I can't find any plugin to rely on this (recently introduced) pattern -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: @DataBoundSetter
Hi Nicolas, On 02/09/14 14:09, nicolas de loof wrote: I'm trying to use filed-based databinding : public class MyBuildWrapper extends BuildWrapper { @DataBoundSetter public String data; // no constructor I receive this error : Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class com.MyBuildWrapper at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:177) I haven't looked at the Jenkins source, but as the error message suggests, it seems that you still need to have a constructor with the @DataBoundConstructor, even if that constructor is empty. With that, @DataBoundSetter works well for me: https://github.com/orrc/google-play-android-publisher-plugin/blob/a80c656/src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkPublisher.java#L67-L82 Does this actually work ? I can't find any plugin to rely on this (recently introduced) pattern There seems to be a couple of examples out there: https://github.com/search?q=user%3Ajenkinsci+databoundsettertype=Code Regards, Chris -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: @DataBoundSetter
thanks If a @DataBoundConstructor is required then this new annotation only offer half the benefit I expected :'( I also wonder why the name, not just @DataBound. Time for a pull-request :) 2014-09-02 14:20 GMT+02:00 Christopher Orr ch...@orr.me.uk: Hi Nicolas, On 02/09/14 14:09, nicolas de loof wrote: I'm trying to use filed-based databinding : public class MyBuildWrapper extends BuildWrapper { @DataBoundSetter public String data; // no constructor I receive this error : Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class com.MyBuildWrapper at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames( ClassDescriptor.java:177) I haven't looked at the Jenkins source, but as the error message suggests, it seems that you still need to have a constructor with the @DataBoundConstructor, even if that constructor is empty. With that, @DataBoundSetter works well for me: https://github.com/orrc/google-play-android-publisher- plugin/blob/a80c656/src/main/java/org/jenkinsci/plugins/ googleplayandroidpublisher/ApkPublisher.java#L67-L82 Does this actually work ? I can't find any plugin to rely on this (recently introduced) pattern There seems to be a couple of examples out there: https://github.com/search?q=user%3Ajenkinsci+databoundsettertype=Code Regards, Chris -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Acceptance-test-harness questions
At Sony Mobile, we are planning on using the acceptance-test-harness to automate all (or most) of the manual tests we run everytime we upgrade our Jenkins core. We noticed that there are 2200 commits but only 13 pull requests on the git. What is the wanted process for adding tests to the git? Should we do pull requests or simply merge in our tests? We also noticed that the tests are run for every new release, but that alot of the tests fail or are skipped. Do we know why this happens? It could be hard to notice new failures since so many tests already fail or are skipped. Tomas Westling Sony Mobile Communications -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: @DataBoundSetter
On Tue, Sep 2, 2014 at 8:38 AM, nicolas de loof nicolas.del...@gmail.com wrote: If a @DataBoundConstructor is required then this new annotation only offer half the benefit I expected What is the problem? The @DBC can still be used for a couple mandatory fields. By having an empty one you clearly indicate that all fields are optional. I also wonder why the name, not just @DataBound. Well if the constructor annotation were @DataBound to begin with, then it would make sense to just expand its target types. Since it is not, it is more consistent to name it according to what it is. (Yes you can use @DBS on a field, but this is poor style, since you then lose control over data migration if someone in another plugin accesses your field directly. Prefer to use it on a setter method, with a matching getter method that need not be annotated.) -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Acceptance-test-harness questions
On Tue, Sep 2, 2014 at 10:03 AM, Tomas Westling tomas.westl...@sonymobile.com wrote: What is the wanted process for adding tests to the git? Should we do pull requests or simply merge in our tests? As a rule: do PRs, and if at some point the people merging the PRs just rubber-stamp them and suggest you commit directly, go ahead. We also noticed that the tests are run for every new release, but that alot of the tests fail or are skipped. Do we know why this happens? Because we need someone like you to pay attention to the failures, diagnose them, and either fix the code (if it is genuinely broken), fix the test (in the more likely case it is just poorly written), or mark the test to be skipped, e.g., with @Ignore (if there is no clear way to get it running). -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Intellij Developer License Renewal
Yes, I've sent a new request in the end of July, but haven't heard back. I just sent an e-mail to them to clarify for the status, so let's see. On Monday, August 4, 2014 2:16:31 AM UTC-7, Stefan Wolf wrote: Hi, the Intellij License for the Jenkins project expired. Is the renewal already under way? Best regards, Stefan -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: @DataBoundSetter
2014-09-02 18:11 GMT+02:00 Jesse Glick jgl...@cloudbees.com: On Tue, Sep 2, 2014 at 8:38 AM, nicolas de loof nicolas.del...@gmail.com wrote: If a @DataBoundConstructor is required then this new annotation only offer half the benefit I expected What is the problem? The @DBC can still be used for a couple mandatory fields. By having an empty one you clearly indicate that all fields are optional. I never considered this to be a way to declare optional attributes, just expected @DataBoundSetter to be an alternative to @DataBoundConstructor (fully removing it) just like @Inject filed injection in a CDI context. I also wonder why the name, not just @DataBound. Well if the constructor annotation were @DataBound to begin with, then it would make sense to just expand its target types. Since it is not, it is more consistent to name it according to what it is. @DataBoundSetter applies to fields, so the confusion. a more global @DataBound to match them all would be a more generic mechanism (Yes you can use @DBS on a field, but this is poor style, since you then lose control over data migration if someone in another plugin accesses your field directly. Prefer to use it on a setter method, with a matching getter method that need not be annotated.) Question of style. I prefer to avoid setters to reduce code verbosity. Or Lombock style programming -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Problem with releasing new version of old plugin (RubyMetrics)
Hi guys, I have an issue releasing new version of a plugin rubyMetrics. All seems to be OK when I run mvn release:prepare release:perform, but the plugin was not shown in update center even when I waited the whole weekend. So I release another version 1.6.1 with some changes to grab the output from Maven (attached to this message). Can you help me debug the problem? Regards Piotr -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. rubyMetrics.log Description: Binary data
Re: Problem with releasing new version of old plugin (RubyMetrics)
Hi, you hit a common issue, see [1] Vincent [1] https://groups.google.com/forum/#!searchin/jenkinsci-dev/how$20to$20release$20plugin/jenkinsci-dev/XldX7ONGFDw/75gWMyaeayMJ 2014-09-02 18:47 GMT+02:00 Piotr Kuczynski piotr.kuczyn...@gmail.com: Hi guys, I have an issue releasing new version of a plugin rubyMetrics. All seems to be OK when I run mvn release:prepare release:perform, but the plugin was not shown in update center even when I waited the whole weekend. So I release another version 1.6.1 with some changes to grab the output from Maven (attached to this message). Can you help me debug the problem? Regards Piotr -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Problem with releasing new version of old plugin (RubyMetrics)
Sounds like https://groups.google.com/d/msg/jenkinsci-dev/qkmbl3HrYgk/TBdhCTUGZgEJ -- oliver -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: @DataBoundSetter
On Tue, Sep 2, 2014 at 12:44 PM, nicolas de loof nicolas.del...@gmail.com wrote: expected @DataBoundSetter to be an alternative to @DataBoundConstructor (fully removing it) Sorry, that is not how it is. @DataBoundSetter applies to fields, so the confusion. As mentioned, it is best applied to setters, but as a convenience can also be used on fields. I prefer to avoid setters to reduce code verbosity. Sure, it is less verbose, but you are in trouble if you ever need to refactor things and someone else had started to refer to your fields directly. (You can escape using @AdaptField, but better to not put yourself in this situation to begin with.) -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: @DataBoundSetter
What I'd like, for simplest component, is to only have to write : @Described(display name) public class Foo extends ... { @DataBound public String data; } maybe could be implemented with some Lombok custom code processor 2014-09-02 18:44 GMT+02:00 nicolas de loof nicolas.del...@gmail.com: 2014-09-02 18:11 GMT+02:00 Jesse Glick jgl...@cloudbees.com: On Tue, Sep 2, 2014 at 8:38 AM, nicolas de loof nicolas.del...@gmail.com wrote: If a @DataBoundConstructor is required then this new annotation only offer half the benefit I expected What is the problem? The @DBC can still be used for a couple mandatory fields. By having an empty one you clearly indicate that all fields are optional. I never considered this to be a way to declare optional attributes, just expected @DataBoundSetter to be an alternative to @DataBoundConstructor (fully removing it) just like @Inject filed injection in a CDI context. I also wonder why the name, not just @DataBound. Well if the constructor annotation were @DataBound to begin with, then it would make sense to just expand its target types. Since it is not, it is more consistent to name it according to what it is. @DataBoundSetter applies to fields, so the confusion. a more global @DataBound to match them all would be a more generic mechanism (Yes you can use @DBS on a field, but this is poor style, since you then lose control over data migration if someone in another plugin accesses your field directly. Prefer to use it on a setter method, with a matching getter method that need not be annotated.) Question of style. I prefer to avoid setters to reduce code verbosity. Or Lombock style programming -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Acceptance-test-harness questions
Currently all tests that require docker are automatically skipped due to a limitation of our execution environment. Am 02.09.2014 um 18:16 schrieb Jesse Glick jgl...@cloudbees.com: On Tue, Sep 2, 2014 at 10:03 AM, Tomas Westling tomas.westl...@sonymobile.com wrote: What is the wanted process for adding tests to the git? Should we do pull requests or simply merge in our tests? As a rule: do PRs, and if at some point the people merging the PRs just rubber-stamp them and suggest you commit directly, go ahead. We also noticed that the tests are run for every new release, but that alot of the tests fail or are skipped. Do we know why this happens? Because we need someone like you to pay attention to the failures, diagnose them, and either fix the code (if it is genuinely broken), fix the test (in the more likely case it is just poorly written), or mark the test to be skipped, e.g., with @Ignore (if there is no clear way to get it running). -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. signature.asc Description: Message signed with OpenPGP using GPGMail
Re: How to release plugin when using git 1.8.5.2
After upgrading my pom.xml with: parent groupIdorg.jenkins-ci.plugins/groupId artifactIdplugin/artifactId version1.576/version /parent I can again use mvn release:prepare release:perform without any hacks :) Regards Piotr On Tuesday, June 17, 2014 5:16:26 PM UTC+2, Marco Miller wrote: Good idea Ulli! = done; here is the change, fyi: https://wiki.jenkins-ci.org/pages/diffpages.action?pageId=18612226originalId=72778548 2014-06-17 3:16 GMT-04:00 Ulli Hafner ullrich...@gmail.com javascript: : Thanks for sharing! Can you please paste this recipe into the wiki dev page? Am 16.06.2014 um 22:32 schrieb Marco Miller miller...@me.com javascript:: Just thought I could share this not-so-new info, in case anybody struggles with this like I just did..: 1. assuming you're using a version of git around 1.8.5.2 (the one I use) 2. I use maven 3.1.1, but that is just FYI 3. you'll need to force maven-release-plugin 2.5, as per later below 4. (otherwise your release will fail committing the non-SNAPSHOT) 5. make sure your git origin is your actual plugin repo to release ( jenkinsci/pluginToRelease) 6. if your jenkins-ci and github accounts' credentials differ, have this in your maven settings.xml: servers server idmaven.jenkins-ci.org/id usernameyourJenkinsCIuser/username passwordyourJenkinsCIpwd/password /server /servers 7. cd to your plugin git repo to release 8. mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare 9. then, if all looks fairly ok, 10. mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform 11. (you can combine the above commands into one, say, next time you release..) 12. I had to also do a git push, even though that looked more like a no-op (but then git status disagreed) 13. so, the above allowed me to make release 1.9 of github.com/jenkinsci/description-setter-plugin (e.g.) 14. references I used to come up with the above: 1. groups.google.com/forum/#!topic/jenkinsci-dev/qkmbl3HrYgk 2. jenkins-ci. 361315.n4.nabble.com/Unable-to-deploy-plugin-to-repo-tc3093159.html#a3093270 3. wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-PreparePOMforrelease -The last ref above (3.) is of particular importance; you need to follow it.. /Marco -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: mvn release does not work, only publishes SNAPSHOT releases
After upgrading my pom.xml with: parent groupIdorg.jenkins-ci.plugins/groupId artifactIdplugin/artifactId version1.576/version /parent I can again use mvn release:prepare release:perform without any hacks :) Regards Piotr On Thursday, July 31, 2014 7:52:51 PM UTC+2, davidkarlsen wrote: For reference, this is the maven release plugin issue: https://jira.codehaus.org/browse/MRELEASE-812 AFAIK. 2014-07-31 15:12 GMT+02:00 Marco Miller miller...@me.com javascript:: Indeed; and that is basically the info I added to the wiki(*) some weeks ago, when I experienced such troubles myself: (*) https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Workingaroundcommonissues = wiki should have all the needed info by now. /Marco Le mercredi 30 juillet 2014 10:15:00 UTC-4, Stephen Connolly a écrit : there is a much simpler way to get a release: instead of doing $ mvn release:prepare release:perform (with the -B if you are feeling YOLO) you do $ mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare org.apache.maven.plugins:maven-release-plugin:2.5:perform Simples On 30 July 2014 14:59, Markus Pfeiffer m.pfe...@mwaysolutions.com wrote: I've run into the same issue using git 1.9.1 + maven 3.2.2 on Ubuntu and git 1.8.5.2 + maven 3.1.1 on Mac. The release version is never committed and never appears in the store. I also seem to be in the same boat as Ulrich Hafner, our Jenkins plugin is in a subfolder of the git repository and none of the workarounds seem to work. I've used nigelm's tip and simply did a manual deploy using a combination of mvn version:set and mvn deploy. To simplify the process in the future I've written a simple bash script that others may find useful: #!/bin/bash # NAME=tag-name echo Preparing $NAME for release # Query user for info read -p Enter version number to use for the release: VERSION_RELEASE read -p Enter name for the release tag [$NAME-$VERSION_RELEASE]: TAG_RELEASE read -p Enter version number for next development iteration: VERSION_SNAPSHOT if [[ -z $TAG_RELEASE ]]; then TAG_RELEASE=$NAME-$VERSION_RELEASE fi if [[ $VERSION_SNAPSHOT != *-SNAPSHOT ]]; then VERSION_SNAPSHOT=$VERSION_SNAPSHOT-SNAPSHOT fi # Show info for review echo echo Release version : $VERSION_RELEASE echo Tag release with : $TAG_RELEASE echo Next iteration : $VERSION_SNAPSHOT read -p Continue (y/N)? -s -n1 KEY echo if [[ $KEY != y ]]; then echo Aborted exit fi # Set the new version, commit, create a tag mvn versions:set -DnewVersion=$VERSION_RELEASE git add pom.xml git commit -m prepare release $TAG_RELEASE git tag $TAG_RELEASE # Deploy the new version mvn deploy # Set the new snapshot version, commit mvn versions:set -DnewVersion=$VERSION_SNAPSHOT git add pom.xml git commit -m prepare for next development iteration # Push changes and tags # git push # git push --tags # Clean up backup files # rm pom.xml.versionsBackup echo echo done. The push is commented out just to be on the save side. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- -- David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.