-
Notifications
You must be signed in to change notification settings - Fork 535
Description
Dear devs,
Dear @bsilverstein as the one who wrote the code for #3921,
while working on #4172, I am crafting a new Maven profile to generate smallest possible Docker images based on the payara 5 server-full image using https://dmp.fabric8.io.
As I want to make things really small, I don't want to bundle the dataverse dependencies within the WAR file, but create a small WAR without all deps, containing only classes and ressources. The deps get moved in by copying them the /lib of the Glassfish/Payara domain (so they are kind of "provided" scoped in Maven terminology). (For those interested in Docker: this should provide us with smaller layer changes and smaller hub transfers!)
The stripping of the mailing stuff from the AWS SDK makes this hard to achieve in two ways: a) I would to fiddle around with this, too and b) the TrueZIP plugin simply fails as I don't build the WAR with deps inside and it is not easy to skip it in a profile without making a mess in the pom.xml...
Back in #3921 where all of this was introduced, there has been a pointer to the AWS dev docs about using individual components.
Did you guys ever try to get that rolling? If not: maybe this would be the perfect time to do so now... Willing to contribute on this. 😄
This is related to a question I made on IRC (see logs).
EDIT:
@pdurbin suggested some clarification on IRC.
The pom.xml plugin section I would like to see removed:
- <!-- v4.8: The truezip-maven-plugin below deletes two copies of a file that the AWS SDK bundle
- includes called javamail.providers which breaks system emails. TODO: make our own AWS SDK without Amazon SES.
- - bsilverstein 8/8/2017 -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>truezip-maven-plugin</artifactId>
- <version>1.1</version>
- <executions>
- <execution>
- <id>remove-javamail-providers-from-exploded</id>
- <goals>
- <goal>remove</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <fileset>
- <directory>target/dataverse-${project.version}/WEB-INF/lib/aws-java-sdk-bundle-${aws.version}.jar/META-INF</directory>
- <includes>
- <include>javamail.providers</include>
- </includes>
- </fileset>
- </configuration>
- </execution>
- <execution>
- <id>remove-javamail-providers-from-war</id>
- <goals>
- <goal>remove</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <fileset>
- <directory>target/dataverse-${project.version}.war/WEB-INF/lib/aws-java-sdk-bundle-${aws.version}.jar/META-INF</directory>
- <includes>
- <include>javamail.providers</include>
- </includes>
- </fileset>
- </configuration>
- </execution>
- </executions>
- </plugin>And something that needs to be changed (and complemented by some more stuff):
<dependency>
<groupId>com.amazonaws</groupId>
- <artifactId>aws-java-sdk-bundle</artifactId>
+ <artifactId>aws-java-sdk-s3</artifactId>
<version>${aws.version}</version>
</dependency>