[
https://issues.apache.org/jira/browse/AIRAVATA-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13961619#comment-13961619
]
Saminda Wijeratne commented on AIRAVATA-1121:
---------------------------------------------
I refactored the trunk source (except for samples directory) to have only one
instance of airavata-server.properties and airavata-client.properties files. As
mentioned before these files (along with some additional configuration files)
now exist as maven modules.
How to use these configuration modules,
1. Want to have the configuration file in the classpath of a module.
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-server-configuration</artifactId>
</dependency>
or
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-client-configuration</artifactId>
</dependency>
2. Want to have configurations copied to the binary distribution (zip/tar.gz).
Use the dependency plugin to extract the configuration jar to some location and
using the assembly plugin copy the configurations to the prefered location in
the distribution.
pom.xml,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>unpack</id>
<phase>compile</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-client-configuration</artifactId>
<version>${project.version}</version>
<type>jar</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/conf</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
eg: bin-assembly.xml
<assembly>
...
<fileSets>
...
<fileSet>
<directory>${project.build.directory}/conf</directory>
<outputDirectory>conf</outputDirectory>
<includes>
<include>*.properties</include>
</includes>
</fileSet>
...
</fileSets>
...
</assembly>
3. Need either one of the configuration file for unit/integration tests.
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-server-configuration</artifactId>
<scope>test</scope>
</dependency>
or
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-client-configuration</artifactId>
<scope>test</scope>
</dependency>
Also I updated the ApplicationSettings/ServerSettings classes support settings
overriding through external settings files and system properties. Following is
the increasing order or priority in overriding configuration settings in
Airavata.
airavata-server.properties / airavata-client.properties
External settings files
Settings passed as command line args
Settings defined as system properties
> Refactor to have Server and Client configurations in one place
> --------------------------------------------------------------
>
> Key: AIRAVATA-1121
> URL: https://issues.apache.org/jira/browse/AIRAVATA-1121
> Project: Airavata
> Issue Type: Task
> Reporter: Saminda Wijeratne
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)