+1 -- here's where I ended up with -- maybe 7 lines which could be reused?
Didn't seem even worth refactoring:

https://github.com/jenkinsci/jira-ext-plugin/blob/master/src/main/java/org/jenkinsci/plugins/jiraext/view/JiraExtBuildStep.java
https://github.com/jenkinsci/jira-ext-plugin/blob/master/src/main/java/org/jenkinsci/plugins/jiraext/view/JiraExtPublisherStep.java

On Wed, Dec 14, 2016 at 6:41 AM, Ullrich Hafner <[email protected]>
wrote:

> This is quite similar to the approach when you are supporting Freestyle
> projects and Maven projects: there still is a *lot* of duplication of the
> boilerplate code :-(
>
>
> Am 14.12.2016 um 12:12 schrieb Robert Sandell <[email protected]>:
>
> There are other plugins that already does this that you can take
> inspiration from; env-inject and parameterized trigger plugin comes to mind.
> Basically put all common builder code in a separate class and have your
> builder and publisher as small facades that mostly just provides the
> extension hook and first level data binding.
>
> /B
>
> On Tue, Dec 13, 2016 at 5:16 PM, 'Dan Alvizu' via Jenkins Developers <
> [email protected]> wrote:
>
>> Okay, I was hoping there was some BuilderPublisher class I could just
>> extend :)
>>
>> I'll go copy-pasta route. Thanks!
>>
>>
>> On Monday, December 12, 2016 at 12:36:43 PM UTC-7, Kanstantsin Shautsou
>> wrote:
>>>
>>> Unfortunately freestyle build is not freestyle. I guess because of
>>> workflow nobody interested in merging/enhancing other job types.
>>> There is a workaround by using any-build-step/flexible publisher plugins
>>> that expose types vice versa.
>>>
>>> On Monday, December 12, 2016 at 7:18:36 PM UTC+3, Dan Alvizu wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm working on the jira-ext plugin, which updates JIRA tickets as a
>>>> hudson.task.Builder, which means it shows up in the drop-down of build
>>>> steps. I would also like to have it show up in the list of post-build
>>>> steps, which I understand means I must extend a hudson.task.Publisher.
>>>>
>>>> I can just copy-pasta this into another class and have that one extend
>>>> hudson.task.Publisher, but that seems wrong. The implementation is
>>>> essentially the same. Is there a smarter way of doing this?
>>>>
>>>> Thanks!
>>>>
>>>
>> --
>> 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 [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jenkinsci-dev/2224ceb4-3998-4acb-ae0e-8a0a777cb907%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/2224ceb4-3998-4acb-ae0e-8a0a777cb907%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Robert Sandell
> *Software Engineer*
> *CloudBees Inc.*
>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CALzHZS3zX0rYNrDHq1DQNgyY_7pOcT5KepgR5R1XRJLTus5hqA%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS3zX0rYNrDHq1DQNgyY_7pOcT5KepgR5R1XRJLTus5hqA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/zwbofcvtBAU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/BE7ED4A3-D0D2-457B-9CB0-14302B37FAAE%40gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/BE7ED4A3-D0D2-457B-9CB0-14302B37FAAE%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
<https://www.pingidentity.com>[image: Ping Identity]
<https://www.pingidentity.com>
Dan Alvizu
Principal Engineer
[email protected]
w: +1 720.317.2060
c: +1 720.938.6640
Connect with us: [image: Glassdoor logo]
<https://www.glassdoor.com/Overview/Working-at-Ping-Identity-EI_IE380907.11,24.htm>
[image:
LinkedIn logo] <https://www.linkedin.com/company/21870> [image: twitter
logo] <https://twitter.com/pingidentity> [image: facebook logo]
<https://www.facebook.com/pingidentitypage> [image: youtube logo]
<https://www.youtube.com/user/PingIdentityTV> [image: Google+ logo]
<https://plus.google.com/u/0/114266977739397708540> [image: Blog logo]
<https://www.pingidentity.com/en/blog.html>
<https://www.pingidentity.com/en/about.html>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAL2uVb12C3%3D0Lgs0dm-AdECZsDYwEpGhroU9FardQkquFO04gw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to