GithubHelp home page GithubHelp logo

oss-mad / sw360 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipse-sw360/sw360

0.0 0.0 0.0 11.91 MB

SW360 project

Home Page: https://www.eclipse.org/sw360/

License: Other

Shell 0.35% JavaScript 2.10% Python 2.94% Java 91.22% Thrift 1.75% HTML 0.10% Batchfile 0.01% FreeMarker 0.09% Dockerfile 0.15% SCSS 1.30%

sw360's Introduction

Eclipse Public License 2.0 Build Status Slack Channel Changelog GitHub release (latest by date)

SW360 Portal

A software component catalogue application - designed to work with FOSSology.

SW360 is a server with a REST interface and a Liferay CE portal application to maintain your projects / products and the software components within.

It can manage SPDX files for maintaining the license conditions and maintain license information.

Introduction

It is comprised of one frontend (portal) part, backend (services) part and additionally a REST API:

  • Frontend: Liferay-CE-(Tomcat-)based portal application using portlets.
  • Backend: Tomcat-based thrift services for being called by different applications.
  • Database: we store software components and metadata about them in CouchDB.
  • Rest: this REST API provides access to project resources for external integration.

The reference platform is the Ubuntu server 20.04 (which is an LTS version) as it is supported in sw360vagrant. However, it runs well on other OSes (see below).

Project structure

This is a multi module maven file. please consider that we have the following modules:

  • frontend: for portlets, themes and layouts, the liferay part.
  • backend: for the thrift based services.
  • libraries: for general stuff that is reused among the above, for example, couchdb access.
  • scripts: for deploying either inside the vagrant or on your development machine.
  • rest: for the REST API which contains an authorization and resource server.

Required software

  • Java 11, tested with OpenJDK
  • CouchDB, at least 2.1 (tested, may work with other releases of CouchDB as well), runs best with 3.1.1
  • Liferay Portal CE 7.3.3 GA4 or 7.3.4 GA5
  • Apache Tomcat 9.0.X (which is bundled with Liferay)
  • couchdb-lucene for search, please refer to installation details in the wiki, because a patch is required

In addition, the Liferay instance must provide the following dependecies via OSGi:

  • Apache Commons Codec 1.12
  • Apache Commons Collections4 4.4
  • Apache Commons CSV 1.4
  • Apache Commons IO 2.7
  • Apache Commons Lang 2.4
  • Apache Commons Logging 1.2
  • Apache Commons Compress 1.20
  • Google Gson 2.8.9
  • Google Guava 31.0.1-jre
  • Jackson Annotations 2.13.2
  • Jackson Core 2.13.2
  • Jackson Databind 2.13.2.2
  • libthrift 0.14

In order to build you will need:

  • A git client
  • Apache Maven 3.6.X
  • Apache Thrift 0.13

http://maven.apache.org/download.html#Installation

Then, you must install Apache Tomcat, CouchDB. And, Java of course.

The software is tested with with debian 8, debian 9, ubuntu 16.04, ubuntu 18.04, ubuntu 20.04 macosx 10.8 - 10.15. We run Liferay with PostgreSQL 9.X or 10 as the Liferay CE requires, but HSQL (provided with the liferay bundle) runs also OK.

PROBLEMS

Running with the tested software shows no problems if you encounter some please report them at:

https://github.com/eclipse/sw360/issues

Deployment

There is a vagrant project for one-step-deployment. See the project wiki for details:

https://github.com/eclipse/sw360/wiki

Or using sw360vagrant:

https://github.com/sw360/sw360vagrant

Commands

Most commands are using maven which is a dependency to build SW360.

Compiling, testing and deploying

Actually, there is a hierarchy of maven files, in general

  1. to clean everything up
  • mvn clean
  1. to run all targets including build the .war file at the end
  • mvn install

this needs a couchdb running on the host on port 5984. To start such a couchdb via docker one can use the script scripts/startCouchdbForTests.sh

  1. to install without running the tests
  • mvn install -DskipTests

For deployment run the command

mvn package -P deploy -Dbase.deploy.dir=. -Dliferay.deploy.dir=${LIFERAY_INSTALL}/deploy -Dbackend.deploy.dir=${LIFERAY_INSTALL}/tomcat-9.0.17/webapps -Drest.deploy.dir=${LIFERAY_INSTALL}/tomcat-9.0.17/webapps -DskipTests

which copies the artifacts depending on their type to the following folders:

  • backend: <SOME_ABSOLUTE_PATH>/tomcat
  • rest: <SOME_ABSOLUTE_PATH>/tomcat
  • frontend: <SOME_ABSOLUTE_PATH>/liferay
  • libraries: <SOME_ABSOLUTE_PATH>/liferay

You may also specify the paths using these properties:

  • backend artifacts: backend.deploy.dir
  • rest artifacts: rest.deploy.dir
  • liferay artifacts (frontend, libraries): liferay.deploy.dir Be aware that you have to deploy the Liferay artifacts in the Liferay auto-deploy folder. On the other hand you must not deploy rest and backend artifacts to the auto-deploy folder.

Note: the test framework for the REST API needs the tests running in order to generate the API documentation. So, for building the REST API artefacts, please switch in the rest sub projects and execute:

mvn package -P deploy -Dbase.deploy.dir=. -Dliferay.deploy.dir=${LIFERAY_INSTALL}/deploy -Dbackend.deploy.dir=${LIFERAY_INSTALL}/tomcat-9.0.17/webapps -Drest.deploy.dir=${LIFERAY_INSTALL}/tomcat-9.0.17/webapps

Liferay Configuration

You should provide below property configuration based on his/her Liferay deployment environment as found in the master pom.xml file.

Please note that you should run the Liferay installation procedures as found on the Liferay documentation.

War file packaging

As backend services are supposedly being deployed in an application server. So to avoid conflicts for servlets api (in case of tomcat, tomcat-servlet-api-x.x.x-jar) are excluded from the WAR file while packaging. Using below configuration,

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
            <webResources>
                <resource>
                    <directory>${basedir}/src/main/java</directory>
                    <targetPath>WEB-INF/classes</targetPath>
                    <includes>
                        <include>**/*.properties</include>
                        <include>**/*.xml</include>
                        <include>**/*.css</include>
                        <include>**/*.html</include>
                    </includes>
                </resource>
            </webResources>
            <packagingExcludes>
                        WEB-INF/lib/tomcat-servlet-api-7.0.47.jar
            </packagingExcludes>
        </configuration>
    </plugin>

License

SPDX-License-Identifier: EPL-2.0

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/

sw360's People

Contributors

mcjaeger avatar smrutis1 avatar maierthomas avatar lepokle avatar ag4ums avatar jaideeppalit avatar maxhbr avatar nutanv1contr avatar ravi110336 avatar neubs-bsi avatar imaykay avatar alberthjy avatar oheger-bosch avatar alexbrdn avatar dependabot[bot] avatar akapti avatar blaumeiser-at-bosch avatar nam-np avatar shi9qiu avatar sweetca avatar greimela-si avatar heliocastro avatar hoangnt2 avatar tuannn2 avatar martin-idel-si avatar bs-matil avatar rudra-superrr avatar tsdv-phongnv avatar ymdysk avatar quan-tv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.