Merge branch 'design2015' into design2015-user-management

This commit is contained in:
Papick Garcia Taboada
2016-01-13 16:09:41 +01:00
73 changed files with 2769 additions and 1707 deletions
-1
View File
@@ -32,5 +32,4 @@ out/
.gradle
local.properties
git.xml
build.info
mobile/github-advrecyclerview_lib/bin
+38 -26
View File
@@ -5,7 +5,7 @@ set -o functrace
# and is used to correctly resolve bundle names
PROJECT_TYPE="sailing"
find_project_home ()
find_project_home ()
{
if [[ "$1" == '/' ]] || [[ "$1" == "" ]]; then
echo ""
@@ -173,7 +173,7 @@ do
u) suppress_confirmation=1;;
v) p2local=1;;
x) GWT_WORKERS=$OPTARG;;
j) TESTCASE_TO_EXECUTE=$OPTARG;;
j) TESTCASE_TO_EXECUTE=$OPTARG;;
\?) echo "Invalid option"
exit 4;;
esac
@@ -306,11 +306,11 @@ MEMORY=4096m
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl
INSTALL_FROM_RELEASE=$SIMPLE_VERSION_INFO
" >> $PROJECT_HOME/dist/$SIMPLE_VERSION_INFO/amazon-launch-config_replica.txt
`which tar` cvzf $PROJECT_HOME/dist/$SIMPLE_VERSION_INFO/$SIMPLE_VERSION_INFO.tar.gz *
cp $ACDIR/env.sh $PROJECT_HOME/dist/$SIMPLE_VERSION_INFO
cp $PROJECT_HOME/build/release-notes.txt $PROJECT_HOME/dist/$SIMPLE_VERSION_INFO
cd $PROJECT_HOME
rm -rf build/*
@@ -322,7 +322,7 @@ INSTALL_FROM_RELEASE=$SIMPLE_VERSION_INFO
echo "Checking the remote connection..."
REMOTE_HOME=`ssh $REMOTE_SERVER_LOGIN 'echo $HOME/releases'`
echo "Now uploading release to $REMOTE_SERVER_LOGIN:$REMOTE_HOME. Can take quite a while!"
`which scp` -r $PROJECT_HOME/dist/$SIMPLE_VERSION_INFO $REMOTE_SERVER_LOGIN:$REMOTE_HOME/
echo "Uploaded release to $REMOTE_HOME! Make sure to also put an updated env.sh if needed to the right place ($REMOTE_HOME/environment in most cases)"
fi
@@ -607,7 +607,7 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
if [ $android -eq 0 ] && [ $gwtcompile -eq 0 ] && [ $testing -eq 0 ]; then
parallelexecution=1
echo "INFO: Running build in parallel with 2.5*CPU threads"
extra="$extra -T 2.5C"
extra="$extra -T 2.5C"
fi
if [ $android -eq 1 ]; then
@@ -620,22 +620,32 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools
ANDROID="$ANDROID_HOME/tools/android"
if [ \! -x "$ANDROID" ]; then
ANDROID="$ANDROID_HOME/tools/android.bat"
fi
if [ \! -x "$ANDROID" ]; then
ANDROID="$ANDROID_HOME/tools/android.bat"
fi
mobile_extra="-P -with-not-android-relevant -P with-mobile"
if [ $testing -eq 0 ]; then
echo "INFO: Skipping tests"
mobile_extra="$mobile_extra -Dmaven.test.skip=true -DskipTests=true"
else
mobile_extra="$mobile_extra -DskipTests=false"
fi
RC_APP_VERSION=`grep "def verCode=" mobile/com.sap.$PROJECT_TYPE.racecommittee.app/build.gradle | cut -d "=" -f 2`
RC_APP_VERSION=`grep "android:versionCode=" mobile/com.sap.$PROJECT_TYPE.racecommittee.app/AndroidManifest.xml | cut -d "\"" -f 2`
echo "RC_APP_VERSION=$RC_APP_VERSION"
extra="$extra -Drc-app-version=$RC_APP_VERSION"
TRACKING_APP_VERSION=`grep "def verCode=" mobile/com.sap.$PROJECT_TYPE.android.tracking.app/build.gradle | cut -d "=" -f 2`
TRACKING_APP_VERSION=`grep "android:versionCode=" mobile/com.sap.$PROJECT_TYPE.android.tracking.app/AndroidManifest.xml | cut -d "\"" -f 2`
echo "TRACKING_APP_VERSION=$TRACKING_APP_VERSION"
extra="$extra -Dtracking-app-version=$TRACKING_APP_VERSION"
BUOY_APP_VERSION=`grep "def verCode=" mobile/com.sap.$PROJECT_TYPE.buoy.positioning/build.gradle | cut -d "=" -f 2`
BUOY_APP_VERSION=`grep "android:versionCode=" mobile/com.sap.$PROJECT_TYPE.buoy.positioning/AndroidManifest.xml | cut -d "\"" -f 2`
echo "BUOY_APP_VERSION=$BUOY_APP_VERSION"
extra="$extra -Dbuoy-app-version=$BUOY_APP_VERSION"
APP_VERSION_PARAMS="-Drc-app-version=$RC_APP_VERSION -Dtracking-app-version=$TRACKING_APP_VERSION -Dbuoy.positioning-app-version=$BUOY_APP_VERSION"
extra="$extra $APP_VERSION_PARAMS"
mobile_extra="$mobile_extra $APP_VERSION_PARAMS"
NOW=$(date +"%s")
BUILD_TOOLS=22.0.1
TARGET_API=22
@@ -654,16 +664,19 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
echo yes | "$ANDROID" update sdk $ANDROID_OPTIONS --filter extra-android-m2repository --no-ui --force --all > /dev/null
echo "Updating Android SDK (extra-google-m2repository)..." | tee -a $START_DIR/build.log
echo yes | "$ANDROID" update sdk $ANDROID_OPTIONS --filter extra-google-m2repository --no-ui --force --all > /dev/null
./gradlew clean build -xtest | tee -a $START_DIR/build.log
echo "Using following command for apps build: mvn $mobile_extra -DargLine=\"$APP_PARAMETERS\" -fae -s $MAVEN_SETTINGS $clean install"
echo "Maven version used: `mvn --version`"
mvn $mobile_extra -DargLine="$APP_PARAMETERS" -fae -s $MAVEN_SETTINGS $clean install 2>&1 | tee -a $START_DIR/build.log
if [[ ${PIPESTATUS[0]} != 0 ]]; then
exit 100
fi
if [ $testing -eq 1 ]; then
echo "Starting JUnit tests..."
./gradlew test | tee -a $START_DIR/build.log
if [[ ${PIPESTATUS[0]} != 0 ]]; then
exit 103
fi
# ./gradlew test | tee -a $START_DIR/build.log
# if [[ ${PIPESTATUS[0]} != 0 ]]; then
# exit 103
# fi
# TODO find a way that the emulator test is stable in hudson
# adb emu kill
# echo "Downloading image (sys-img-${ANDROID_ABI}-android-${TEST_API})..." | tee -a $START_DIR/build.log
@@ -690,9 +703,6 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
# adb emu kill
# "$ANDROID" delete avd --name ${AVD_NAME}
fi
else
echo "INFO: Deactivating mobile modules"
extra="$extra -P !with-mobile"
fi
if [ $reporting -eq 1 ]; then
@@ -704,6 +714,8 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
# needed to make sure that tests use the right servers
APP_PARAMETERS="-Dmongo.host=$MONGODB_HOST -Dmongo.port=$MONGODB_PORT -Dexpedition.udp.port=$EXPEDITION_PORT -Dreplication.exchangeHost=$REPLICATION_HOST -Dreplication.exchangeName=$REPLICATION_CHANNEL"
extra="$extra -P with-not-android-relevant,!with-mobile"
echo "Using following command: mvn $extra -DargLine=\"$APP_PARAMETERS\" -fae -s $MAVEN_SETTINGS $clean install"
echo "Maven version used: `mvn --version`"
mvn $extra -DargLine="$APP_PARAMETERS" -fae -s $MAVEN_SETTINGS $clean install 2>&1 | tee -a $START_DIR/build.log
@@ -888,13 +900,13 @@ if [[ "$@" == "remote-deploy" ]]; then
$SCP_CMD $PROJECT_HOME/java/target/configuration/jetty/etc/realm.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/jetty/etc
$SCP_CMD $PROJECT_HOME/java/target/configuration/monitoring.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/
$SCP_CMD $PROJECT_HOME/java/target/configuration/mail.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/
$SCP_CMD $PROJECT_HOME/java/target/env.sh $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
$SCP_CMD $PROJECT_HOME/java/target/start $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
$SCP_CMD $PROJECT_HOME/java/target/stop $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
$SCP_CMD $PROJECT_HOME/java/target/status $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
$SCP_CMD $PROJECT_HOME/java/target/udpmirror $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
$SCP_CMD $PROJECT_HOME/java/target/http2udpmirror $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
$SCP_CMD $PROJECT_HOME/java/target/configuration/logging.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/
fi
+1 -1
View File
@@ -45,7 +45,7 @@ SAP is at the center of todays technology revolution, developing innovations
* [[Typical Data Mining Scenarios|wiki/typical-data-mining-scenarios]]
* [[Load Tests|wiki/server-load-tests]]
* [[Server Replication|wiki/server-replication]]
* [[Configure Races on Server|wiki/typical-development-scenarios]]
* [[Configure Races on Server|wiki/configure-races-on-server]]
* [[Development Environment|wiki/development-environment]]
* [[Working with GWT UI Binder|wiki/gwt-ui-binder]]
* [[Working with GWT Locally|wiki/local-gwt]]
+109
View File
@@ -0,0 +1,109 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>workspace</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>install-android-sdk</artifactId>
<packaging>pom</packaging>
<!-- The submodule "install-android-sdk" is only added to the build on Lean DI.
The modules only purpose is to assemble the Android SDK if it doesn't already exist in the build Job. -->
<profiles>
<profile>
<id>install-android-sdk-windows</id>
<activation>
<file>
<missing>${ldi.android.sdk.location}/platform-tools/adb.exe</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install-android-sdk</id>
<phase>initialize</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>android-sdk-windows</artifactId>
<version>${ldi.download.android.sdk.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.parent.location}</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>platform-tools-windows</artifactId>
<version>${ldi.download.android.platform-tools.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>build-tools-windows</artifactId>
<version>${ldi.download.android.build-tools.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}/build-tools</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>android</artifactId>
<version>${ldi.download.android.platform.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}/platforms</outputDirectory>
<includes>**/*</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>move_platform_dir</id>
<phase>initialize</phase>
<configuration>
<tasks>
<move file="${ldi.android.sdk.location}/platforms/android-${android.api.version}"
tofile="${ldi.android.sdk.location}/platforms/android-${android.platform.version}"/>
<move file="${ldi.android.sdk.location}/build-tools/android-${ldi.android.build-tools.version}"
tofile="${ldi.android.sdk.location}/build-tools/${ldi.download.android.build-tools.version}"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
+7 -7
View File
@@ -40,7 +40,7 @@
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.gwt.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
@@ -52,37 +52,37 @@
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.domain.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt.adminconsole</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.datamining.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.datamining.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
</dependencies>
@@ -12,6 +12,7 @@ import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Cookies;
@@ -317,7 +318,7 @@ public class StartAnalysisWidget extends Composite implements HasWidgets, PollsL
logger.log(Level.INFO, "Adding Startanalysis Card");
if (displaysCards == false) {
displaysCards = true;
header.getElement().setInnerHTML("Start " + startAnalysisDTO.raceName);
header.getElement().setInnerHTML("Start " + SafeHtmlUtils.fromString(startAnalysisDTO.raceName));
}
if (numberOfStartAnalysisCards > 0) {
rightButton.setResource(StartAnalysisWidgetResources.INSTANCE.right());
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.json.simple"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
+60 -38
View File
@@ -1,40 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sailing.domain.common</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sailing.domain.common</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.json.simple"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
@@ -1,39 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sailing.domain.shared.android</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sailing.domain.shared.android</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>4.3.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -175,7 +175,6 @@ public interface DomainFactory {
* must have been created before through
* {@link #getOrCreateTrackedRegatta(com.sap.sailing.domain.base.Regatta)} because otherwise the link to
* the {@link IEvent} can't be established
* @param raceLogResolver TODO
* @param tokenToRetrieveAssociatedRace
* used to update the set of{@link RaceDefinition}s received by the {@link RaceCourseReceiver} created by
* this call
@@ -234,10 +234,12 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
}
/**
* In addition to creating the track which is performed by the superclass implementation, this implementation registers
* a {@link GPSTrackListener} with the mark's track and {@link #notifyListeners(GPSFix, Mark, boolean) notifies the listeners}
* about updates. The {@link #updated(TimePoint)} method is <em>not</em> called with the mark fix's time point because
* mark fixes may be received also from marks that don't belong to this race.
* In addition to creating the track which is performed by the superclass implementation, this implementation
* registers a {@link GPSTrackListener} with the mark's track and {@link #notifyListeners(GPSFix, Mark, boolean)
* notifies the listeners} about updates. In previous versions the {@link #updated(TimePoint)} method was
* <em>not</em> called with the mark fix's time point because mark fixes could have been received also from marks
* that don't belong to this race. However, we don't support any connector anymore that works this way. Therefore,
* it is now considered safe to call {@link #updated(TimePoint)} for the mark fix's time point.
*/
@Override
protected DynamicGPSFixTrackImpl<Mark> createMarkTrack(Mark mark) {
@@ -247,6 +249,7 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
@Override
public void gpsFixReceived(GPSFix fix, Mark mark, boolean firstFixInTrack) {
updated(fix.getTimePoint());
triggerManeuverCacheRecalculationForAllCompetitors();
notifyListeners(fix, mark, firstFixInTrack);
}
+197 -192
View File
@@ -1,205 +1,210 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sailing.gwt.ui</artifactId>
<packaging>eclipse-plugin</packaging>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sailing.gwt.ui</artifactId>
<packaging>eclipse-plugin</packaging>
<dependencies>
<dependencies>
<!-- The following dependency needs re-declaration with the desired version
because gwt-maps-api declares it with no version specifier which may be resolved
to an incorrect version. -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<!-- This dependency is required because the GWT Maven Plugin searches
other GWT modules only in Maven dependencies -->
<groupId>com.github.branflake2267</groupId>
<artifactId>gwt-maps-api</artifactId>
<version>3.9.0-build-17</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.moxieapps.gwt</groupId>
<artifactId>org.moxieapps.gwt.highcharts</artifactId>
<version>1.6.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.domain.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt.adminconsole</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.datamining.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.datamining.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.datamining.annotations</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.polars.datamining.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.3.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<!-- This dependency is required because the GWT Maven Plugin searches
other GWT modules only in Maven dependencies -->
<groupId>com.github.branflake2267</groupId>
<artifactId>gwt-maps-api</artifactId>
<version>3.9.0-build-17</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.moxieapps.gwt</groupId>
<artifactId>org.moxieapps.gwt.highcharts</artifactId>
<version>1.6.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.domain.common</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.common</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt.theme</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt.adminconsole</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.datamining.shared</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.datamining.shared</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.datamining.annotations</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.polars.datamining.shared</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.3.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security.common</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security.ui</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<!-- GWT version detected from dependencyManagement -->
<execution>
<configuration>
<!-- <userAgents>chrome</userAgents> -->
<modules>
<module>com.sap.sailing.gwt.home.Home</module>
<module>com.sap.sailing.gwt.AutoPlay</module>
<module>com.sap.sailing.gwt.ui.AdminConsole</module>
<module>com.sap.sailing.gwt.ui.Leaderboard</module>
<module>com.sap.sailing.gwt.ui.LeaderboardEditing</module>
<module>com.sap.sailing.gwt.ui.RaceBoard</module>
<module>com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart</module>
<module>com.sap.sailing.gwt.ui.Spectator</module>
<module>com.sap.sailing.gwt.ui.DataMining</module>
<module>com.sap.sailing.gwt.ui.VideoPopup</module>
<module>com.sap.sailing.gwt.ui.YoutubePopup</module>
<module>com.sap.sailing.gwt.ui.Simulator</module>
<module>com.sap.sailing.gwt.regattaoverview.RegattaOverview</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<!-- GWT version detected from dependencyManagement -->
<execution>
<configuration>
<!-- <userAgents>chrome</userAgents> -->
<modules>
<module>com.sap.sailing.gwt.home.Home</module>
<module>com.sap.sailing.gwt.AutoPlay</module>
<module>com.sap.sailing.gwt.ui.AdminConsole</module>
<module>com.sap.sailing.gwt.ui.Leaderboard</module>
<module>com.sap.sailing.gwt.ui.LeaderboardEditing</module>
<module>com.sap.sailing.gwt.ui.RaceBoard</module>
<module>com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart</module>
<module>com.sap.sailing.gwt.ui.Spectator</module>
<module>com.sap.sailing.gwt.ui.DataMining</module>
<module>com.sap.sailing.gwt.ui.VideoPopup</module>
<module>com.sap.sailing.gwt.ui.YoutubePopup</module>
<module>com.sap.sailing.gwt.ui.Simulator</module>
<module>com.sap.sailing.gwt.regattaoverview.RegattaOverview</module>
</modules>
<!-- uncomment the following for PRETTY-printed, non-obfuscated output
format <style>PRETTY</style> -->
<gen>${basedir}/.generated</gen>
<webappDirectory>${basedir}</webappDirectory>
<warSourceDirectory>${basedir}/src/main/resources</warSourceDirectory>
<!-- Uncomment the following to obtain details split-point reports
<gen>${basedir}/.generated</gen>
<webappDirectory>${basedir}</webappDirectory>
<warSourceDirectory>${basedir}/src/main/resources</warSourceDirectory>
<!-- Uncomment the following to obtain details split-point reports
<compileReport>true</compileReport> <detailedSoyc>true</detailedSoyc> -->
</configuration>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</configuration>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>debug.no-gwt-compile</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<configuration combine.self="override">
<modules>
</modules>
</configuration>
<goals>
<goal>help</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<profiles>
<profile>
<id>debug.no-gwt-compile</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<configuration combine.self="override">
<modules>
</modules>
</configuration>
<goals>
<goal>help</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -258,8 +258,9 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
// Regatta
Label regattaForTrackingLabel = new Label(stringMessages.regattaUsedForTheTrackedRace());
regattaForTrackingLabel.setWordWrap(false);
layoutTable.setWidget(0, 0, regattaForTrackingLabel);
layoutTable.setWidget(0, 1, getAvailableRegattasListBox());
int row = 0;
layoutTable.setWidget(row, 0, regattaForTrackingLabel);
layoutTable.setWidget(row, 1, getAvailableRegattasListBox());
// Track settings (wind)
Label trackSettingsLabel = new Label(stringMessages.trackSettings() + ":");
@@ -304,12 +305,12 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
ignoreTracTracMarkPassingsCheckbox.setWordWrap(false);
ignoreTracTracMarkPassingsCheckbox.setValue(Boolean.FALSE);
layoutTable.setWidget(1, 0, trackSettingsLabel);
layoutTable.setWidget(1, 1, trackWindCheckBox);
layoutTable.setWidget(2, 1, correctWindCheckBox);
layoutTable.setWidget(3, 1, simulateAsLiveRacePanel);
layoutTable.setWidget(4, 1, simulateWithOffsetPanel);
layoutTable.setWidget(5, 1, ignoreTracTracMarkPassingsCheckbox);
layoutTable.setWidget(++row, 0, trackSettingsLabel);
layoutTable.setWidget(row, 1, trackWindCheckBox);
layoutTable.setWidget(++row, 1, correctWindCheckBox);
layoutTable.setWidget(++row, 1, simulateAsLiveRacePanel);
layoutTable.setWidget(++row, 1, simulateWithOffsetPanel);
layoutTable.setWidget(++row, 1, ignoreTracTracMarkPassingsCheckbox);
// Filter
Label racesFilterLabel = new Label(stringMessages.filterRacesByName() + ":");
@@ -331,8 +332,8 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
}
};
racesFilterablePanel.getTextBox().ensureDebugId("TrackableRacesFilterTextBox");
layoutTable.setWidget(6, 0, racesFilterLabel);
layoutTable.setWidget(6, 1, racesFilterablePanel);
layoutTable.setWidget(++row, 0, racesFilterLabel);
layoutTable.setWidget(row, 1, racesFilterablePanel);
// Races
TextColumn<TracTracRaceRecordDTO> regattaNameColumn = new TextColumn<TracTracRaceRecordDTO>() {
@@ -404,8 +405,8 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
racesTable.setSelectionModel(selectionCheckboxColumn.getSelectionModel(), selectionCheckboxColumn.getSelectionManager());
racesTable.setWidth("100%");
raceList.addDataDisplay(racesTable);
layoutTable.setWidget(6, 0, racesTable);
cellFormatter.setColSpan(6, 0, 2);
layoutTable.setWidget(++row, 0, racesTable);
cellFormatter.setColSpan(row, 0, 2);
Button startTrackingButton = new Button(stringMessages.startTracking());
startTrackingButton.ensureDebugId("StartTrackingButton");
startTrackingButton.addClickHandler(new ClickHandler() {
@@ -419,7 +420,7 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
offsetToStartTimeOfSimulatedRace, ignoreTracTracMarkPassingsCheckbox.getValue());
}
});
layoutTable.setWidget(7, 1, startTrackingButton);
layoutTable.setWidget(++row, 1, startTrackingButton);
trackableRacesPanel.setContentWidget(layoutTable);
return trackableRacesPanel;
}
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.json.simple"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
@@ -22,4 +22,26 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -130,7 +130,8 @@ public class CompetitorsResource extends AbstractSailingServerResource {
if (competitor == null) {
logger.log(Level.INFO, "Could not find competitor to store image for: " + StringEscapeUtils.escapeHtml(competitorId));
throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
.entity("Could not find competitor with id " + competitorId).type(MediaType.TEXT_PLAIN).build());
.entity("Could not find competitor with id " +
StringEscapeUtils.escapeHtml(competitorId)).type(MediaType.TEXT_PLAIN).build());
}
String fileExtension = "";
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="empty" sequenceNumber="-1"/>
-28
View File
@@ -12,32 +12,4 @@
<artifactId>com.sap.sailing.www</artifactId>
<packaging>eclipse-plugin</packaging>
<!-- Optional depedency to delay build after apk has been deployed to apps/
folder -->
<profiles>
<profile>
<!-- deactivate with parameter '-P !with-mobile' -->
<id>with-mobile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.racecommittee.app</artifactId>
<version>1.0.0-SNAPSHOT</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.tracking.app</artifactId>
<version>1.0.0-SNAPSHOT</version>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.json.simple"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
+60 -37
View File
@@ -1,40 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sse.common</artifactId>
<packaging>eclipse-plugin</packaging>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sse.common</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sap.sse.datamining.annotations"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
@@ -28,4 +28,26 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
+105
View File
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sse.gwt.theme</artifactId>
<packaging>eclipse-plugin</packaging>
<dependencies>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.common</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<!-- GWT version detected from dependencyManagement -->
<execution>
<configuration>
<extraJvmArgs>-Dgwt.persistentunitcache=false</extraJvmArgs>
<!-- <userAgents>chrome</userAgents> -->
<modules>
<module>com.sap.sse.gwt.theme.SSETheme</module>
</modules>
<gen>${basedir}/.generated</gen>
<localWorkers>7</localWorkers>
<webappDirectory>${basedir}</webappDirectory>
</configuration>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>debug.no-gwt-compile</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<configuration combine.self="override">
<modules>
</modules>
</configuration>
<goals>
<goal>help</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -78,7 +78,8 @@ public class ReplicationMasterDescriptorImpl implements ReplicationMasterDescrip
UnsupportedEncodingException {
return new URL("http", getHostname(), servletPort, REPLICATION_SERVLET + "?" + ReplicationServlet.ACTION + "="
+ ReplicationServlet.Action.REGISTER.name() + "&" + ReplicationServlet.SERVER_UUID + "="
+ uuid.toString() + "&" + ReplicationServlet.ADDITIONAL_INFORMATION + "="
+ java.net.URLEncoder.encode(uuid.toString(), "UTF-8") + "&"
+ ReplicationServlet.ADDITIONAL_INFORMATION + "="
+ java.net.URLEncoder.encode(ServerInfo.getBuildVersion(), "UTF-8"));
}
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sap.sse.security.common"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
+22 -1
View File
@@ -28,5 +28,26 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -45,7 +45,11 @@ public class SimpleSecurityReplicationTest extends AbstractSecurityReplicationTe
final String newEmail = "ernie2@sesame-street.com";
final String password = "BertMyFriend";
final String validationBaseURL = "http://me.to.back.com";
final String fullName = "Ernie's Full Name";
final String company = "Ernie's Company";
User user = master.createSimpleUser(username, email, password, validationBaseURL);
user.setFullName(fullName);
user.setCompany(company);
final String emailValidationSecretAfterCreation = user.getValidationSecret();
master.updateSimpleUserEmail(username, newEmail, validationBaseURL);
final String emailValidationSecretAfterChangingEmail = user.getValidationSecret();
@@ -60,6 +64,8 @@ public class SimpleSecurityReplicationTest extends AbstractSecurityReplicationTe
assertEquals(username, replicatedErnie.getName());
assertEquals(newEmail, replicatedErnie.getEmail());
assertEquals(emailValidationSecretAfterChangingEmail, replicatedErnie.getValidationSecret());
assertEquals(fullName, replicatedErnie.getFullName());
assertEquals(company, replicatedErnie.getCompany());
}
@Test
+4 -4
View File
@@ -25,25 +25,25 @@
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.gwt</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
</dependencies>
@@ -31,6 +31,8 @@ public interface UserManagementService extends RemoteService {
void updateSimpleUserEmail(String username, String newEmail, String validationBaseURL) throws UserManagementException, MailException;
void updateUserProperties(String username, String fullName, String company) throws UserManagementException;
void resetPassword(String username, String eMailAddress, String baseURL) throws UserManagementException, MailException;
boolean validateEmail(String username, String validationSecret) throws UserManagementException;
@@ -27,6 +27,8 @@ public interface UserManagementServiceAsync {
void updateSimpleUserEmail(String username, String newEmail, String validationBaseURL, AsyncCallback<Void> callback);
void updateUserProperties(String username, String fullName, String company, AsyncCallback<Void> callback);
void getFilteredSortedUserList(String filter, AsyncCallback<Collection<UserDTO>> callback);
void setRolesForUser(String username, Iterable<String> roles, AsyncCallback<SuccessInfo> callback);
@@ -163,6 +163,17 @@ public class UserManagementServiceImpl extends RemoteServiceServlet implements U
}
}
@Override
public void updateUserProperties(final String username, String fullName, String company) throws UserManagementException {
final Subject subject = SecurityUtils.getSubject();
// the signed-in subject has role ADMIN or is changing own user
if (subject.hasRole(DefaultRoles.ADMIN.getRolename()) || username.equals(subject.getPrincipal().toString())) {
getSecurityService().updateUserProperties(username, fullName, company);
} else {
throw new UserManagementException(UserManagementException.INVALID_CREDENTIALS);
}
}
@Override
public void updateSimpleUserEmail(String username, String newEmail, String validationBaseURL) throws UserManagementException, MailException {
final Subject subject = SecurityUtils.getSubject();
@@ -288,7 +299,8 @@ public class UserManagementServiceImpl extends RemoteServiceServlet implements U
break;
}
}
userDTO = new UserDTO(user.getName(), user.getEmail(), user.isEmailValidated(), accountDTOs, user.getRoles(), user.getPermissions());
userDTO = new UserDTO(user.getName(), user.getEmail(), user.getFullName(), user.getCompany(),
user.isEmailValidated(), accountDTOs, user.getRoles(), user.getPermissions());
return userDTO;
}
@@ -14,6 +14,8 @@ import com.sap.sse.security.shared.WildcardPermission;
public class UserDTO implements IsSerializable {
private String name;
private String email;
private String fullName;
private String company;
private List<AccountDTO> accounts;
private Set<String> roles;
private Set<WildcardPermission> permissions;
@@ -21,9 +23,12 @@ public class UserDTO implements IsSerializable {
UserDTO() {} // for serialization only
public UserDTO(String name, String email, boolean emailValidated, List<AccountDTO> accounts, Iterable<String> roles, Iterable<String> stringPermissions) {
public UserDTO(String name, String email, String fullName, String company, boolean emailValidated,
List<AccountDTO> accounts, Iterable<String> roles, Iterable<String> stringPermissions) {
this.name = name;
this.email = email;
this.fullName = fullName;
this.company = company;
this.emailValidated = emailValidated;
this.accounts = accounts;
this.roles = new HashSet<>();
@@ -38,6 +43,14 @@ public class UserDTO implements IsSerializable {
return name;
}
public String getFullName() {
return fullName;
}
public String getCompany() {
return company;
}
public Iterable<String> getRoles() {
return roles;
}
@@ -183,7 +183,7 @@ public class UserStoreImpl implements UserStore {
throw new UserManagementException(UserManagementException.USER_ALREADY_EXISTS);
}
User user = new User(name, email, accounts);
logger.info("Creating user: " + user);
logger.info("Creating user: " + user + " with e-mail "+email);
if (mongoObjectFactory != null) {
mongoObjectFactory.storeUser(user);
}
@@ -62,8 +62,10 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
}
private User loadUser(DBObject userDBObject) {
String name = (String) userDBObject.get(FieldNames.User.NAME.name());
String email = (String) userDBObject.get(FieldNames.User.EMAIL.name());
final String name = (String) userDBObject.get(FieldNames.User.NAME.name());
final String email = (String) userDBObject.get(FieldNames.User.EMAIL.name());
final String fullName = (String) userDBObject.get(FieldNames.User.FULLNAME.name());
final String company = (String) userDBObject.get(FieldNames.User.COMPANY.name());
Boolean emailValidated = (Boolean) userDBObject.get(FieldNames.User.EMAIL_VALIDATED.name());
String passwordResetSecret = (String) userDBObject.get(FieldNames.User.PASSWORD_RESET_SECRET.name());
String validationSecret = (String) userDBObject.get(FieldNames.User.VALIDATION_SECRET.name());
@@ -83,7 +85,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
}
DBObject accountsMap = (DBObject) userDBObject.get(FieldNames.User.ACCOUNTS.name());
Map<AccountType, Account> accounts = createAccountMapFromdDBObject(accountsMap);
User result = new User(name, email, emailValidated==null?false:emailValidated, passwordResetSecret, validationSecret, accounts.values());
User result = new User(name, email, fullName, company, emailValidated==null?false:emailValidated, passwordResetSecret, validationSecret, accounts.values());
for (String role : roles) {
result.addRole(role);
}
@@ -4,6 +4,8 @@ public class FieldNames {
public static enum User {
NAME,
FULLNAME,
COMPANY,
EMAIL,
ACCOUNTS,
ROLES, PERMISSIONS,
@@ -38,6 +38,8 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
DBObject query = new BasicDBObject(FieldNames.User.NAME.name(), user.getName());
dbUser.put(FieldNames.User.NAME.name(), user.getName());
dbUser.put(FieldNames.User.EMAIL.name(), user.getEmail());
dbUser.put(FieldNames.User.FULLNAME.name(), user.getFullName());
dbUser.put(FieldNames.User.COMPANY.name(), user.getCompany());
dbUser.put(FieldNames.User.EMAIL_VALIDATED.name(), user.isEmailValidated());
dbUser.put(FieldNames.User.PASSWORD_RESET_SECRET.name(), user.getPasswordResetSecret());
dbUser.put(FieldNames.User.VALIDATION_SECRET.name(), user.getValidationSecret());
@@ -18,7 +18,6 @@ Import-Package: com.sap.sse.util,
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Require-Bundle: javax.servlet;bundle-version="2.5.0",
com.google.gwt.osgi,
slf4j.api;bundle-version="1.6.4",
org.json.simple,
com.sun.jersey,
@@ -1,93 +1,65 @@
package com.sap.sse.security;
import com.google.gwt.safehtml.shared.UriUtils;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.Window.Location;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class ClientUtils
{
private final static String SESSION_ID_COOKIE = "gwtgoogleoauthtest_session_id";
private final static String AUTH_PROVIDER_COOKIE = "gwtgoogleoauthtest_provider";
private final static String AUTH_PROVIDER_NAME_COOKIE = "gwtgoogleoauthtest_provider_name";
private final static String USERNAME_COOKIE = "gwtgoogleoauthtest_user";
private final static String REDIRECT_URL_COOKIE = "gwtgoogleoauthtest_redirect_url";
public final static int DIALOG_X_POSITION = 20;
public final static int DIALOG_Y_POSITION = 110;
public class ClientUtils {
// Callback URL is registered with each OAuth Provider
//private static final String APP_CALLBACK_URL = "http://oauthdemo2012.com:8888/GWTOAuthLoginDemo.html";
//http://127.0.0.1:8888/GWTOAuthLoginDemo.html?gwt.codesvr=127.0.0.1:9997&
private static final String APP_CALLBACK_URL = "http://local.sapsailing.com:8888/security/ui/redirect?redirectTo=oauthlogin";
private static final String FACEBOOK_PROTECTED_RESOURCE_URL = "https://graph.facebook.com/me";
private static final String GOOGLE_PROTECTED_RESOURSE_URL = "https://www.googleapis.com/oauth2/v1/userinfo";
private static final String TWITTER_PROTECTED_RESOURCE_URL = "https://api.twitter.com/1/account/verify_credentials.json";
// private static final String APP_CALLBACK_URL = "http://oauthdemo2012.com:8888/GWTOAuthLoginDemo.html";
// http://127.0.0.1:8888/GWTOAuthLoginDemo.html?gwt.codesvr=127.0.0.1:9997&
private static final String APP_CALLBACK_URL = "http://local.sapsailing.com:8888/security/ui/redirect?redirectTo=oauthlogin";
private static final String FACEBOOK_PROTECTED_RESOURCE_URL = "https://graph.facebook.com/me";
private static final String GOOGLE_PROTECTED_RESOURSE_URL = "https://www.googleapis.com/oauth2/v1/userinfo";
private static final String TWITTER_PROTECTED_RESOURCE_URL = "https://api.twitter.com/1/account/verify_credentials.json";
// %s is guid and the caller must replace
private static final String YAHOO_PROTECTED_RESOURCE_URL = "http://social.yahooapis.com/v1/user/%s/profile?format=json";
private static final String LINKEDIN_PROTECTED_RESOURCE_URL = "http://api.linkedin.com/v1/people/~?format=json";
private static final String YAHOO_PROTECTED_RESOURCE_URL = "http://social.yahooapis.com/v1/user/%s/profile?format=json";
private static final String LINKEDIN_PROTECTED_RESOURCE_URL = "http://api.linkedin.com/v1/people/~?format=json";
// %s is userId and acess token and the caller must replace
private static final String INSTAGRAM_PROTECTED_RESOURCE_URL = "https://api.instagram.com/v1/users/%s/?access_token=%s";
private static final String IMGUR_PROTECTED_RESOURCE_URL = "http://api.imgur.com/2/account.json";
private static final String GITHUB_PROTECTED_RESOURCE_URL = "https://api.github.com/user?access_token=%s";
private static final String LIVE_PROTECTED_RESOURCE_URL = "https://apis.live.net/v5.0/me";
private static final String FLICKR_PROTECTED_RESOURCE_URL = "http://api.flickr.com/services/rest?format=json&nojsoncallback=1&method=flickr.test.login";
private static final String VIMEO_PROTECTED_RESOURCE_URL = "http://vimeo.com/api/rest/v2?format=json&method=vimeo.people.getInfo";
private static final String TUMBLR_PROTECTED_RESOURCE_URL = "https://api.tumblr.com/v2/user/info";
private static final String IMGUR_PROTECTED_RESOURCE_URL = "http://api.imgur.com/2/account.json";
private static final String GITHUB_PROTECTED_RESOURCE_URL = "https://api.github.com/user?access_token=%s";
private static final String LIVE_PROTECTED_RESOURCE_URL = "https://apis.live.net/v5.0/me";
private static final String FLICKR_PROTECTED_RESOURCE_URL = "http://api.flickr.com/services/rest?format=json&nojsoncallback=1&method=flickr.test.login";
private static final String VIMEO_PROTECTED_RESOURCE_URL = "http://vimeo.com/api/rest/v2?format=json&method=vimeo.people.getInfo";
private static final String TUMBLR_PROTECTED_RESOURCE_URL = "https://api.tumblr.com/v2/user/info";
// caller must replace %s with access token
private static final String FOURSQUARE_PROTECTED_RESOURCE_URL = "https://api.foursquare.com/v2/users/self?oauth_token=%s";
public static final String SESSION_EXPIRED_MESSAGE = "Session has expired";
private static String[] authProviders =
{
"Facebook", "Google", "Twitter", "Yahoo!",
"Flickr", "ImaGur", "LinkedIn", "Windows Live",
"Instagram","github", "Vimeo", "Evernote",
"tumblr.", "foursquare",
};
public final static int UNKNOWN = -1;
public final static int DEFAULT = 0;
public final static int FACEBOOK = 1;
public final static int GOOGLE = 2;
public final static int TWITTER = 3;
public final static int YAHOO = 4;
public final static int FLICKR = 5;
public final static int IMGUR = 6;
public final static int LINKEDIN = 7;
private static String[] authProviders = { "Facebook", "Google", "Twitter", "Yahoo!", "Flickr", "ImaGur",
"LinkedIn", "Windows Live", "Instagram", "github", "Vimeo", "Evernote", "tumblr.", "foursquare", };
public final static int UNKNOWN = -1;
public final static int DEFAULT = 0;
public final static int FACEBOOK = 1;
public final static int GOOGLE = 2;
public final static int TWITTER = 3;
public final static int YAHOO = 4;
public final static int FLICKR = 5;
public final static int IMGUR = 6;
public final static int LINKEDIN = 7;
public final static int WINDOWS_LIVE = 8;
public final static int INSTAGRAM = 9;
public final static int GITHUB = 10;
public final static int VIMEO = 11;
public final static int EVERNOTE = 12;
public final static int TUMBLR = 13;
public final static int FOURSQUARE = 14;
public static String[] getAuthProviders()
{
public final static int INSTAGRAM = 9;
public final static int GITHUB = 10;
public final static int VIMEO = 11;
public final static int EVERNOTE = 12;
public final static int TUMBLR = 13;
public final static int FOURSQUARE = 14;
public static String[] getAuthProviders() {
return authProviders;
}
public static int getAuthProvider(String authProviderName)
{
}
public static int getAuthProvider(String authProviderName) {
int authProvider = DEFAULT;
authProviderName = authProviderName.toLowerCase();
if (authProviderName.equals("facebook"))
@@ -120,12 +92,11 @@ public class ClientUtils
return TUMBLR;
else if (authProviderName.equals("foursquare"))
return FOURSQUARE;
return authProvider;
}
public static String getAuthProviderName(int authProvider)
{
public static String getAuthProviderName(int authProvider) {
if (authProvider == FACEBOOK)
return "Facebook";
else if (authProvider == GOOGLE)
@@ -154,288 +125,71 @@ public class ClientUtils
return "tumblr.";
else if (authProvider == FOURSQUARE)
return "foursquare";
return "Default";
}
public static String getCallbackUrl()
{
public static String getCallbackUrl() {
return APP_CALLBACK_URL;
}
public static String getProctedResourceUrl(int authProvider)
{
switch(authProvider)
{
case FACEBOOK:
{
return FACEBOOK_PROTECTED_RESOURCE_URL;
}
case GOOGLE:
{
return GOOGLE_PROTECTED_RESOURSE_URL;
}
case TWITTER:
{
return TWITTER_PROTECTED_RESOURCE_URL;
}
case YAHOO:
{
return YAHOO_PROTECTED_RESOURCE_URL;
}
case LINKEDIN:
{
return LINKEDIN_PROTECTED_RESOURCE_URL;
}
case INSTAGRAM:
{
return INSTAGRAM_PROTECTED_RESOURCE_URL;
}
case IMGUR:
{
return IMGUR_PROTECTED_RESOURCE_URL;
}
case GITHUB:
{
return GITHUB_PROTECTED_RESOURCE_URL;
}
case FLICKR:
{
return FLICKR_PROTECTED_RESOURCE_URL;
}
case VIMEO:
{
return VIMEO_PROTECTED_RESOURCE_URL;
}
case WINDOWS_LIVE:
{
return LIVE_PROTECTED_RESOURCE_URL;
}
case TUMBLR:
{
return TUMBLR_PROTECTED_RESOURCE_URL;
}
case FOURSQUARE:
{
return FOURSQUARE_PROTECTED_RESOURCE_URL;
}
default:
{
return null;
}
public static String getProctedResourceUrl(int authProvider) {
switch (authProvider) {
case FACEBOOK: {
return FACEBOOK_PROTECTED_RESOURCE_URL;
}
}
public static void clearCookies()
{
Cookies.removeCookie(SESSION_ID_COOKIE);
Cookies.removeCookie(AUTH_PROVIDER_COOKIE);
Cookies.removeCookie(AUTH_PROVIDER_NAME_COOKIE);
Cookies.removeCookie(USERNAME_COOKIE);
Cookies.removeCookie(REDIRECT_URL_COOKIE);
}
public static String getSessionIdFromCookie()
{
return Cookies.getCookie(SESSION_ID_COOKIE);
}
public static String getAuthProviderFromCookie()
{
return Cookies.getCookie(AUTH_PROVIDER_COOKIE);
}
public static int getAuthProviderFromCookieAsInt()
{
String authProviderStr = getAuthProviderFromCookie();
int authProvider = UNKNOWN;
if (authProviderStr != null)
{
try
{
authProvider = Integer.parseInt(authProviderStr);
}
catch(NumberFormatException e)
{
return UNKNOWN;
}
}
return authProvider;
}
public static String getAuthProviderNameFromCookie()
{
return Cookies.getCookie(AUTH_PROVIDER_NAME_COOKIE);
}
public static String getUsernameFromCookie()
{
return Cookies.getCookie(USERNAME_COOKIE);
}
public static boolean alreadyLoggedIn()
{
if (getSessionIdFromCookie() != null)
return true;
return false;
}
public static void saveSessionId(String sessionId)
{
Cookies.setCookie(SESSION_ID_COOKIE,sessionId);
}
public static void saveAuthProvider(int authProvider)
{
Cookies.setCookie(AUTH_PROVIDER_COOKIE,Integer.toString(authProvider));
String authProviderName = getAuthProviderName(authProvider);
saveAuthProviderName(authProviderName);
}
public static void saveAuthProviderName(String authProviderName)
{
Cookies.setCookie(AUTH_PROVIDER_NAME_COOKIE,authProviderName);
}
public static void saveUsername(String username)
{
Cookies.setCookie(USERNAME_COOKIE,username);
}
public static void saveRediretUrl(String url)
{
Cookies.setCookie(REDIRECT_URL_COOKIE,url);
}
public static String getRedirectUrlFromCookie()
{
return Cookies.getCookie(REDIRECT_URL_COOKIE);
}
public static void redirect(String url)
{
Window.Location.assign(UriUtils.fromString(url).asString());
}
public static boolean redirected()
{
String authProvider = getAuthProviderFromCookie();
if (authProvider == null)
{
return false;
}
if (Location.getParameter("code") != null) //facebook,google,github,windows live
return true;
if (Location.getParameter("oauth_token") != null) // twitter,yahoo,flickr
return true;
if (Location.getParameter("oauth_verifier") != null) // Flickr
return true;
String error = Location.getParameter("error");
if (error != null)
{
String errorMessage = Location.getParameter("error_description");
Window.alert("Error: " + error + ":" + errorMessage);
reload();
return false;
}
return false;
}
public static void reload()
{
String appUrl = getRedirectUrlFromCookie();
// int savedAuthProvider = getAuthProviderFromCookieAsInt();
clearCookies();
// if (savedAuthProvider == DEFAULT || savedAuthProvider == UNKNOWN)
// {
// GWTOAuthLoginDemo.get().updateLoginStatus();
// }
if (appUrl != null)
{
redirect(appUrl);
}
}
public static void handleException(Throwable caught)
{
if (caught.getMessage().equals(ClientUtils.SESSION_EXPIRED_MESSAGE))
{
showSessionExpires();
}
else
{
showGenericException(caught);
case GOOGLE: {
return GOOGLE_PROTECTED_RESOURSE_URL;
}
case TWITTER: {
return TWITTER_PROTECTED_RESOURCE_URL;
}
case YAHOO: {
return YAHOO_PROTECTED_RESOURCE_URL;
}
case LINKEDIN: {
return LINKEDIN_PROTECTED_RESOURCE_URL;
}
case INSTAGRAM: {
return INSTAGRAM_PROTECTED_RESOURCE_URL;
}
case IMGUR: {
return IMGUR_PROTECTED_RESOURCE_URL;
}
case GITHUB: {
return GITHUB_PROTECTED_RESOURCE_URL;
}
case FLICKR: {
return FLICKR_PROTECTED_RESOURCE_URL;
}
case VIMEO: {
return VIMEO_PROTECTED_RESOURCE_URL;
}
case WINDOWS_LIVE: {
return LIVE_PROTECTED_RESOURCE_URL;
}
case TUMBLR: {
return TUMBLR_PROTECTED_RESOURCE_URL;
}
case FOURSQUARE: {
return FOURSQUARE_PROTECTED_RESOURCE_URL;
}
default: {
return null;
}
}
}
public static void showSessionExpires()
{
Window.alert("Your session seems to have expired!\n" + "You will be logged out");
ClientUtils.reload();
}
public static void showGenericException(Throwable caught)
{
String message = "Exception: " + caught;
caught.printStackTrace();
message += "\n";
message += "Please Logout/reload the application";
//String st = LogUtil.stackTraceToString(caught);
//message += "Stack Trace:\n" + st;
Window.alert(message);
}
public static void logout()
{
// final String sessionId = ClientUtils.getSessionIdFromCookie();
new AsyncCallback<Void>()
{
@Override
public void onFailure(Throwable caught)
{
ClientUtils.reload(); // reload anyway otherwise we're toast! we will never be able to log out
}
@Override
public void onSuccess(Void result)
{
// GWTOAuthLoginDemo.get().log("Logged out.. clearing cookies");
// GWTOAuthLoginDemo.get().log("Redirecting to site url");
ClientUtils.reload();
}
// @Override
// protected void callService(AsyncCallback<Void> cb)
// {
// OAuthLoginService.Util.getInstance().logout(sessionId,cb);
// }
};
}
}
@@ -7,6 +7,7 @@ import javax.servlet.ServletContext;
import org.apache.shiro.cache.CacheManager;
import org.apache.shiro.mgt.SecurityManager;
import org.osgi.framework.BundleContext;
import com.sap.sse.common.mail.MailException;
import com.sap.sse.replication.impl.ReplicableWithObjectInputStream;
@@ -16,6 +17,14 @@ import com.sap.sse.security.shared.DefaultRoles;
import com.sap.sse.security.shared.SocialUserAccount;
import com.sap.sse.security.shared.UserManagementException;
/**
* A service interface for security management. Intended to be used as an OSGi service that can be registered, e.g., by
* {@link BundleContext#registerService(Class, Object, java.util.Dictionary)} and can be discovered by other bundles.
*
* @author Axel Uhl (D043530)
* @author Benjamin Ebling
*
*/
public interface SecurityService extends ReplicableWithObjectInputStream<ReplicableSecurityService, SecurityOperation<?>> {
SecurityManager getSecurityManager();
@@ -47,6 +56,8 @@ public interface SecurityService extends ReplicableWithObjectInputStream<Replica
void updateSimpleUserPassword(String name, String newPassword) throws UserManagementException;
void updateSimpleUserEmail(String username, String newEmail, String validationBaseURL) throws UserManagementException;
void updateUserProperties(String username, String fullName, String company) throws UserManagementException;
User createSocialUser(String username, SocialUserAccount socialUserAccount) throws UserManagementException;
@@ -17,10 +17,12 @@ public class SessionUtils {
public static final String SESSION_AUTH_PROVIDER = "GWTOAuthLoginDemo_auth_provider";
public static final String SOCIAL_USER = "Social_User";
public static final String SESSION_EXPIRED_MESSAGE = "Session has expired";
public static void saveRequestTokenToSession(Token requestToken) throws Exception {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new Exception(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new Exception(SESSION_EXPIRED_MESSAGE);
}
/*
* ServersideSession sss = getServersideSession(); if (sss == null) { sss = new ServersideSession();
@@ -33,7 +35,7 @@ public class SessionUtils {
public static void saveStateToSession(String state) throws Exception {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new Exception(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new Exception(SESSION_EXPIRED_MESSAGE);
}
/*
* ServersideSession sss = getServersideSession(); if (sss == null) { sss = new ServersideSession();
@@ -45,7 +47,7 @@ public class SessionUtils {
public static String getProtectedResourceUrlFromSession() throws OAuthException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new OAuthException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new OAuthException(SESSION_EXPIRED_MESSAGE);
}
/*
* ServersideSession sss = getServersideSession(); if (sss != null) return sss.getProtectedResourceUrl();
@@ -58,7 +60,7 @@ public class SessionUtils {
public static String getStateFromSession() throws Exception {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new Exception(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new Exception(SESSION_EXPIRED_MESSAGE);
}
/*
* ServersideSession sss = getServersideSession(); if (sss != null) return sss.getState();
@@ -71,7 +73,7 @@ public class SessionUtils {
public static String getSessionIdFromSession() throws OAuthException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new OAuthException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new OAuthException(SESSION_EXPIRED_MESSAGE);
}
/*
* ServersideSession sss = getServersideSession(); if (sss != null) return sss.getSessionId();
@@ -84,7 +86,7 @@ public class SessionUtils {
public static Token getAccessTokenFromSession() throws OAuthException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new OAuthException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new OAuthException(SESSION_EXPIRED_MESSAGE);
}
/*
* ServersideSession sss = getServersideSession(); if (sss != null) { return sss.getAccessToken(); } return
@@ -97,7 +99,7 @@ public class SessionUtils {
public static int getAuthProviderFromSession() throws OAuthException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new OAuthException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new OAuthException(SESSION_EXPIRED_MESSAGE);
}
/*
* ServersideSession sss = getServersideSession(); if (sss != null) return sss.getAuthProvider();
@@ -116,7 +118,7 @@ public class SessionUtils {
public static void saveSessionIdToSession(String sessionId) throws AuthenticationException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new AuthenticationException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new AuthenticationException(SESSION_EXPIRED_MESSAGE);
}
session.setAttribute(SESSION_ID, sessionId);
}
@@ -124,7 +126,7 @@ public class SessionUtils {
public static void saveProtectedResourceUrlToSession(String url) throws AuthenticationException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new AuthenticationException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new AuthenticationException(SESSION_EXPIRED_MESSAGE);
}
session.setAttribute(SESSION_PROTECTED_URL, url);
}
@@ -132,7 +134,7 @@ public class SessionUtils {
public static void saveAuthProviderToSession(int authProvider) throws AuthenticationException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new AuthenticationException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new AuthenticationException(SESSION_EXPIRED_MESSAGE);
}
session.setAttribute(SESSION_AUTH_PROVIDER, authProvider);
}
@@ -140,7 +142,7 @@ public class SessionUtils {
public static void saveAccessTokenToSession(Token accessToken) throws AuthenticationException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new AuthenticationException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new AuthenticationException(SESSION_EXPIRED_MESSAGE);
}
session.setAttribute(SESSION_ACCESS_TOKEN, accessToken);
}
@@ -148,7 +150,7 @@ public class SessionUtils {
public static void saveYahooGuidToSession(String guid) throws AuthenticationException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new AuthenticationException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new AuthenticationException(SESSION_EXPIRED_MESSAGE);
}
session.setAttribute(SESSION_YAHOO_GUID, guid);
}
@@ -156,7 +158,7 @@ public class SessionUtils {
public static String getYahooGuidFromSession() throws AuthenticationException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new AuthenticationException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new AuthenticationException(SESSION_EXPIRED_MESSAGE);
}
return (String) session.getAttribute(SESSION_YAHOO_GUID);
}
@@ -164,7 +166,7 @@ public class SessionUtils {
public static Token getRequestTokenFromSession() throws AuthenticationException {
Session session = SecurityUtils.getSubject().getSession();
if (session == null) {
throw new AuthenticationException(ClientUtils.SESSION_EXPIRED_MESSAGE);
throw new AuthenticationException(SESSION_EXPIRED_MESSAGE);
}
return (Token) session.getAttribute(SESSION_REQUEST_TOKEN);
}
@@ -20,8 +20,22 @@ import com.sap.sse.security.shared.Account.AccountType;
public class User implements Named, WithID {
private static final long serialVersionUID = 1788215575606546042L;
/**
* The ID for this user; usually a nickname or short name. Implements the {@link WithID} key
*/
private String name;
/**
* An optional clear-text user name, used to address the user, e.g., in the UI ("Hello ...")
*/
private String fullName;
/**
* An optional company affiliation. May be used, e.g., to better understand the statistics of
* corporate vs. private users, if used as a marketing tool.
*/
private String company;
private String email;
/**
@@ -52,13 +66,16 @@ public class User implements Named, WithID {
}
public User(String name, String email, Collection<Account> accounts) {
this(name, email, /* is email validated */ false, /* password reset secret */ null, /* validation secret */ null, accounts);
this(name, email, /* fullName */ null, /* company */ null, /* is email validated */ false,
/* password reset secret */ null, /* validation secret */ null, accounts);
}
public User(String name, String email, Boolean emailValidated, String passwordResetSecret, String validationSecret,
Collection<Account> accounts) {
public User(String name, String email, String fullName, String company, Boolean emailValidated,
String passwordResetSecret, String validationSecret, Collection<Account> accounts) {
super();
this.name = name;
this.fullName = fullName;
this.company = company;
this.roles = new HashSet<>();
this.permissions = new HashSet<>();
this.email = email;
@@ -87,6 +104,22 @@ public class User implements Named, WithID {
this.name = name;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public Iterable<String> getRoles() {
return roles;
}
@@ -62,7 +62,6 @@ import org.scribe.builder.api.YahooApi;
import org.scribe.model.Token;
import org.scribe.oauth.OAuthService;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.sap.sse.common.Util;
import com.sap.sse.common.mail.MailException;
import com.sap.sse.mail.MailService;
@@ -90,10 +89,7 @@ import com.sap.sse.security.shared.UserManagementException;
import com.sap.sse.security.shared.UsernamePasswordAccount;
import com.sap.sse.util.ClearStateTestSupport;
public class SecurityServiceImpl extends RemoteServiceServlet implements ReplicableSecurityService, ClearStateTestSupport {
private static final long serialVersionUID = -3490163216601311858L;
public class SecurityServiceImpl implements ReplicableSecurityService, ClearStateTestSupport {
private static final Logger logger = Logger.getLogger(SecurityServiceImpl.class.getName());
private CachingSecurityManager securityManager;
@@ -390,6 +386,21 @@ public class SecurityServiceImpl extends RemoteServiceServlet implements Replica
apply(s->s.internalStoreUser(user));
}
@Override
public void updateUserProperties(String username, String fullName, String company) throws UserManagementException {
final User user = store.getUserByName(username);
if (user == null) {
throw new UserManagementException(UserManagementException.USER_DOES_NOT_EXIST);
}
updateUserProperties(user, fullName, company);
}
private void updateUserProperties(User user, String fullName, String company) {
user.setFullName(fullName);
user.setCompany(company);
apply(s->s.internalStoreUser(user));
}
@Override
public boolean checkPassword(String username, String password) throws UserManagementException {
final User user = store.getUserByName(username);
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sap.sse.shared.android"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
+22
View File
@@ -22,4 +22,26 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
+8
View File
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.json.simple"
android:versionCode="1"
android:versionName="1.1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
+62 -38
View File
@@ -1,40 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.json.simple</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.json.simple</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<phase>generate-sources</phase>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-mobile</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Executable → Regular
+443 -306
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
@@ -13,132 +13,17 @@
<packaging>pom</packaging>
<modules>
<module>com.sap.sse</module>
<!-- By default, only the modules are added that are always needed.
These are the module that are needed for both backend and Android builds.
To add additional modules for the backend build, there is a specific profile. -->
<module>com.sap.sse.common</module>
<module>com.sap.sse.shared.android</module>
<module>com.sap.sse.mail</module>
<module>com.sap.sse.mail.replication.test</module>
<module>com.sap.sse.mail.replication.testsupport</module>
<module>com.sap.sse.mongodb</module>
<module>com.sap.sse.gwt</module>
<module>com.sap.sse.gwt.adminconsole</module>
<module>com.sap.sse.datamining</module>
<module>com.sap.sse.datamining.annotations</module>
<module>com.sap.sse.datamining.shared</module>
<module>com.sap.sse.security</module>
<module>com.sap.sse.security.common</module>
<module>com.sap.sse.security.ui</module>
<module>com.sap.sse.security.userstore.mongodb</module>
<module>com.sap.sse.operationaltransformation</module>
<module>com.sap.sse.replication</module>
<module>com.sap.sse.threadmanager</module>
<module>com.sap.sse.filestorage</module>
<module>org.json.simple</module>
<module>com.sap.sailing.domain.common</module>
<module>com.sap.sailing.domain.shared.android</module>
<module>com.sap.sailing.domain</module>
<module>com.sap.sailing.geocoding</module>
<module>com.sap.sailing.datamining</module>
<module>com.sap.sailing.datamining.shared</module>
<module>com.sap.sailing.domain.persistence</module>
<module>com.sap.sailing.domain.deckmanadapter</module>
<module>com.sap.sailing.domain.tractracadapter</module>
<module>com.sap.sailing.domain.tractracadapter.persistence</module>
<module>com.sap.sailing.domain.igtimiadapter</module>
<module>com.sap.sailing.domain.igtimiadapter.persistence</module>
<module>com.sap.sailing.domain.racelogtrackingadapter</module>
<module>com.sap.sailing.domain.racelogtrackingadapter.testsupport</module>
<module>com.sap.sailing.domain.swisstimingadapter</module>
<module>com.sap.sailing.domain.swisstimingadapter.persistence</module>
<module>com.sap.sailing.domain.swisstimingreplayadapter</module>
<module>com.sap.sailing.news</module>
<module>com.sap.sailing.declination</module>
<module>com.sap.sailing.udpconnector</module>
<module>com.sap.sailing.expeditionconnector</module>
<module>com.sap.sailing.server</module>
<module>com.sap.sailing.server.gateway</module>
<module>com.sap.sailing.server.gateway.serialization</module>
<module>com.sap.sailing.server.gateway.serialization.shared.android</module>
<module>com.sap.sailing.www</module>
<module>com.sap.sailing.www.events</module>
<module>com.sap.sailing.xmlexport</module>
<module>com.google.gwt.dev</module>
<module>com.google.gwt.osgi</module>
<module>com.tractrac.clientmodule</module>
<module>org.json.simple</module>
<module>com.googlecode.java-diff-utils</module>
<module>com.googlecode.mgwt</module>
<module>com.sap.sailing.dashboards.gwt</module>
<module>com.sap.sailing.feature</module>
<module>org.moxieapps.gwt.highcharts</module>
<module>com.sap.sailing.resultimport</module>
<module>com.sap.sailing.kiworesultimport</module>
<module>com.sap.sailing.ess40.resultimport</module>
<module>com.sap.sailing.xrr.schema</module>
<module>com.sap.sailing.xrr.resultimport</module>
<module>com.sap.sailing.xrr.structureimport</module>
<module>com.sap.sailing.freg.resultimport</module>
<module>org.openqa.selenium.osgi</module>
<module>com.sap.sailing.monitoring</module>
<module>com.sap.sailing.simulator</module>
<module>com.sap.sailing.server.trackfiles</module>
<module>com.sap.sailing.feature.runtime</module>
<module>com.sap.sailing.gwt.ui</module>
<module>com.sap.sailing.domain.test</module>
<module>com.sap.sse.replication.testsupport</module>
<!-- The following test fragment doesn't yet do what it should in the Maven context... -->
<module>com.sap.sse.gwt.test</module>
<!-- -->
<module>com.sap.sse.datamining.test</module>
<module>com.sap.sse.security.replication.test</module>
<module>com.sap.sse.security.test</module>
<module>com.sap.sse.operationaltransformation.test</module>
<module>com.sap.sse.common.test</module>
<module>com.sap.sse.filestorage.test</module>
<module>com.sap.sailing.datamining.test</module>
<module>com.sap.sailing.domain.deckmanadapter.test</module>
<module>com.sap.sailing.domain.igtimiadapter.test</module>
<module>com.sap.sailing.domain.racelogtrackingadapter.test</module>
<module>com.sap.sailing.xmlexport.test</module>
<module>com.sap.sailing.xrr.resultimport.test</module>
<module>com.sap.sailing.domain.shared.android.test</module>
<module>com.sap.sailing.geocoding.test</module>
<module>com.sap.sailing.domain.swisstimingadapter.test</module>
<module>com.sap.sailing.domain.swisstimingreplayadapter.test</module>
<module>com.sap.sailing.declination.test</module>
<module>com.sap.sailing.expeditionconnector.test</module>
<module>com.sap.sailing.server.test</module>
<module>com.sap.sailing.server.gateway.test</module>
<module>com.sap.sailing.server.gateway.test.support</module>
<module>com.sap.sailing.server.gateway.serialization.test</module>
<module>com.sap.sailing.server.replication.test</module>
<module>com.sap.sailing.gwt.ui.test</module>
<module>com.sap.sailing.mongodb.test</module>
<module>com.googlecode.java-diff-utils.test</module>
<module>com.sap.sailing.kiworesultimport.test</module>
<module>com.sap.sailing.ess40.resultimport.test</module>
<module>com.sap.sailing.freg.resultimport.test</module>
<module>com.sap.sailing.barbados.resultimport</module>
<module>com.sap.sailing.barbados.resultimport.test</module>
<module>com.sap.sailing.velum.resultimport</module>
<module>com.sap.sailing.velum.resultimport.test</module>
<module>com.sap.sailing.sailwave.resultimport</module>
<module>com.sap.sailing.sailwave.resultimport.test</module>
<module>com.sap.sailing.manage2sail</module>
<module>com.sap.sailing.manage2sail.resultimport</module>
<module>com.sap.sailing.manage2sail.resultimport.test</module>
<module>com.sap.sailing.simulator.test</module>
<module>com.sap.sailing.server.trackfiles.test</module>
<module>com.sap.sailing.selenium.test</module>
<module>com.sap.sailing.autoload</module>
<module>com.sap.sailing.feature.p2build</module>
<module>com.sap.sailing.polars</module>
<module>com.sap.sailing.polars.datamining</module>
<module>com.sap.sailing.polars.datamining.shared</module>
<module>com.sap.sailing.polars.test</module>
<!--
com.sap.sailing.targetplatform.base
left out on purpose: only invoke maven manually to build target platform
-->
</modules>
<properties>
@@ -147,9 +32,9 @@
<gwt.minVersion>2.7.0</gwt.minVersion>
<gwt.workers>2</gwt.workers>
<p2-target>race-analysis-p2-remote</p2-target><!--can be overidden through p2-target.local profile -->
<!-- QUESTION: Which properties or settings are system dependent and differ across different machines/environments? QUESTION:
Can we move the system property -Dmongo.dbName to "parameters.mongodb"? If so the IP of the host would be the same for all
profiles. -->
<!-- QUESTION: Which properties or settings are system dependent and differ across different machines/environments? QUESTION:
Can we move the system property -Dmongo.dbName to "parameters.mongodb"? If so the IP of the host would be the same for all
profiles. -->
<parameters.common>
-Dfile.encoding=cp1252 -Dmongo.dbName=winddbTest -DspatialWind=true
</parameters.common>
@@ -165,8 +50,8 @@
<parameters.debug>
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
</parameters.debug>
<!-- "Forward declaration" for better readability. The actual value should be defined in the local settings.xml, because
of the differences between the CI-Build and the local setup. -->
<!-- "Forward declaration" for better readability. The actual value should be defined in the local settings.xml, because
of the differences between the CI-Build and the local setup. -->
<parameters.proxy>
-Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.wdf.sap.corp -Dhttps.proxyPort=8080
</parameters.proxy>
@@ -176,213 +61,465 @@
<profiles>
<profile>
<id>no-debug.with-proxy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.proxy} ${parameters.tractrac} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>no-debug.without-proxy</id>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>debug.with-proxy</id>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.proxy} ${parameters.debug} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>debug.without-proxy</id>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.debug} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>p2-target.local</id>
<properties>
<p2-target>
race-analysis-p2-local
</p2-target>
</properties>
<!-- This profile activates some configuration (submodules and Tycho) that must not be active when building the Android apps.
On Lean DI this profile is inactive.
In a non Lean DI environment this is active by default and can be deactivated using the parameter "-P !with-not-android-relevant". -->
<id>with-not-android-relevant</id>
<activation>
<property>
<name>p2-local</name><!-- activiated by ``mvn -Dp2-local`` -->
<name>!ldi.releaseBuild</name>
</property>
</activation>
</profile>
</profiles>
<build>
<directory>bin</directory>
<outputDirectory>bin</outputDirectory>
<testOutputDirectory>bin</testOutputDirectory>
<pluginManagement>
<modules>
<module>com.sap.sse</module>
<module>com.sap.sse.mail</module>
<module>com.sap.sse.mail.replication.test</module>
<module>com.sap.sse.mail.replication.testsupport</module>
<module>com.sap.sse.mongodb</module>
<module>com.sap.sse.gwt</module>
<module>com.sap.sse.gwt.adminconsole</module>
<module>com.sap.sse.datamining</module>
<module>com.sap.sse.datamining.shared</module>
<module>com.sap.sse.security</module>
<module>com.sap.sse.security.ui</module>
<module>com.sap.sse.security.userstore.mongodb</module>
<module>com.sap.sse.operationaltransformation</module>
<module>com.sap.sse.replication</module>
<module>com.sap.sse.threadmanager</module>
<module>com.sap.sse.filestorage</module>
<module>com.sap.sse.gwt.theme</module>
<module>com.sap.sailing.domain</module>
<module>com.sap.sailing.geocoding</module>
<module>com.sap.sailing.datamining</module>
<module>com.sap.sailing.datamining.shared</module>
<module>com.sap.sailing.domain.persistence</module>
<module>com.sap.sailing.domain.deckmanadapter</module>
<module>com.sap.sailing.domain.tractracadapter</module>
<module>com.sap.sailing.domain.tractracadapter.persistence</module>
<module>com.sap.sailing.domain.igtimiadapter</module>
<module>com.sap.sailing.domain.igtimiadapter.persistence</module>
<module>com.sap.sailing.domain.racelogtrackingadapter</module>
<module>com.sap.sailing.domain.racelogtrackingadapter.testsupport</module>
<module>com.sap.sailing.domain.swisstimingadapter</module>
<module>com.sap.sailing.domain.swisstimingadapter.persistence</module>
<module>com.sap.sailing.domain.swisstimingreplayadapter</module>
<module>com.sap.sailing.news</module>
<module>com.sap.sailing.declination</module>
<module>com.sap.sailing.udpconnector</module>
<module>com.sap.sailing.expeditionconnector</module>
<module>com.sap.sailing.server</module>
<module>com.sap.sailing.server.gateway</module>
<module>com.sap.sailing.server.gateway.serialization</module>
<module>com.sap.sailing.www</module>
<module>com.sap.sailing.www.events</module>
<module>com.sap.sailing.xmlexport</module>
<module>com.google.gwt.dev</module>
<module>com.google.gwt.osgi</module>
<module>com.tractrac.clientmodule</module>
<module>com.googlecode.java-diff-utils</module>
<module>com.googlecode.mgwt</module>
<module>com.sap.sailing.dashboards.gwt</module>
<module>com.sap.sailing.feature</module>
<module>org.moxieapps.gwt.highcharts</module>
<module>com.sap.sailing.resultimport</module>
<module>com.sap.sailing.kiworesultimport</module>
<module>com.sap.sailing.ess40.resultimport</module>
<module>com.sap.sailing.xrr.schema</module>
<module>com.sap.sailing.xrr.resultimport</module>
<module>com.sap.sailing.xrr.structureimport</module>
<module>com.sap.sailing.freg.resultimport</module>
<module>org.openqa.selenium.osgi</module>
<module>com.sap.sailing.monitoring</module>
<module>com.sap.sailing.simulator</module>
<module>com.sap.sailing.server.trackfiles</module>
<module>com.sap.sailing.feature.runtime</module>
<module>com.sap.sailing.gwt.ui</module>
<module>com.sap.sailing.domain.test</module>
<module>com.sap.sse.replication.testsupport</module>
<!-- The following test fragment doesn't yet do what it should in the Maven context... -->
<module>com.sap.sse.gwt.test</module>
<!-- -->
<module>com.sap.sse.datamining.test</module>
<module>com.sap.sse.security.replication.test</module>
<module>com.sap.sse.security.test</module>
<module>com.sap.sse.operationaltransformation.test</module>
<module>com.sap.sse.common.test</module>
<module>com.sap.sse.filestorage.test</module>
<module>com.sap.sailing.datamining.test</module>
<module>com.sap.sailing.domain.deckmanadapter.test</module>
<module>com.sap.sailing.domain.igtimiadapter.test</module>
<module>com.sap.sailing.domain.racelogtrackingadapter.test</module>
<module>com.sap.sailing.xmlexport.test</module>
<module>com.sap.sailing.xrr.resultimport.test</module>
<module>com.sap.sailing.domain.shared.android.test</module>
<module>com.sap.sailing.geocoding.test</module>
<module>com.sap.sailing.domain.swisstimingadapter.test</module>
<module>com.sap.sailing.domain.swisstimingreplayadapter.test</module>
<module>com.sap.sailing.declination.test</module>
<module>com.sap.sailing.expeditionconnector.test</module>
<module>com.sap.sailing.server.test</module>
<module>com.sap.sailing.server.gateway.test</module>
<module>com.sap.sailing.server.gateway.test.support</module>
<module>com.sap.sailing.server.gateway.serialization.test</module>
<module>com.sap.sailing.server.replication.test</module>
<module>com.sap.sailing.gwt.ui.test</module>
<module>com.sap.sailing.mongodb.test</module>
<module>com.googlecode.java-diff-utils.test</module>
<module>com.sap.sailing.kiworesultimport.test</module>
<module>com.sap.sailing.ess40.resultimport.test</module>
<module>com.sap.sailing.freg.resultimport.test</module>
<module>com.sap.sailing.barbados.resultimport</module>
<module>com.sap.sailing.barbados.resultimport.test</module>
<module>com.sap.sailing.velum.resultimport</module>
<module>com.sap.sailing.velum.resultimport.test</module>
<module>com.sap.sailing.sailwave.resultimport</module>
<module>com.sap.sailing.sailwave.resultimport.test</module>
<module>com.sap.sailing.manage2sail</module>
<module>com.sap.sailing.manage2sail.resultimport</module>
<module>com.sap.sailing.manage2sail.resultimport.test</module>
<module>com.sap.sailing.simulator.test</module>
<module>com.sap.sailing.server.trackfiles.test</module>
<module>com.sap.sailing.selenium.test</module>
<module>com.sap.sailing.autoload</module>
<module>com.sap.sailing.feature.p2build</module>
<module>com.sap.sailing.polars</module>
<module>com.sap.sailing.polars.datamining</module>
<module>com.sap.sailing.polars.datamining.shared</module>
<module>com.sap.sailing.polars.test</module>
<!--
com.sap.sailing.targetplatform.base
left out on purpose: only invoke maven manually to build target platform
-->
</modules>
<build>
<plugins>
<plugin>
<inherited>true</inherited>
<groupId>org.eclipse.tycho</groupId>
<artifactId>eclipse-test-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<reportsDirectory>${reportsdirectory}</reportsDirectory>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>com.google.gwt.dev</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>no-debug.with-proxy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.proxy} ${parameters.tractrac} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>no-debug.without-proxy</id>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>debug.with-proxy</id>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.proxy} ${parameters.debug} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>debug.without-proxy</id>
<properties>
<tycho.build.argLine>
${parameters.common} ${parameters.vm-settings} ${parameters.debug} ${parameters.mongodb}
</tycho.build.argLine>
</properties>
</profile>
<profile>
<id>p2-target.local</id>
<properties>
<p2-target>
race-analysis-p2-local
</p2-target>
</properties>
<activation>
<property>
<name>p2-local</name><!-- activiated by ``mvn -Dp2-local`` -->
</property>
</activation>
</profile>
<profile>
<id>leandi</id>
<activation>
<!-- Only active on Lean DI. -->
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<properties>
<!-- On Lean DI we do not build any artifact that needs stuff from the target platform.
To avoid problems during target platform resolution,
we use an empty target platform file that simply doesn't reference any artifacts.
The alternative would be to completely deactivate some Tycho configuration on Lean DI,
but this would be much more complex and fragile. -->
<p2-target>race-analysis-p2-empty</p2-target>
</properties>
<dependencies>
<dependency>
<!-- This dependency simply ensures, that the Android SDK installation is completed on Lean DI before anything else is being built. -->
<groupId>com.sap.sailing</groupId>
<artifactId>install-android-sdk</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<configuration>
<!-- Toolchan stuff doesn't work on Lean DI,
so we need to hard-code Java 1.7 (Android 5.1 SDK isn't compatible with Java 8)
compatibility for all builds. -->
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>non-leandi</id>
<activation>
<!-- Only active in non Lean DI environments. -->
<property>
<name>!ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<!-- On Lean DI, the toolchains stuff isn't correctly configured, so this can only be used if it isn't a Lean DI build. -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<configuration>
<useJDK>BREE</useJDK>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<directory>bin</directory>
<outputDirectory>bin</outputDirectory>
<testOutputDirectory>bin</testOutputDirectory>
<pluginManagement>
<plugins>
<plugin>
<inherited>true</inherited>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<artifactId>eclipse-test-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<resolver>p2</resolver>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>com.google.gwt.dev</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
<target>
<artifact>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<classifier>../com.sap.sailing.targetplatform/definitions/${p2-target}</classifier>
</artifact>
</target>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<argLine>${tycho.build.argLine}</argLine>
<excludes>
<!-- Exclude inner classes -->
<exclude>**/*$*</exclude>
</excludes>
<reportsDirectory>${reportsdirectory}</reportsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useJDK>BREE</useJDK>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<!-- GWT version detected from dependencyManagement -->
<execution>
<configuration>
<extraJvmArgs>-Dgwt.persistentunitcache=false -Xmx2048m</extraJvmArgs>
<!--
<userAgents>chrome</userAgents>
-->
<!--
<style>PRETTY</style>
-->
<localWorkers>${gwt.workers}</localWorkers>
<!-- Uncomment the following to obtain details split-point reports
<compileReport>true</compileReport>
<detailedSoyc>true</detailedSoyc>
-->
</configuration>
</execution>
</executions>
</plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sourceDirectories>src</sourceDirectories>
<destinationManifestFile>AndroidManifest.xml</destinationManifestFile>
<classesJarExcludes>
<classesJarExclude>*.jar</classesJarExclude>
<classesJarExclude>generated-sources/**</classesJarExclude>
<classesJarExclude>maven-archiver/**</classesJarExclude>
<classesJarExclude>sourcebundle-l10n-gen/**</classesJarExclude>
<classesJarExclude>p2*</classesJarExclude>
<classesJarExclude>MANIFEST.MF</classesJarExclude>
<classesJarExclude>*.ap_</classesJarExclude>
<classesJarExclude>local-artifacts.properties</classesJarExclude>
<classesJarExclude>**/*.gwt.xml</classesJarExclude>
</classesJarExcludes>
</configuration>
<executions>
<execution>
<id>aar</id>
<goals>
<goal>aar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<type>aar</type>
<file>${project.build.directory}/${project.build.finalName}.aar</file>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<extensions>
<!-- Enabling the use of FTP -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<target>
<artifact>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<classifier>../com.sap.sailing.targetplatform/definitions/${p2-target}</classifier>
</artifact>
</target>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<argLine>${tycho.build.argLine}</argLine>
<excludes>
<!-- Exclude inner classes -->
<exclude>**/*$*</exclude>
</excludes>
<reportsDirectory>${reportsdirectory}</reportsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<configuration>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<!-- GWT version detected from dependencyManagement -->
<execution>
<configuration>
<extraJvmArgs>-Dgwt.persistentunitcache=false -Xmx2048m</extraJvmArgs>
<!--
<userAgents>chrome</userAgents>
-->
<!--
<style>PRETTY</style>
-->
<localWorkers>${gwt.workers}</localWorkers>
<!-- Uncomment the following to obtain details split-point reports
<compileReport>true</compileReport>
<detailedSoyc>true</detailedSoyc>
-->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<!-- Enabling the use of FTP -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<configuration>
<aggregate>true</aggregate>
<reportsDirectories>
<reportsDirectory>${reportsdirectory}</reportsDirectory>
<aggregate>true</aggregate>
<reportsDirectories>
<reportsDirectory>${reportsdirectory}</reportsDirectory>
<aggregate>true</aggregate>
</reportsDirectories>
</configuration>
</plugin>
</plugins>
</reporting>
</reportsDirectories>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
@@ -3,6 +3,6 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
</manifest>
+46 -45
View File
@@ -9,81 +9,87 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.sap.sailing.android.shared</artifactId>
<packaging>apklib</packaging>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>org.json.simple</artifactId>
<version>1.1.0-SNAPSHOT</version>
<scope>compile</scope>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.domain.shared.android</artifactId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>com.sap.sse.security.common</artifactId>
<version>${project.version}</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.shared.android</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.datamining.annotations</artifactId>
<version>${project.version}</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.domain.common</artifactId>
<version>${project.version}</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.domain.shared.android</artifactId>
<version>${project.version}</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.server.gateway.serialization.shared.android</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.domain.common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>org.json.simple</artifactId>
<version>1.1.0-SNAPSHOT</version>
<type>aar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services</artifactId>
<version>6.5.87</version>
<artifactId>play-services-location</artifactId>
<type>aar</type>
</dependency>
<dependency>
<groupId>android</groupId>
<groupId>${android.api.groupId}</groupId>
<artifactId>android</artifactId>
</dependency>
</dependencies>
@@ -93,13 +99,8 @@
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>21</platform>
</sdk>
</configuration>
</plugin>
</plugins>
</build>
@@ -33,7 +33,7 @@ public class FileBasedHttpGetRequest extends HttpGetRequest {
return null;
}
} finally {
outputStream.close();
safeClose(outputStream);
}
return new FileInputStream(outputFile);
}
@@ -32,11 +32,12 @@ public class HttpJsonPostRequest extends HttpRequest {
connection.setRequestProperty("Content-Type", ContentType);
connection.setRequestProperty("Accept", ContentType);
OutputStream outputStream = new BufferedOutputStream(connection.getOutputStream());
sendBody(outputStream);
outputStream.close();
try {
sendBody(outputStream);
} finally {
safeClose(outputStream);
}
return new BufferedInputStream(connection.getInputStream());
}
@@ -3,6 +3,7 @@ package com.sap.sailing.android.shared.data.http;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@@ -105,9 +106,7 @@ public abstract class HttpRequest {
ExLog.i(context, TAG, String.format("(Request %d) HTTP request failed.", this.hashCode()));
throw e;
} finally {
if (responseInputStream != null) {
responseInputStream.close();
}
safeClose(responseInputStream);
}
}
@@ -140,6 +139,16 @@ public abstract class HttpRequest {
return true;
}
protected void safeClose(Closeable c) {
if (c != null) {
try {
c.close();
} catch (IOException e) {
ExLog.ex(context, TAG, e);
}
}
}
protected abstract BufferedInputStream doRequest(HttpURLConnection connection) throws IOException;
}
@@ -133,8 +133,9 @@ public class SelectionBuilder {
public Cursor query(SQLiteDatabase db, boolean distinct, String[] columns, String orderBy, String limit) {
assertTable();
if (columns != null)
if (columns != null) {
mapColumns(columns);
}
ExLog.i(mContext, TAG, "query(columns=" + Arrays.toString(columns) + ", distinct=" + distinct + ") " + this);
return db.query(distinct, mTable, columns, getSelection(), getSelectionArgs(), mGroupBy, mHaving, orderBy,
limit);
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.sap.sailing.domain.common"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="src" path="tests-jvm/src"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.sap.sailing.domain.common"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
@@ -1,3 +1,3 @@
/gen
/bin
/target
bin/
target/
gen/
@@ -0,0 +1 @@
${git.branch}-${git.commit.id.abbrev} (${git.commit.time})
@@ -1,123 +1,174 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sap.sailing</groupId>
<artifactId>mobile</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.tracking.app</artifactId>
<packaging>apk</packaging>
<parent>
<groupId>com.sap.sailing</groupId>
<artifactId>mobile</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<properties>
<!-- If you change this name, change in app too! -->
<additional-deployment-version-file>com.sap.sailing.android.tracking.app.version</additional-deployment-version-file>
<!-- passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
<app-version>${tracking-app-version}</app-version>
</properties>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.tracking.app</artifactId>
<packaging>apk</packaging>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
</dependency>
<properties>
<!-- If you change this name, change in app too! -->
<additional-deployment-version-file>com.sap.sailing.android.tracking.app.version</additional-deployment-version-file>
<!-- passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
<app-version>${tracking-app-version}</app-version>
</properties>
<!--
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-annotations</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
-->
<dependencies>
<dependency>
<groupId>${android.api.groupId}</groupId>
<artifactId>android</artifactId>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services-gcm</artifactId>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>com.sap.sailing.android.shared</artifactId>
<version>${project.version}</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services</artifactId>
<version>6.5.87</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>apklib</type>
</dependency>
</dependencies>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<executions>
<execution>
<id>alignApk</id>
<phase>install</phase>
<goals>
<goal>zipalign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/tests-jvm/src</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>non-leandi</id>
<activation>
<property>
<name>!ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<extractDuplicates>true</extractDuplicates>
<sdk>
<platform>21</platform>
</sdk>
<release>true</release>
<proguard>
<!-- Someone needs to look into this - quite hard to find a configuration that doesnt break everything -->
<skip>true</skip>
<config>proguard-project.txt</config>
<configs>
<config>${env.ANDROID_HOME}/tools/proguard/proguard-android.txt</config>
</configs>
</proguard>
<zipalign>
<skip>false</skip>
</zipalign>
</configuration>
<executions>
<execution>
<goals>
<goal>apk</goal>
</goals>
<configuration>
<excludeJarResources>
<!-- Prevents *-sources.jar to be distributed with the APK -->
<excludeJarResource>^com\.sap\..*.jar$</excludeJarResource>
</excludeJarResources>
</configuration>
</execution>
</executions>
<!-- If not running on Lean DI we do the signing by ourselves with our own keystore. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
</plugin>
<!-- plugins for generating version file and copying .apk -->
<plugin>
<!-- Needed for copying the *.apk to com.sap.sailing.www project. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<!-- Needed for creation of *.version files for the *.apk in com.sap.sailing.www project. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<!-- Needed to clean the app in com.sap.sailing.www project. -->
<artifactId>maven-clean-plugin</artifactId>
</plugin>
</plugins>
</build>
</plugins>
</build>
</profile>
<profile>
<id>leandi-no-realsign</id>
<activation>
<property>
<!-- When running on Lean DI but it's not a release build, we do signing on our own. -->
<name>ldi.releaseType</name>
<value>milestone</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>leandi-realsign</id>
<activation>
<property>
<!-- When running on Lean DI and it's a release build, we do SAP signing. -->
<name>ldi.releaseType</name>
<value>customer</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.sap.prd.codesign</groupId>
<artifactId>com.sap.prd.codesign.maven-jarsigner-plugin</artifactId>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin> -->
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -2,8 +2,6 @@ package com.sap.sailing.android.tracking.app.utils;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import android.content.ContentResolver;
import android.content.Context;
@@ -15,18 +13,14 @@ import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.RectF;
import android.media.ExifInterface;
import android.net.Uri;
import android.provider.MediaStore;
import android.util.Base64;
import android.util.Log;
/**
* Todo: Use this class?
*/
public class ImageController {
private static final String TAG = ImageController.class.getName();
public static String getRealPathFromURI(ContentResolver contentResolver, Uri contentUri) {
String res = null;
String[] proj = { MediaStore.Images.Media.DATA };
@@ -373,76 +367,6 @@ public class ImageController {
return inSampleSize;
}
public static Bitmap decodeSampledBitmapFromFile(ContentResolver contentResolver, Uri uri, String filename,
int reqWidth, int reqHeight) {
// First decode with inJustDecodeBounds=true to check dimensions
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
if (filename == null) {
try {
InputStream inputStream = contentResolver.openInputStream(uri);
BitmapFactory.decodeStream(inputStream, null, options);
} catch (IOException e) {
Log.e(TAG, "Error trying to read image from "+uri, e);
}
} else {
BitmapFactory.decodeFile(filename, options);
}
// Calculate inSampleSize
options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight);
// Decode bitmap with inSampleSize set
options.inJustDecodeBounds = false;
Bitmap bitmap = null;
if (filename == null) {
try {
InputStream inputStream = contentResolver.openInputStream(uri);
bitmap = BitmapFactory.decodeStream(inputStream, null, options);
} catch (IOException e) {
Log.e(TAG, "Error trying to read image from "+uri, e);
}
} else {
bitmap = BitmapFactory.decodeFile(filename, options);
}
// check orientation
if (bitmap != null && filename != null) {
try {
ExifInterface exif = new ExifInterface(filename);
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1);
int angle = 0;
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
angle = -90;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
angle = -180;
break;
case ExifInterface.ORIENTATION_ROTATE_270:
angle = -270;
break;
default:
break;
}
if (angle != 0) {
Matrix matrix = new Matrix();
matrix.postRotate(90);
Bitmap rotatedBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(),
matrix, true);
bitmap.recycle();
bitmap = rotatedBitmap;
}
} catch (IOException e) {
Log.e(TAG, "Error trying to determine orientation for image "+filename+" loaded from "+uri, e);
}
}
return bitmap;
}
// -----------------------------------------------------------------------
// http://stackoverflow.com/a/8557147
@@ -2,8 +2,10 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="src" path="tests-jvm/src"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
@@ -0,0 +1 @@
${git.branch}-${git.commit.id.abbrev} (${git.commit.time})
+144 -101
View File
@@ -1,124 +1,167 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sap.sailing</groupId>
<artifactId>mobile</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<parent>
<groupId>com.sap.sailing</groupId>
<artifactId>mobile</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.buoy.positioning.app</artifactId>
<packaging>apk</packaging>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.buoy.positioning.app</artifactId>
<packaging>apk</packaging>
<properties>
<!-- If you change this name, change in app too! -->
<additional-deployment-version-file>com.sap.sailing.android.buoy.positioning.app.version
</additional-deployment-version-file>
<!-- passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
<app-version>${buoy.positioning-app-version}</app-version>
</properties>
<properties>
<!-- If you change this name, change in app too! -->
<additional-deployment-version-file>com.sap.sailing.android.buoy.positioning.app.version
</additional-deployment-version-file>
<!-- passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
<app-version>${buoy.positioning-app-version}</app-version>
</properties>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>${android.api.groupId}</groupId>
<artifactId>android</artifactId>
</dependency>
<!--
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-annotations</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
-->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>com.sap.sailing.android.shared</artifactId>
<version>${project.version}</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<executions>
<execution>
<id>alignApk</id>
<phase>install</phase>
<goals>
<goal>zipalign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/tests-jvm/src</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>22.2.0</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services</artifactId>
<version>7.5.0</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>apklib</type>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<profiles>
<profile>
<id>non-leandi</id>
<activation>
<property>
<name>!ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<extractDuplicates>true</extractDuplicates>
<sdk>
<platform>21</platform>
</sdk>
<release>true</release>
<proguard>
<!-- Someone needs to look into this - quite hard to find a configuration that doesnt break everything -->
<skip>true</skip>
<config>proguard-project.txt</config>
<configs>
<config>${env.ANDROID_HOME}/tools/proguard/proguard-android.txt</config>
</configs>
</proguard>
<zipalign>
<skip>false</skip>
</zipalign>
</configuration>
<executions>
<execution>
<goals>
<goal>apk</goal>
</goals>
<configuration>
<excludeJarResources>
<!-- Prevents *-sources.jar to be distributed with the APK -->
<excludeJarResource>^com\.sap\..*.jar$</excludeJarResource>
</excludeJarResources>
</configuration>
</execution>
</executions>
<!-- If not running on Lean DI we do the signing by ourselves with our own keystore. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
</plugin>
<!-- plugins for generating version file and copying .apk -->
<plugin>
<!-- Needed for copying the *.apk to com.sap.sailing.www project. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<!-- Needed for creation of *.version files for the *.apk in com.sap.sailing.www project. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<!-- Needed to clean the app in com.sap.sailing.www project. -->
<artifactId>maven-clean-plugin</artifactId>
</plugin>
</plugins>
</build>
</plugins>
</build>
</profile>
<profile>
<id>leandi-no-realsign</id>
<activation>
<property>
<!-- When running on Lean DI but it's not a release build, we do signing on our own. -->
<name>ldi.releaseType</name>
<value>milestone</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>leandi-realsign</id>
<activation>
<property>
<!-- When running on Lean DI and it's a release build, we do SAP signing. -->
<name>ldi.releaseType</name>
<value>customer</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.sap.prd.codesign</groupId>
<artifactId>com.sap.prd.codesign.maven-jarsigner-plugin</artifactId>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin> -->
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -11,6 +11,6 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-21
target=android-22
android.library.reference.1=../google-play-services_lib
android.library.reference.2=../com.sap.sailing.android.shared
@@ -1,3 +1,3 @@
/gen
/bin
/target
bin/
target/
gen/
@@ -0,0 +1 @@
${git.branch}-${git.commit.id.abbrev} (${git.commit.time})
+127 -74
View File
@@ -1,8 +1,8 @@
<?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/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sap.sailing</groupId>
<artifactId>mobile</artifactId>
@@ -21,61 +21,52 @@
</properties>
<dependencies>
<!-- needed on remote repository -->
<dependency>
<groupId>android</groupId>
<groupId>${android.api.groupId}</groupId>
<artifactId>android</artifactId>
</dependency>
<!--
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-annotations</artifactId>
<version>21.0.3</version>
<groupId>com.h6ah4i.android.widget.advrecyclerview</groupId>
<artifactId>advrecyclerview</artifactId>
<version>0.6.2</version>
<type>aar</type>
</dependency>
-->
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>21.0.3</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services</artifactId>
<version>6.5.87</version>
<type>aar</type>
</dependency>
<!-- needed on remote repository -->
<dependency>
<groupId>com.mobeta.android.dslv</groupId>
<artifactId>drag-sort-listview</artifactId>
<version>0.6.1-SNAPSHOT</version>
<type>apklib</type>
<exclusions>
<exclusion>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<exclusion>
<groupId>com.android.support</groupId>
<artifactId>recyclerview-v7</artifactId>
</exclusion>
<exclusion>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sailing.android.shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>apklib</type>
<groupId>com.android.support</groupId>
<artifactId>recyclerview-v7</artifactId>
<type>aar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>com.sap.sailing.android.shared</artifactId>
<version>${project.version}</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.16</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -84,54 +75,116 @@
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<extractDuplicates>true</extractDuplicates>
<sdk>
<platform>21</platform>
</sdk>
<release>true</release>
<proguard>
<!-- Someone needs to look into this - quite hard to find a configuration that doesnt break everything -->
<skip>true</skip>
<config>proguard-project.txt</config>
<configs>
<config>${env.ANDROID_HOME}/tools/proguard/proguard-android.txt</config>
</configs>
</proguard>
<zipalign>
<skip>false</skip>
</zipalign>
</configuration>
<executions>
<execution>
<id>alignApk</id>
<phase>install</phase>
<goals>
<goal>apk</goal>
<goal>zipalign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<excludeJarResources>
<!-- Prevents *-sources.jar to be distributed with the APK -->
<excludeJarResource>^com\.sap\..*.jar$</excludeJarResource>
</excludeJarResources>
<sources>
<source>${project.basedir}/tests-jvm/src</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- plugins for generating version file and copying .apk -->
</plugins>
</build>
<profiles>
<profile>
<id>non-leandi</id>
<activation>
<property>
<name>!ldi.releaseBuild</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<!-- If not running on Lean DI we do the signing by ourselves with our own keystore. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
</plugin>
<plugin>
<!-- Needed for copying the *.apk to com.sap.sailing.www project. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<!-- Needed for creation of *.version files for the *.apk in com.sap.sailing.www project. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<!-- Needed to clean the app in com.sap.sailing.www project. -->
<artifactId>maven-clean-plugin</artifactId>
</plugin>
</plugins>
</build>
</plugins>
</build>
</profile>
<profile>
<id>leandi-no-realsign</id>
<activation>
<property>
<!-- When running on Lean DI but it's not a release build, we do signing on our own. -->
<name>ldi.releaseType</name>
<value>milestone</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>leandi-realsign</id>
<activation>
<property>
<!-- When running on Lean DI and it's a release build, we do SAP signing. -->
<name>ldi.releaseType</name>
<value>customer</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.sap.prd.codesign</groupId>
<artifactId>com.sap.prd.codesign.maven-jarsigner-plugin</artifactId>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin> -->
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -125,6 +125,18 @@ public class ResultsCapturingActivity extends SessionActivity {
super.onPause();
releaseCamera();
}
@Override
public void onStop() {
super.onStop();
releaseCamera();
}
@Override
protected void onDestroy() {
super.onDestroy();
releaseCamera();
}
private void setupCamera() {
int cameraId = getBackCameraId();
+515 -132
View File
@@ -1,145 +1,528 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>workspace</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<parent>
<artifactId>workspace</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>mobile</artifactId>
<packaging>pom</packaging>
<artifactId>mobile</artifactId>
<packaging>pom</packaging>
<modules>
<!--
<module>com.sap.sailing.racecommittee.app</module>
<module>com.sap.sailing.android.shared</module>
<module>com.sap.sailing.adnroid.buoy.positioning.app</module>
<module>com.sap.sailing.android.tracking.app</module>
-->
</modules>
<modules>
<module>com.sap.sailing.android.shared</module>
<module>com.sap.sailing.racecommittee.app</module>
<module>com.sap.sailing.android.tracking.app</module>
<module>com.sap.sailing.buoy.positioning</module>
</modules>
<properties>
<properties>
<!-- used to copy android apps to the static web dir (auto-update functionality) -->
<!-- relative dir as seen from the child modules -->
<additional-deployment-dir>../../java/com.sap.sailing.www/apps</additional-deployment-dir>
<!-- redefine in child poms -->
<additional-deployment-version-file></additional-deployment-version-file>
<app-version></app-version>
</properties>
<dependencyManagement>
<dependencies>
<!-- needed on remote repository -->
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.4.2_r4</version>
<scope>provided</scope>
</dependency>
<!-- relative dir as seen from the child modules -->
<additional-deployment-dir>../../java/com.sap.sailing.www/apps</additional-deployment-dir>
<!-- redefine in child poms -->
<additional-deployment-version-file></additional-deployment-version-file>
<app-version></app-version>
<android.support.version>22.1.1</android.support.version>
<play.services.version>7.5.0</play.services.version>
<!-- needed on remote repository -->
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>19</version>
</dependency>
</dependencies>
</dependencyManagement>
<sign.keystore>../android-keystore/STG-debug.jks</sign.keystore>
<sign.alias>stg_debug</sign.alias>
<sign.storepass>stg_debug</sign.storepass>
<sign.keypass>stg_debug</sign.keypass>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.9.0-rc.1</version>
<configuration>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${android.api.groupId}</groupId>
<artifactId>android</artifactId>
<version>${android.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>${android.support.version}</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>${android.support.version}</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>recyclerview-v7</artifactId>
<version>${android.support.version}</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services-location</artifactId>
<version>${play.services.version}</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services-gcm</artifactId>
<version>${play.services.version}</version>
<type>aar</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>${project.basedir}/assets</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/filteredassets</targetPath>
<includes>
<include>build.info</include>
</includes>
</resource>
<resource>
<directory>${project.basedir}/assets</directory>
<filtering>false</filtering>
<targetPath>${project.build.directory}/filteredassets</targetPath>
<excludes>
<exclude>build.info</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<resourceDirectory>res</resourceDirectory>
<assetsDirectory>${project.build.directory}/filteredassets</assetsDirectory>
<sourceDirectories>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
</sourceDirectories>
<failOnDuplicatePackages>false</failOnDuplicatePackages>
<failOnNonStandardStructure>false</failOnNonStandardStructure>
<failOnConflictingLayouts>false</failOnConflictingLayouts>
<failOnDuplicatePackages>false</failOnDuplicatePackages>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<extractDuplicates>true</extractDuplicates>
<release>false</release>
<outputApk>${project.build.directory}/${project.build.finalName}-unaligned.apk</outputApk>
<proguard>
<!-- Someone needs to look into this - quite hard to find a configuration that doesnt break everything -->
<skip>true</skip>
<configs>
<config>${env.ANDROID_HOME}/tools/proguard/proguard-android.txt</config>
<config>${project.basedir}/proguard-project.txt</config>
<config>${project.basedir}/../proguard-mobile.txt</config>
</configs>
</proguard>
<zipalign>
<skip>false</skip>
<inputApk>${project.build.directory}/${project.build.finalName}-unaligned.apk</inputApk>
<outputApk>${project.build.directory}/${project.build.finalName}.apk</outputApk>
</zipalign>
<excludeJarResources>
<!-- Prevents *-sources.jar to be distributed with the APK -->
<excludeJarResource>^.*-sources.jar$</excludeJarResource>
<excludeJarResource>^android.*.jar$</excludeJarResource>
</excludeJarResources>
<dex>
<jvmArguments>
<jvmArgument>-Xms1024m</jvmArgument>
<jvmArgument>-Xmx2048m</jvmArgument>
</jvmArguments>
</dex>
<classesJarExcludes>
<classesJarExclude>*.jar</classesJarExclude>
<classesJarExclude>generated-sources/**</classesJarExclude>
<classesJarExclude>maven-archiver/**</classesJarExclude>
<classesJarExclude>sourcebundle-l10n-gen/**</classesJarExclude>
<classesJarExclude>p2*</classesJarExclude>
<classesJarExclude>MANIFEST.MF</classesJarExclude>
<classesJarExclude>*.ap_</classesJarExclude>
<classesJarExclude>local-artifacts.properties</classesJarExclude>
<classesJarExclude>android/**</classesJarExclude>
<classesJarExclude>com/google/**</classesJarExclude>
<classesJarExclude>**/R.class</classesJarExclude>
<classesJarExclude>**/R$*.class</classesJarExclude>
</classesJarExcludes>
<sdk>
<platform>19</platform>
<platform>22</platform>
</sdk>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy-installed</id>
<phase>install</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
<outputDirectory>${additional-deployment-dir}</outputDirectory>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>generate-version</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<property name="target.dir" value="${additional-deployment-dir}" />
<property name="target.name" value="${additional-deployment-version-file}" />
<sign>
<debug>false</debug>
</sign>
</configuration>
<executions>
<execution>
<id>alignApk</id>
<phase>pre-integration-test</phase>
<goals>
<goal>zipalign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
<goal>verify</goal>
</goals>
<phase>package</phase>
<inherited>true</inherited>
<configuration>
<removeExistingSignatures>true</removeExistingSignatures>
<archive>${project.build.directory}/${project.build.finalName}-unaligned.apk</archive>
<keystore>${sign.keystore}</keystore>
<alias>${sign.alias}</alias>
<storepass>${sign.storepass}</storepass>
<keypass>${sign.keypass}</keypass>
<verbose>true</verbose>
<arguments>
<argument>-sigalg</argument><argument>MD5withRSA</argument>
<argument>-digestalg</argument><argument>SHA1</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>pdf</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<echo file="${target.dir}/${target.name}" message="${project.build.finalName}.apk=${app-version}" />
<echo message="Version file generated in ${target.dir}/${target.name}." />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>${additional-deployment-dir}</directory>
<includes>
<include>${project.build.finalName}.apk</include>
<include>${additional-deployment-version-file}</include>
</includes>
<excludes>
<exclude>*.gitignore</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
<profiles>
<profile>
<!-- activate with parameter '-P non-leandi-release'-->
<id>non-leandi-release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<sign.keystore>../android-keystore/STG.jks</sign.keystore>
<sign.alias></sign.alias>
<sign.storepass></sign.storepass>
<sign.keypass></sign.keypass>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<release>true</release>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>leandi-release</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
<value>true</value>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<release>true</release>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>leandi</id>
<activation>
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<dependencies>
<dependency>
<!-- This dependency simply ensures, that the Android SDK installation is completed on Lean DI before anything else is being built. -->
<groupId>com.sap.sailing</groupId>
<artifactId>install-android-sdk</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
</dependencies>
</profile>
<profile>
<id>non-leandi</id>
<activation>
<property>
<name>!ldi.releaseBuild</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy-installed</id>
<phase>install</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
<outputDirectory>${additional-deployment-dir}</outputDirectory>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-version</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<property name="target.dir" value="${additional-deployment-dir}" />
<property name="target.name" value="${additional-deployment-version-file}" />
<echo file="${target.dir}/${target.name}" message="${project.build.finalName}.apk=${app-version}" />
<echo message="Version file generated in ${target.dir}/${target.name}." />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>${additional-deployment-dir}</directory>
<includes>
<include>${project.build.finalName}.apk</include>
<include>${additional-deployment-version-file}</include>
</includes>
<excludes>
<exclude>*.gitignore</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<!-- This turns SAP specific signing on. -->
<id>leandi-realsign</id>
<activation>
<property>
<name>ldi.releaseType</name>
<value>customer</value>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.sap.prd.codesign</groupId>
<artifactId>com.sap.prd.codesign.maven-jarsigner-plugin</artifactId>
<configuration>
<signingTech>ANDROID</signingTech>
<archiveDirectory>${project.build.directory}</archiveDirectory>
<processMainArtifact>false</processMainArtifact>
<processAttachedArtifacts>false</processAttachedArtifacts>
<removeExistingSignatures>true</removeExistingSignatures>
<includes>
<include>${project.build.finalName}-unaligned.apk</include>
</includes>
</configuration>
<executions>
<execution>
<id>sign</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>zip-apk</id>
<phase>integration-test</phase>
<configuration>
<tasks>
<zip
file="${project.build.directory}/${project.build.finalName}.zip">
<fileset dir="${project.build.directory}"
includes="${project.artifactId}.apk" />
</zip>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>integration-test</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}.zip
</file>
<type>zip </type>
<classifier>smp</classifier>
</artifact>
TODO implement
<artifact>
<file>${project.build.directory}/AndroidMarketMetadata.zip
</file>
<type>zip </type>
<classifier>AndroidMetadata</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin> -->
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>
Executable → Regular
+139 -29
View File
@@ -15,10 +15,14 @@
<profiles>
<profile>
<!-- deactivate with parameter '-P !with-mobile'-->
<id>with-mobile</id>
<activation>
<activeByDefault>true</activeByDefault>
<!-- This profile is active by default, when running on a Lean DI environment.
On Lean DI, the only things we want to build are the Android apps and everything that's needed for it.
In a non Lean DI build, you can activate this profile with the parameter "-P with-mobile". -->
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<modules>
<module>mobile</module>
@@ -31,38 +35,144 @@
<module>ios</module>
</modules>
</profile>
<profile>
<id>leandi</id>
<activation>
<!-- This profile is active by default, when running on a Lean DI environment.
The definitions in this profile aren't valid when running locally or on hudson.sapsailing.com. -->
<property>
<name>ldi.releaseBuild</name>
</property>
</activation>
<modules>
<!-- The submodule "install-android-sdk" ensures that the Android SDK is being assembled by unzipping severall *.zip files on Lean DI. -->
<module>install-android-sdk</module>
</modules>
<properties>
<!-- By default, the Android API *.jar is hosted in MAven repositories under "android:android".
On Lean DI, the deviant coordinates "com.google.download.android:android".
To make this work without the need of a duplicate definition of the dependencies by profile,
the groupId of this artifact is defined by a property so that we can easily change it for Lean DI. -->
<android.api.groupId>com.google.download.android</android.api.groupId>
<!-- By default, the Android API we use is "5.1.1_r2". On Lean DI this version is uploaded to nexus with a different version.
To make this work without the need of a duplicate definition of the dependencies by profile,
the version of this artifact is defined by a property so that we can easily change it for Lean DI. -->
<android.api.version>5.1.1</android.api.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<!-- On Lean DI ther is no environment variable "ANDROID_HOME" that by default points to the location where the Android SDK is hosted.
That's why we need to explicitly define the location of the SDK. -->
<path>${ldi.android.sdk.location}</path>
</sdk>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>non-leandi</id>
<activation>
<property>
<name>!ldi.releaseBuild</name>
</property>
</activation>
<!-- The repository declarations are only active when running ion a non Lean DI environment.
On Lean DI we are not allowed to define our own repositories because everything must be hosted in SAP's Nexus server. -->
<repositories>
<repository>
<id>equinox-sdk-3.9</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/luna/</url>
</repository>
<!--
<repository>
<id>sap-nexus</id>
<url>http://nexus.wdf.sap.corp:8081/nexus/content/groups/build.snapshots</url>
</repository>
-->
<repository>
<id>sailing-server-maven</id>
<url>http://maven.sapsailing.com/maven</url>
</repository>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>uni-luebeck</id>
<url>http://www.itm.uni-luebeck.de/projects/maven/releases</url>
</repository>
</repositories>
</profile>
</profiles>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Lean DI specific properties that are needed to assemble the Android SDK. -->
<ldi.download.android.sdk.version>24.4</ldi.download.android.sdk.version>
<ldi.download.android.tools.version>21.1</ldi.download.android.tools.version>
<ldi.download.android.platform-tools.version>23.0.1</ldi.download.android.platform-tools.version>
<ldi.download.android.build-tools.version>22.0.1</ldi.download.android.build-tools.version>
<ldi.android.build-tools.version>5.1</ldi.android.build-tools.version>
<ldi.download.android.platform.version>22_r02</ldi.download.android.platform.version>
<!-- WORKSPACE is an env set by Jenkins pointing to the build job's work directory.-->
<ldi.android.sdk.parent.location>${env.WORKSPACE}</ldi.android.sdk.parent.location>
<ldi.android.sdk.location>${ldi.android.sdk.parent.location}/android-sdk-windows</ldi.android.sdk.location>
<android.platform.version>22</android.platform.version>
<android.api.groupId>android</android.api.groupId>
<android.api.version>5.1.1_r2</android.api.version>
</properties>
<repositories>
<repository>
<id>equinox-sdk-3.9</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/luna/</url>
</repository>
<!--
<repository>
<id>sap-nexus</id>
<url>http://nexus.wdf.sap.corp:8081/nexus/content/groups/build.snapshots</url>
</repository>
-->
<repository>
<id>sailing-server-maven</id>
<url>http://maven.sapsailing.com/maven</url>
</repository>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>uni-luebeck</id>
<url>http://www.itm.uni-luebeck.de/projects/maven/releases</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>activeProfiles</id>
<phase>initialize</phase>
<goals>
<goal>active-profiles</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>4.3.0</version>
<extensions>true</extensions>
<configuration>
<androidManifestFile>AndroidManifest.xml</androidManifestFile>
<destinationManifestFile>${project.build.directory}/AndroidManifest.xml</destinationManifestFile>
<sdk>
<platform>${android.platform}</platform>
</sdk>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
+25
View File
@@ -0,0 +1,25 @@
# Android and release build
[[_TOC_]]
## Basic setup of the Android apps build
The Android Build is based on Maven and is part of the overall multi-module-build. The Android specific projects are hosted in /mobile. The build of the app projects is completely separated from Tycho/p2.
## Backend Build vs Android Build
Due to some incompatibilities of the Android Build with specifics of the Tycho Build, it's not possible to build the backend and Android apps in one execution. That's why there are several profiles that control, what is part of the specific build.
The default activation of the profiles causes the backend build to run. The relevant profiles to switch between backend and Adnroid build are:
* with-mobile (defauts to off)
* with-not-android-relevant (defauts to on)
So to run the Android apps build you have to add "-P -with-not-android-relevant -P with-mobile" to the Maven command line.
## Release build overview
There are several differences when running the build on Lean DI. Due to this, it's necessary to implement some changes in the build. To realize the build for Lean DI there is a specific branch "android-maven-build-bug3190-release". It is intended that most of the Lean DI specific logic is implemented on "master" in specific Maven profiles. This causes the release branch to only have few differences compared to "master". The most notable differences are:
* Configuration of parent POM "com.sap.ldi:ldi-parent" in workspace POM
* Versions are set to not be *-SNAPSHOT but release versions
* Some profile activation conditions are changed