Possibility to override some yacy.init properties at maven build

It is convenient with Heroky to be able to configure staticIP, http port
and admin initial password at maven build.
pull/61/head
luccioman 8 years ago
parent a5b0601184
commit efd62b0a07

@ -8,7 +8,7 @@
# ----------------------------------------------------------------------------
# port number where the server should bind to
port = 80
port = 8090
# optinal ssl port (https port) the server should bind to
port.ssl = 8443

@ -64,6 +64,64 @@
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>init.staticIP</id>
<phase>prepare-package</phase>
<configuration>
<target if="yacy.staticIP"
description="Set staticIP in yacy.init only if provided as a property">
<replaceregexp file="${project.basedir}/defaults/yacy.init"
match="staticIP=(.*)"
replace="staticIP=${yacy.staticIP}"
byline="true"
/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>init.port</id>
<phase>prepare-package</phase>
<configuration>
<target if="yacy.port"
description="Set port in yacy.init only if provided as a property">
<replaceregexp file="${project.basedir}/defaults/yacy.init"
match="port = (.*)"
replace="port = ${yacy.port}"
byline="true"
/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>init.admin</id>
<phase>prepare-package</phase>
<configuration>
<target if="yacy.admin.passwd"
description="Set encoded admin password in yacy.init only if provided as a property">
<replaceregexp file="${project.basedir}/defaults/yacy.init"
match="adminAccountBase64MD5=(.*)"
replace="adminAccountBase64MD5=${yacy.admin.passwd}"
byline="true"
/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>

Loading…
Cancel
Save