querydsl / apt-maven-plugin

Maven APT plugin
Apache License 2.0
79 stars 41 forks source link

Add ability to add additional source and test-source folders #49

Closed cwiejack closed 8 years ago

cwiejack commented 8 years ago

add ability to add additional source and test-source folders

timowest commented 8 years ago

Isn't this functionality already covered by the build-helper-plugin? http://www.mojohaus.org/build-helper-maven-plugin/plugin-info.html

cwiejack commented 8 years ago

Hi,

yes this is one option but for our usecase not the right one. If we use the buildhelper plugin, the source folder and therefore all classes are available for the complete maven module. We have some kind of "special requirement" ;) were we only want the annotation processor configured in the plugin to see/scan the classes. Therefore I came up with the idea to add extra source folders only for the plugin.

Shredder121 commented 8 years ago

We indent with spaces, could you at least rectify that?

cwiejack commented 8 years ago

Hi,

of course I could indent with spaces. Do you wish that I indent only my lines with spaces or should I refactor the whole class, because as far as I can see, there are multiple lines with tab indent instead of space.

Perhaps you could provide a formatter.xml configuration with your preferred style, or a small contribution hint with the basic style guide so that there are less conflicts with pull requests.

Regards Christian

Shredder121 commented 8 years ago

Hmm, strange, I don't see any tabs. Highlighting (that is, 2 spaces) highlights all indentations (all multiples of 2 spaces). Where do you see tabs? I think maybe checkstyle would help as well, to keep things consistent. So we can do that, but don't worry about it for now

But I think that only changing the lines you actually touch would be nice, no reason to have the patch bigger than it should be. Thanks at least!

Shredder121 commented 8 years ago

There are still lines that you changed. (that originally didn't have tabs) Could you reformat the class and see what you end up with? Sorry for the wait.

cwiejack commented 8 years ago

Hi,

I'm struggling with my IDE sorry for the confusion. I tried to use simple Text Editor now and indent with spaces. Hopefully the next run is ok.

Shredder121 commented 8 years ago

What you can do is reset back to the version before a18f66a4777c84bfc5407e42c877083e91a5de89. git reset a18f66a4777c84bfc5407e42c877083e91a5de89^ (note the ^) That way you can see what you changed and change the tabs back to spaces more easily. Then you can commit switch to field type List instead of String[] again.

What IDE do you use? We use NetBeans, IntelliJ and Eclipse, so if all else fails we can see if we can give formatter settings.

cwiejack commented 8 years ago

I use IntelliJ. But I think I found the problem. I accidentally formatted the whole class but didn't noticed this before ;). And therefore the tabs if have seen came from my commit. I will fix this. Sorry for the confusion and extra work.

timowest commented 8 years ago

Still a few style change requests and then we are good. Thanks a lot for the contribution @cwiejack !

Shredder121 commented 8 years ago

Looks fine to me, one more idea posted. Indeed thanks @cwiejack ! I'll merge after that then.

Shredder121 commented 8 years ago

So, does it work for you, in this form? Then it looks good to me.

cwiejack commented 8 years ago

Hi,

yes its fine for me. Thanks for accepting the request.