title: Setting classpath order in playframework app
body: <p>I have a project where I need to parse some HTML files as part of a play application.  For that task, I thought I'd apply nekohtml.  I specify nekohtml as a dep in dependencies.yml and isse 'play dependencies'.  This pulls in nekohtml and xerces into the lib folder.  All well and good.  However, nekohtml needs to be before xerces on the classpath to work properly.  And as far as I can see at <a href="https://github.com/playframework/play/blob/master/framework/pym/play/application.py#L124">https://github.com/playframework/play/blob/master/framework/pym/play/application.py#L124</a> the ordering of jars on the classpath is arbitrary as per <a href="http://docs.python.org/library/os.html#os.listdir">http://docs.python.org/library/os.html#os.listdir</a>   Is it possible to manually set the ordering of jars on the classpath somehow?</p>
  
  <p>Edit: My dependencies.yml looks like this: </p>
  
  <pre><code>require:  
    - play
    - org.apache.poi -&gt; poi 3.7
    - net.sourceforge.nekohtml -&gt; nekohtml 1.9.14:
         transitive: false
    - xerces -&gt; xercesImpl 2.9.1
  </code></pre>
  
  <p>When I issue the command 'play classpath' it lists the following (excerpt):</p>
  
  <blockquote>
    <p>['/home/leif/dev/java/fun/tk/conf',
    '/home/leif/dev/play/play-1.2/framework/play-1.2.jar',
    '/home/leif/dev/java/fun/tk/lib/jaxen-1.1.jar',
    '/home/leif/dev/java/fun/tk/lib/log4j-1.2.15.jar',
    '/home/leif/dev/java/fun/tk/lib/junit-4.8.1.jar',
    '/home/leif/dev/java/fun/tk/lib/jta-1.1.jar',
    '/home/leif/dev/java/fun/tk/lib/dom4j-1.6.1.jar',
    '/home/leif/dev/java/fun/tk/lib/xercesImpl-2.9.1.jar',
    '/home/leif/dev/java/fun/tk/lib/commons-collections-3.2.1.jar',
    '/home/leif/dev/java/fun/tk/lib/xml-resolver-1.2.jar',
    '/home/leif/dev/java/fun/tk/lib/xml-apis-1.3.04.jar',
    '/home/leif/dev/java/fun/tk/lib/antlr-2.7.6.jar',
    '/home/leif/dev/java/fun/tk/lib/poi-3.7.jar',
    '/home/leif/dev/java/fun/tk/lib/commons-logging-1.1.1.jar',
    '/home/leif/dev/java/fun/tk/lib/nekohtml-1.9.14.jar',
    '/home/leif/dev/play/play-1.2/framework/lib/jj-textile.jar',
    ...</p>
  </blockquote>
  
  <p>So xerces is clearly ahead of nekohtml even though the transitive dep is excluded and added manually after nekohtml. </p>