-
Notifications
You must be signed in to change notification settings - Fork 24
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
Change resulting filesystem structure, moving everything in project dir. #1
Conversation
mvn archetype:generate -DarchetypeGroupId=org.graylog -DarchetypeArtifactId=graylog-plugin-archetype -DartifactId=$pluginname | ||
|
||
sed 's,\(../graylog2-server/graylog2-web-interface\),../\1/,' < ${buildConfigFilename}.sample > ${buildConfigFilename} | ||
echo ${pluginname}/ >> ${prefix}/.gitignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move the cloned repositories into modules/
or something similar and ignore the whole directory in .gitignore
. Otherwise there will be modified files in the project. Also, this would add the directory multiple times if a user runs this script more than once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a bad idea, but this would require more work (changing the plugin's build.conf.js
, changing webpack.combined.config.js
of our web interface, etc.), which is not too difficult, but introduces more things which could go wrong. OTOH having the directory in .gitignore
multiple times (what happens only when a plugin dir is created, removed and recreated with the exact same name) wouldn't harm anybody.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't get where the difference is between putting all repos into graylog-project/<repo>
or into graylog-project/modules/<repo>
from a build.conf.js
perspective. Wouldn't the move into graylog-project/<repo>
require a change to build.conf.js
aswell? Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default build.conf.js.sample
has a path to the web interface checkout defaulting to ../graylog2-server/graylog2-web-interface
which works fine in this case. If we put all plugins into a subdir, we would need to change that. Same for webpack.combined.config.js
which is looking for plugins in ../graylog-plugin-*
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. The we misunderstood each other, or rather I got the bootstrap-plugin
script wrong. My suggestion was to move plugins and server into modules/
. 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a misunderstanding indeed :) After reading your initial commit it was actually clear enough, sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am now keeping the modules in the dir, because of the issues with maven-archetype (https://issues.apache.org/jira/browse/ARCHETYPE-311) and management of pom modules, but I am now adding dirs to .gitignore
only if they are not present yet.
46c08aa
to
aea211b
Compare
Instead of having/expecting project/server/plugin repos on the same level in the filesystem hierarchy, this PR is changing it so graylog-project dir contains all of the aforementioned. This makes it a bit less cluttered for developers because everything is under one directory.
The latter is done to make sure that there was at least one `npm install` run for a newly created plugin, otherwise the web interface dev mode will fail.
aea211b
to
3752ca6
Compare
LGTM 👍 |
Instead of having/expecting project/server/plugin repos on the same level in the filesystem hierarchy, this PR is changing it so graylog-project dir contains all of the aforementioned. This makes it a bit less cluttered for developers because everything is under one directory.