#  Licensed to the Apache Software Foundation (ASF) under one or more
#  contributor license agreements.  See the NOTICE file distributed with
#  this work for additional information regarding copyright ownership.
#  The ASF licenses this file to You under the Apache License, Version 2.0
#  (the "License"); you may not use this file except in compliance with
#  the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License
#

This directory contains the source code for the Apache Pluto 3.0 project.
Apache Pluto 3.0 is the third version of the JSR-362 Reference Implementation
(Java Portlet API 3.0) and Technology Compliance Kit (TCK). The project can 
be built using the maven command:

mvn clean install -Ppluto

The command line switch '-Ppluto' activates a maven profile that causes the 
TCK war files to be built for running in the Pluto environment.

See the portlet-tck_3.0/README.txt file for information on the TCK.

Building with dist-build.xml
============================

A simplified way to build a bundled Pluto 3.0 distribution is to use the
dist-build.xml Ant build which downloads Tomcat and calls the appropriate Maven
commands to create a distribution with Pluto embedded in Tomcat. It will also
copy the portlet API jars (source, executable, and javadoc) into the
distribution directory. Optionally, the TCK can be packaged as well. The
finished bundles and jar files will be located in the target/dist directory.

See the documentation in dist-build.xml for details on how to run the build.

Once the bundle has been built, you can unpack it and run the RI. There are three 
bundles available in different formats that have the same contents.

pluto-<version>-bundle.zip
pluto-<version>-bundle.gz
pluto-<version>-bundle.bz2

where <version> is equal to '3.0-SNAPSHOT' for a snapshot build or '3.0' for the
release build.

Select the bundle file appropriate for your environment and unpack it to the 
directory of choice. After unpacking, navigate to the directory:

./pluto-<version>/bin 

and run either startup.bat or startup.sh depending on your environment. This
will start Tomcat with the Pluto application installed.

The application is configured to use port 8080. You can access the application 
with the following URL:

http://localhost:8080/pluto/portal

Use the credentials pluto/pluto to log on to the application.

Third-Party Licensing
=====================

The Apache Pluto software is compiled against version 2.1.1 of the JAX-RS API
which is made available under the Eclipse Public License, version 2.0 (EPL 2.0).

In addition, the software is compiled against version 1.3.1 of the Common
Annotations for the Java(TM) Platform API (Commons-Annotations API) which is
made available under the Common Development and Distribution License (CDDL).

According to the [ASF 3RD PARTY LICENSE POLICY]
(https://apache.org/legal/resolved.html#weak-copyleft-licenses), third-party
software that is licensed under the EPL 2.0 or CDDL licenses may be included
in binary form. To that end, the binary version of the JAX-RS API dependency
is found in the following path of the Pluto+Tomcat bundle:

    <tomcat-home>/lib/javax.ws.rs-api-2.1.1.jar

Apache Tomcat includes its own version of the Commons-Annotations API (which is
licensed under the Apache License, Version 2.0) in the following-path of the
Pluto-Tomcat bundle:

    <tomcat-home>/lib/annotations-api.jar
