あなたはそれはそれを行うことが可能ですnashorn-maven-plugin
<build>
<plugins>
<plugin>
<groupId>io.github.michaldo</groupId>
<artifactId>nashorn-maven-plugin</artifactId>
<version>0.0.1</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<script>
var Files = Java.type('java.nio.file.Files');
var Paths = Java.type('java.nio.file.Paths');
var content = new java.lang.String(Files.readAllBytes(Paths.get($basedir+ '/a.txt')));
content = "From nashorn with love\n" + content;
Files.write(Paths.get($basedir + '/a.txt'),
content.getBytes());
</script>
</configuration>
<goals>
<goal>eval</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
を使用することができます。しかし、単純なテキストファイルでの処理は、写真より簡単です。 –
これを行うプラグインはありますか?なぜあなたは写真について話していますか? – astrohome
彼は "proto"を "photo"と間違えたと思う。 –