title: Where exactly do I put project-defaults.yml?
body: <p>I'm working on a Wildfly Swarm project (using Wildfly Swarm version 2017.8.1, Maven 3.5.0, OpenJDK 1.8.0_141) where users will often upload files WAY bigger than Undertow's default 10485760 bytes (10MB) max-post-size setting.</p>
  
  <p>I see from other <a href="https://groups.google.com/forum/#!topic/wildfly-swarm/bxEaFI2bjsQ" rel="nofollow noreferrer">questions</a> that what I need to change is the key <code>swarm.undertow.servers.default-server.http-listeners.default.max-post-size</code>.</p>
  
  <p>To try this setting out, I put it on the command line when I start the jar:</p>
  
  <pre><code>java -jar project-swarm.jar -Dswarm.undertow.servers.default-server.http-listeners.default.max-post-size=4000000000
  </code></pre>
  
  <p>This worked. The following also works if I want to run it using the Wildfly Swarm maven plugin:</p>
  
  <pre><code>mvn wildfly-swarm:run -Dswarm.undertow.servers.default-server.http-listeners.default.max-post-size=4000000000
  </code></pre>
  
  <p>Using either of the above two commands I can upload files bigger than 10485760 bytes (10MB). The next step is to make this the default so that I don't have to pass it in via command line each time. The <a href="https://reference.wildfly-swarm.io/configuration.html" rel="nofollow noreferrer">official Wildfly Swarm configuration documentation</a> said that I should put the undertow setting in a project-defaults.yml file. This is what that looks like for me:</p>
  
  <pre><code>swarm:
    undertow:
      servers:
        default-server:
          http-listeners:
            default:
              max-post-size: 4000000000
  </code></pre>
  
  <p>The thing is, none of that documentation says WHERE the file should ultimately end up. Should it end up as part of the war, under WEB-INF/classes, or the root of the war, or somewhere else? From the wildfly-swarm examples repo on github, usually the <code>project-defaults.yml file is in</code>src/main/resources`, which is where I had it originally. However, it didn't work for me. Any attempts to upload a file bigger than 10485760 bytes (10MB) fail.</p>
  
  <p>I found out that anything in a maven project that is put into <code>src/main/resources</code> gets put into the war file's <code>/WEB-INF/classes</code> (and the war file itself is wrapped by the swarm jar). So, I updated my maven pom so that the project-defaults.yml would be stored in the base directory of the war file itself. This STILL didn't work.</p>
  
  <p>Next, I tried putting project-defaults.yml in the swarm jar itself, rather than the enclosed war. Yet again, I could not break past the 10485760 bytes (10MB) max-post-size default.</p>
  
  <p>Finally, I tried using the command line option to refer to an external yml file, like so:</p>
  
  <pre><code>java -jar project-swarm.jar -s../src/main/root-resources/project-defaults.yml
  </code></pre>
  
  <p>This loaded the file, but alas I was STILL STUCK at the default max-post-size of 10485760 bytes (10MB).</p>
  
  <p>At this point, I'm stumped. My project-defaults.yml file might be wrong or I'm not putting it in the right location. How do I fix this so I can upload files bigger than 10485760 bytes (10MB) and specify it via the project-defaults.yml file?</p>