[aerogear-dev] AeroGear UnifiedPush server build feedback

Lucas Holmquist lholmqui at redhat.com
Wed Aug 6 08:18:11 EDT 2014


On Aug 6, 2014, at 7:22 AM, Lukáš Fryč <lukas.fryc at gmail.com> wrote:

> Hey Bruno,
> 
> awesome job with the docker image!
> Could we mention that in the README?
> 
> 
> I've created this issue to track improvements in the build itself:
> https://issues.jboss.org/browse/AGPUSH-881
> 
> 
> 
> 
> 
> Responds inline:
> 
> On Tue, Aug 5, 2014 at 9:56 PM, Bruno Oliveira <bruno at abstractj.org> wrote:
> Good morning peeps,
> 
> I would like to open this thread to discuss some ideas about how to
> improve the current build on Push server. Lukas have been doing a
> stellar job improving it and I think we can help.
> 
> Yesterday I spent some time trying to build a developer environment for
> UPS — was a good exercise to realize how people feel trying to contribute.
> The goal was to build the environment from scratch.
> 
> Here comes some feedback (keep in mind that I'm not that good on Node.js)
> 
> - Build our dependencies takes a considerable time. For fair
>   reasons, we are running mvn install, npm install and bohttp://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/wer install
>   for the first time. Maybe we can reduce one step?
> 
> We cannot avoid Maven and if we want really fresh compiled-from-sources approach (as opposed to store-compiled-to-git what we had before), we need go with both, Bower and NPM.
> 
> Storing NPM deps in /node_modules is platform-dependent.
> 
> We could store there Bower dependencies though. We can use exportsOverride section to extract just those files from our dependencies that we actually require in the project. Once updated, we can save them.
> 
> But once you have NPM installed correctly, it's just a small step to running Bower.
>  
> 
> - Java developers don't have their environment ready for Node — it can
>   be a blocker. For example, was necessary to install gcc, libpng and
>   libpng-devel. I already saw team members struggling with it, like me.
> 
> This is a blocker, I wasn't even aware of it - we may want to choose other plugins that don't require those dependencies or maybe inspect what grunt plugins we are even using. Do we even need some of those Grunt plugins like PNG minification (imagemin)?

+1,  i’m guessing some of those are defaults from a base yeoman build?

>  
> 
> - Maybe we should run -Pdev by default and run the complete build only
>   for CI.
> 
> Yes, we have to come with sensible defaults. We store our NPM/Bower caches inside the project structure and we clean them with each clean. This is anti-pattern - in Java analogy - it's cleaning .m2/repository for each build - we should clean them just when we explicitly want to. -Pdev would stay here, but it would just remove /node_modules and /bower_components
> 
> a) should add one more profile to clean even caches, e.g. -Pforce-clean
> b) or do not clean it at all and document that if one needs completely fresh sources, he should clean manually by "git clean -f -x -d" and "npm cache clean"
>  
> 
> - Maybe we can minify some JS dependencies and don't build
>   everything altogether?
> 
> I built an image[1][2], because developers willing to just use UPS with the
> latest bits might struggle to configure their environment and maybe it
> can be helpful.
> 
> The image is not perfect and soon will be moved to jboss/dockerfiles.
> 
> Thoughts?
> 
> [1] - https://github.com/abstractj/docker/tree/master/aerogear-unifiedpush-dev
> [2] - https://registry.hub.docker.com/u/abstractj/unifiedpush-dev/
> --
> 
> abstractj
> PGP: 0x84DC9914
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
> 
> 
> Also, someone suggested to use wro4j - as long as it is vital alternative for the build time, wro4j is really not handy for development, you won't get as quick turnaround as with Grunt.
> 
> Some plugins we use doesn't even have to be available in wro4j, e.g. ngtemplates, ngmin.
> 
> 
> 
> Making the build straight-forward is an ongoing, continuous process and we have still lot to investigate here. It can't definitely be finished in 1.0 time.
> 
> Bear in mind that Node/NPM is very young technology and it will take some time to get it to the state where Maven is (if ever).
> 
> In the meantime, I encourage you to use this awesome docker image Bruno created!
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140806/7e06b9c2/attachment-0001.html 


More information about the aerogear-dev mailing list