Fork me on GitHub jcabi

25-Sep-2013 0.9.1

Package ".ebextensions" for Amazon Elastic Beanstalk

For in-server operations Amazon Elastic Beanstalk proposes a mechanism based on YAML .config configuration files stored in .ebextensions directory of your WAR package. Read more about them here. Also, pay attention to configurable resources.

This is how we recommend to package these files in Maven. Configure maven-war-plugin in pom.xml:

<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <configuration>
    [...other configuration...]
    <webResources>
      <resource>
        <directory>src/main/ebextensions</directory>
        <targetPath>.ebextensions</targetPath>
        <filtering>true</filtering>
      </resource>
    </webResources>
  </configuration>
</plugin>

All of them will be picked up by maven-war-plugin during packaging, filtered (all ${...} sequences replaced with real values), and placed into .ebextensions directory of WAR archive.

This mechanism can be very useful for, say, syslog configuration.

Copyright © 2012-2013 jcabi.com, All Rights Reserved. Privacy Policy.

site is built by Apache Maven