maven - Are there best practices in using bower in a source-controlled, mavenized, java web application -
i'm quite new bower not web application development. previously, i've downloaded required javascript , css files third-party libraries/frameworks , placed them web application's src/main/webapp/scripts (or equivalent) folder. ensures files needed web application deployed.
with default setup, entire bower_components directory committed source control , if follow examples referencing bower package, e.g.,
<script src="/bower_components/jquery/jquery.js"></script>
i'm going end deploying entire bower_components directory web application. seems huge overkill (especially use jquery ui because themes downloaded bower).
is there best practices in using bower web application such application isn't bloated unnecessary third-party library files? please remember java , maven web application.
seeing tagged maven on question, disagree checking in 3rd party libraries, after having tasted goodness of maven dependency management :) no matter whether jar or js.
this we've been trying reconcile @ work there doesn't seem natural way js dependencies in maven. bower there looks maven plugin here:
for can specify target directory. haven't used yet, want have bring in js files target directory don't have put in source. if move forward this, envision.
if you're interested have more add (since there's not lot out there topic)... using maven "js" artifacts can leverage maven's dependency management our 3rd party js. plugin we've forked at:
it job, built our use case. please submit issues if find in need of genericizing. have manually upload these artifacts nexus, hasn't been big of issue.
a big advantage of using maven dependency mechanism transitive dependency resolution. have our js broken out different modules , without maven, there collisions versions of our js files, resulting in big mess in final app pulls of js dependencies in.
Comments
Post a Comment