title: build configuration : Java backend (Spring + Maven) with JS project (Angular)
body: <p>we would like to improve build configuration/integration of Java + JavaScript projects.</p>
  
  <ul>
  <li>back-end : Java app, Spring framework, REST API + maven as build tool</li>
  <li>front-end : HTML + CSS + JavaScript, <em>(based on <a href="https://github.com/joshdmiller/ng-boilerplate" rel="nofollow">ng-boilerplate</a> project template - it separates nicely all modules,services,directives,shared assets)</em> and it's using few JavaScript tools like npm, Bower, Karma + Grunt</li>
  </ul>
  
  <p>Workspace configuration is pretty simple - each project in separate directory :</p>
  
  <pre><code>    /workspace
       /JavaBackend
       /JsFrontend 
  </code></pre>
  
  <p>Problem is that developers are dealing with “Origin null is not allowed by Access-Control-Allow-Origin" messages in browsers as they run AJAX queries from front-end (from file://..../JSApp/build/index.hml) and Java App server is on localhost:8080. We could switch browser security off or modify headers to allow cross origin requests but we think it's not good way how to achieve that.</p>
  
  <p>We don't want to have JS resources inside of Java project in /src/main/webapps/ as in production environment apps will be deployed on different machines and each app has it's own build server.</p>
  
  <p>Do you have experience with similar project configuration ? What would you recommend to us ?</p>
  
  <p><em>Meanwhile we will experiment with Tomcat 7 to check if it can e.g. serve external static resources (js stuff) out of context of java app</em></p>