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

goBin is not hornor #13

Closed
dantran opened this issue Nov 7, 2016 · 9 comments
Closed

goBin is not hornor #13

dantran opened this issue Nov 7, 2016 · 9 comments
Assignees

Comments

@dantran
Copy link

dantran commented Nov 7, 2016

Go: 1.7.1
mvn: 3.3.9
this plugin: 2.1.2 (ie latest)

I am trying to configure goBin to use ${project.build.directory}/bin

<configuration>
    <goBin>${project.build.directory}${file.separator}bin</goBin>
    [...]
</configuration>

the outputs always go to ${project.build.directory}

@raydac
Copy link
Owner

raydac commented Nov 8, 2016

am I right that you trying to redefine the output directory for build result? if so then it is defined in <directory>${basedir}${file.separator}bin</directory> , and goBin allows just to define $GOBIN environment variable but build command is called with direct -o parameter to place result into maven result folder defined through <directory> (mvn-golang build mojo has special parameter resultFolder which default value is ${project.build.directory})

@dantran
Copy link
Author

dantran commented Nov 8, 2016

best practice not to change project/build/directory since it impacts other plugins in the build lifecycle
this plugin goBin has default value to ${proejct.build.directory}, the plugin user should be able to override goBin settings

@raydac
Copy link
Owner

raydac commented Nov 8, 2016

exactly, but mvn-golang plugin changes the lifecycle totally because it is not java based one, thus plugins which are sensetive to java lifecycle and environment have to be moved into another module of same project and they will be processed in right java lifecycle

@dantran
Copy link
Author

dantran commented Nov 8, 2016

this not about java code, it can be other plugins. For example my msi-maven-plugin also uses that global config too :-)

@raydac
Copy link
Owner

raydac commented Nov 8, 2016

standard lifecycle processors will not be working because just will not find needed content in golang project and will not be able to install and deploy anything, the only way is to separate plugins in different modules of the same project imho like as in multimodule example

@dantran
Copy link
Author

dantran commented Nov 8, 2016

your last comment addressing my install/deploy issue? or about goBin. If user are not allowed to alter goBin may be best to remove it from plugin's configuration.

Would you accept PR? :-)

@raydac
Copy link
Owner

raydac commented Nov 8, 2016

goBin just allows to define $GOBIN during build process, I had complain for the value in the request, so I made that it can be disabled for working process just with <goBin>NONE</goBin> and plugin will stop processing the value, there are many golang sdks which work differently and I try to provide support for as many as possible

@dantran
Copy link
Author

dantran commented Nov 8, 2016

i think i can use resultFolder. you may want to update goBin to refer user to resultFolder settings

@raydac
Copy link
Owner

raydac commented Nov 8, 2016

the default value for resultFolder is ${project.build.directory} and default value for goBin is also ${project.build.directory} , the ${project.build.directory} can be changed through<directory>${basedir}${file.separator}bin</directory> which defines the property, direct definition of resultFolder allows to separate folders but by default they have the same target

@raydac raydac self-assigned this Nov 8, 2016
@raydac raydac closed this as completed Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants