Commit e922d689 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Created installation scripts, removed hardcoded configuration

parent ee235930
Loading
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+13 −0
Original line number Diff line number Diff line
/TASMAN-webapp/nb-configuration.xml
/TASMAN-webapp/nbactions.xml
/TASMAN-webapp/faces-config.NavData
/TASMAN-core/target/
/TASMAN-webapp/target/
/TASMAN-core/nb-configuration.xml
/TASMAN-embedded/target/
/TASMAN-core/nbproject/
/TASMAN-bom/target/
config.properties
test.properties
/**/pom.xml.versionsBackup
install.sh

.gitlab-ci.yml

0 → 100644
+2 −0
Original line number Diff line number Diff line
build:
  script: "cd TASMAN-core; mvn clean install -P Test -Dmysql_host=localhost -Dmysql_port=3306 -Dmysql_user=tasman_tester -D mysql_password=tasman_tester -Dpostgres_host=localhost -Dpostgres_port=5432 -Dpostgres_user=tasman_tester -Dpostgres_password=tasman_tester -Dpostgres_database=tasman_test"
+17 −35
Original line number Diff line number Diff line
@@ -5,41 +5,24 @@ See also the [CHANGELOG](CHANGELOG.md).

## Build

### Build the API

    cd TASMAN-core
    mvn install

#### WARNING: test
Test suite for the TASMAN-core assumes some hardcoded values. If they
fail simply put an _@Ignore_ in front on the test class.

### Build the Web application

    cd TASMAN-webapp

Edit configuration properties file (`src/main/resources/webapp.properties`):

    ucd_service_url=<URL for the UCD REST web service>
    config_file_path=<location where the web app will store the generated XML configuration>

IA2 UCD service is at http://ia2-vo.oats.inaf.it:8080/ucd/

If the UCD web service is unreachable the web app will work anyway, but without the UCD search functionality.

Then build the web application:

* GlassFish war package (default):

        mvn install

* Tomcat war package:

        mvn -P Tomcat install
1. Create a `config.properties` file (copy it from `config.properties.example`). In this file it is specified:
    * **ucd_service_url**: the URL for the UCD REST web service.
        * IA2 UCD service is at http://ia2-vo.oats.inaf.it/ucd/
        * if the UCD web service is unreachable the web app will work anyway, but without the UCD search functionality.
    * **config_file_path**: the location where the web app will store the generated XML configuration (the location needs to be writable by the application server in which TASMAN will run).

2. `chmod +x build.sh`
3. `./build.sh <command>`, commands are:
    * **core** build only TASMAN core
    * **test**: run tests; you need to create a `test.properties` file containing a configuration for connecting to a MySQL and a Postgres test database
    * **glassfish**: build GlassFish war package
    * **tomcat**: build Tomcat war package (using config.properties file)
    * **embedded**: build embedded package (to be run _locally!_)
    * **installer**: build install script (produce self-extracting install.sh script)

## Supported application servers

The web app was tested with:
The web app has been tested with:

* GlassFish 4.1
* Tomcat 8.0.33
@@ -51,9 +34,8 @@ Build requires _Ucidy_ and _Unity_ that are not available at central
maven repo. You should have them installed in a local maven repo.

To do this: download the jar files listed in the following
credits section and runn a couple of `mvn install:install-file`
commands based upond the dependencies description in the _TASMAN-webapp_
_pom.xml_ file.
credits section and run a couple of `mvn install:install-file`
commands based upond the dependencies description in the _TASMAN-webapp_ _pom.xml_ file.

## Credits

TASMAN-bom/pom.xml

0 → 100644
+53 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    
    <groupId>it.inaf.ia2.tsm</groupId>
    <artifactId>tasman-bom</artifactId>
    <version>1.3.2</version>
    
    <packaging>pom</packaging>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <netbeans.hint.license>inaf-license-netbeans</netbeans.hint.license>
        <maven.test.skip>true</maven.test.skip>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.21</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <show>public</show>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20</version>
                <configuration>
                    <trimStackTrace>false</trimStackTrace>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
 No newline at end of file
+25 −40
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>it.inaf.ia2.tap</groupId>
    <artifactId>tasman-core</artifactId>
    
    <parent>
        <groupId>it.inaf.ia2.tsm</groupId>
        <artifactId>tasman-bom</artifactId>
        <version>1.3.2</version>
    </parent>
    
    <artifactId>tasman-core</artifactId>
    <packaging>jar</packaging>
    <name>tasman-core</name>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <netbeans.hint.license>inaf-license-netbeans</netbeans.hint.license>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
@@ -31,36 +30,22 @@
            <version>9.3-1104-jdbc41</version>
            <scope>runtime</scope>
        </dependency>
        <dependency> 
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.21</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <profiles>
        <profile>
            <id>test</id>
            <properties>
                <maven.test.skip>false</maven.test.skip>
            </properties>
            <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <show>public</show>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20</version>
                <configuration>
                    <trimStackTrace>false</trimStackTrace>
                </configuration>
            </plugin>
        </plugins>
                <testResources>
                    <testResource>
                        <directory>src/test/resources</directory>
                        <filtering>true</filtering>
                    </testResource>
                </testResources>
            </build>
        </profile>
    </profiles>
</project>
 No newline at end of file
Loading