Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As far I as know, there is no such thing as a standard project structure for Java per se. However, various tools and IDEs (such as Eclipse) do have a standard structure.</p> <p><a href="http://maven.apache.org/" rel="nofollow">Maven</a>, a build tool for Java, on the other hand has a very clearly defined (default) project structure. There, all Java source files are placed in the <code>src/main/java</code> folder and all resource files (like your config files) are placed in <code>src/main/resources</code>.</p> <p>Here's a very quick introduction to Maven, if you don't know it yet: <a href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html" rel="nofollow">Maven in 5 Minutes</a></p> <hr> <p>Regarding your question about packaging with dependencies, here is a snipped from one of my Maven POM files that uses the <a href="http://maven.apache.org/plugins/maven-assembly-plugin/" rel="nofollow">Assembly Plugin</a> to create a JAR file with all dependencies included:</p> <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt; &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;descriptorRefs&gt; &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt; &lt;/descriptorRefs&gt; &lt;archive&gt; &lt;manifest&gt; &lt;mainClass&gt;...&lt;/mainClass&gt; &lt;/manifest&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;make-assembly&lt;/id&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;single&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload