Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To run the on-premise tests:

To run the cloud tests:

- `_51DEGREES_RESOURCE_KEY_BESPOKE`: [resource key](https://51degrees.com/documentation/_info__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=ci-readme.md&utm_term=secrets)
- `_51DEGREES_RESOURCE_KEY_BESPOKE`: [resource key](https://51degrees.com/documentation/_services__cloud__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=ci-readme.md&utm_term=secrets)
passed to the tests as `TestResourceKey` and `SuperResourceKey`.
- `_51DEGREES_LICENSE_KEY_51DID`: license key for the 51Did cloud tests,
together with the `_51DEGREES_RESOURCE_KEY_BASIC` and
Expand Down
8 changes: 4 additions & 4 deletions device-detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This repository contains Java implementation of the device detection [specificat
## Dependencies

For runtime dependencies, see our [dependencies](https://51degrees.com/documentation/_info__dependencies.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=dependencies) page.
The [tested versions](https://51degrees.com/documentation/_info__tested_versions.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=dependencies) page shows
The [tested versions](https://51degrees.com/documentation/_product_summaries__tested_versions.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=dependencies) page shows
the JDK versions that we currently test against. The software may run fine against other versions,
but additional caution should be applied.

Expand All @@ -21,9 +21,9 @@ The Java API can either use our cloud service to get its data or it can use a lo

#### Cloud

You will require [resource keys](https://51degrees.com/documentation/_info__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud)
You will require [resource keys](https://51degrees.com/documentation/_services__cloud__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud)
to use the Cloud API, as described on our website. Get resource keys from
our [configurator](https://configure.51degrees.com/?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud), see our [documentation](https://51degrees.com/documentation/_concepts__configurator.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud) on
our [configurator](https://configure.51degrees.com/?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud), see our [documentation](https://51degrees.com/documentation/_services__configurator.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud) on
how to use this.

#### On-Premise
Expand Down Expand Up @@ -224,7 +224,7 @@ repository.

## Tests

You will need [resource keys](https://51degrees.com/documentation/_info__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=tests)
You will need [resource keys](https://51degrees.com/documentation/_services__cloud__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=tests)
(see above) to complete the tests and run examples which include exercising the cloud API.

To verify the code:
Expand Down
2 changes: 1 addition & 1 deletion device-detection/device-detection.cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<artifactId>device-detection.cloud</artifactId>
<name>51Degrees :: Device Detection :: Cloud</name>
<description>Cloud-based device detection for Java that uses the 51Degrees cloud service via the Pipeline API. Parses HTTP headers to identify device hardware, operating systems, browsers, and crawlers.</description>
<url>https://51degrees.com?utm_source=maven&amp;utm_medium=package&amp;utm_campaign=51degrees-java&amp;utm_content=device-detection.cloud-pom.xml&amp;utm_term=url</url>
<url>https://github.com/51Degrees/51degrees-java</url>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<artifactId>device-detection.hash.engine.on-premise</artifactId>
<name>51Degrees :: Device Detection :: Hash :: On Premise</name>
<description>High-performance on-premise hash-based device detection engine for Java, built for the 51Degrees Pipeline API. Parses HTTP headers locally to identify device hardware, operating systems, browsers, and crawlers, with no external service calls.</description>
<url>https://51degrees.com?utm_source=maven&amp;utm_medium=package&amp;utm_campaign=51degrees-java&amp;utm_content=device-detection.hash.engine.on-premise-pom.xml&amp;utm_term=url</url>
<url>https://github.com/51Degrees/51degrees-java</url>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion device-detection/device-detection.shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<artifactId>device-detection.shared</artifactId>
<name>51Degrees :: Device Detection :: Shared</name>
<description>Shared components and utilities for building 51Degrees Pipeline API device detection engines in Java. Supports parsing HTTP headers to identify device type, model, OS, browser, and crawler information—an alternative approach to UAParser, DeviceAtlas, and WURFL-based solutions.</description>
<url>https://51degrees.com?utm_source=maven&amp;utm_medium=package&amp;utm_campaign=51degrees-java&amp;utm_content=device-detection.shared-pom.xml&amp;utm_term=url</url>
<url>https://github.com/51Degrees/51degrees-java</url>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion device-detection/device-detection/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<artifactId>device-detection</artifactId>
<name>51Degrees :: Device Detection</name>
<description>Parse HTTP headers to detect the device type, model, OS, browser, and crawler information. This is an alternative to popular UAParser, DeviceAtlas, and WURFL packages.</description>
<url>https://51degrees.com?utm_source=maven&amp;utm_medium=package&amp;utm_campaign=51degrees-java&amp;utm_content=device-detection-pom.xml&amp;utm_term=url</url>
<url>https://github.com/51Degrees/51degrees-java</url>

<dependencies>
<dependency>
Expand Down
8 changes: 6 additions & 2 deletions device-detection/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project child.project.url.inherit.append.path="false" 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>
Expand All @@ -9,7 +9,11 @@
<packaging>pom</packaging>

<name>51Degrees :: Pipeline :: Device Detection</name>
<url>https://51degrees.com?utm_source=maven&amp;utm_medium=package&amp;utm_campaign=51degrees-java&amp;utm_content=pom.xml&amp;utm_term=url</url>
<url>https://github.com/51Degrees/51degrees-java</url>
<organization>
<name>51Degrees</name>
<url>https://51degrees.com/device-detection?utm_source=maven&amp;utm_medium=package&amp;utm_campaign=51degrees-java&amp;utm_content=pipeline.device-detection&amp;utm_term=organization</url>
</organization>
<description>Device detection engines for the 51Degrees Pipeline API</description>

<modules>
Expand Down
29 changes: 12 additions & 17 deletions examples/device-detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Among other things, the examples illustrate:

## Cloud resource keys

You will require [resource keys](https://51degrees.com/documentation/_info__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud-resource-keys)
You will require [resource keys](https://51degrees.com/documentation/_services__cloud__resource_keys.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud-resource-keys)
to use the Cloud API, as described on our website. Get resource keys from
our [configurator](https://configure.51degrees.com/?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud-resource-keys), see our [documentation](https://51degrees.com/documentation/_concepts__configurator.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud-resource-keys) on
our [configurator](https://configure.51degrees.com/?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud-resource-keys), see our [documentation](https://51degrees.com/documentation/_services__configurator.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-java&utm_content=readme.md&utm_term=cloud-resource-keys) on
how to use this.

A resource key configured with the properties needed
Expand All @@ -41,23 +41,18 @@ resource keys and license keys at our [pricing page](https://51degrees.com/prici

## Running examples with changes to Pipeline packages

A common use case is to make a change to the Pipeline logic in
device-detection-java and then use these examples to observe the results of the
change.
A common use case is to make a change to the Device Detection or Pipeline
packages in this repository and then use these examples to observe the
results of the change.

By default, the examples are configured to use the packages from Maven central.
In order to produce and use local packages instead:
By default, the examples use the packages from Maven Central. To build them
against the packages in this repository instead, run Maven from the root of
the repository with the `dev` profile, as the
[root README](../../README.md#examples) describes:

- Clone and make your changes to device-detection-java
- Set the version of the device detection packages that we're going to create to 0.0.0:
`mvn versions:set-property -Dproperty="project.version" "-DnewVersion=0.0.0"`
- Create and install the packages locally (skipping tests is needed):
`mvn clean install [-DskipTests]`
- Modify the POM for the examples to reference these new local packages. This can
be done by editing the POM directly or by using the command line:
`mvn versions:set-property -Dproperty="device-detection.version" "-DnewVersion=0.0.0"`

The same principle can be applied to incorporate changes in pipeline-java if needed.
```
mvn install -DskipTests -Pdev
```

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static void run(String resourceKey,
/* In this example, we use the DeviceDetectionPipelineBuilder and configure it in code.

For more information about pipelines in general see the documentation at
https://51degrees.com/documentation/_concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-gettingstartedcloud.java&utm_term=run
https://51degrees.com/documentation/_pipeline_api__concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-gettingstartedcloud.java&utm_term=run

Note that we wrap the creation of a pipeline in a try/resources to control its lifecycle */
try (Pipeline pipeline = new DeviceDetectionPipelineBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static void run(String dataFile,
options contained in the file "gettingStartedOnPrem.xml".

For more information about pipelines in general see the documentation at
https://51degrees.com/documentation/_concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-gettingstartedonprem.java&utm_term=run
https://51degrees.com/documentation/_pipeline_api__concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-gettingstartedonprem.java&utm_term=run

Note that we wrap the creation of a pipeline in a try/resources to control its lifecycle */
// the configuration file is in the resources directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void run(String dataFile, OutputStream output) throws Exception {
// example. See the documentation for more detail on this and other
// configuration options:
// https://51degrees.com/documentation/_device_detection__features__performance_options.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-metadataonprem.java&utm_term=run
// https://51degrees.com/documentation/_features__automatic_datafile_updates.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-metadataonprem.java&utm_term=run
// https://51degrees.com/documentation/_pipeline_api__features__automatic_datafile_updates.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-metadataonprem.java&utm_term=run
.setPerformanceProfile(Constants.PerformanceProfiles.LowMemory)
// inhibit auto-update of the data file for this test
.setAutoUpdate(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/**
* This is the code for the minimal example displayed in the configurator. Please see
* <a href="https://51degrees.com/documentation/_examples__device_detection__getting_started__console__cloud.html?utm_source=code&amp;utm_medium=example&amp;utm_campaign=51degrees-java&amp;utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-minimalexample.java&amp;utm_term=minimalexample">
* <a href="https://51degrees.com/documentation/_device_detection__examples__getting_started__console__cloud.html?utm_source=code&amp;utm_medium=example&amp;utm_campaign=51degrees-java&amp;utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-minimalexample.java&amp;utm_term=minimalexample">
* Getting Started Console Cloud</a> for a fuller example.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static void run(String resourceKey, OutputStream os) throws Exception {
// This example creates the pipeline and engines in code. For a demonstration
// of how to do this using a configuration file instead, see the TacCloud example.
// For more information about builders in general see the documentation at
// https://51degrees.com/documentation/_concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-nativemodelcloud.java&utm_term=run
// https://51degrees.com/documentation/_pipeline_api__concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-nativemodelcloud.java&utm_term=run
resourceKey = getOrSetSuperResourceKey(resourceKey, NATIVE_MODEL_EXAMPLE_RESOURCE_KEY_NAME);

try (PrintWriter output = new PrintWriter(os)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static void run(String resourceKey, OutputStream os) throws Exception {
// For a demonstration of how to do this in code instead, see the
// NativeModelLookup example.
// For more information about builders in general see the documentation at
// https://51degrees.com/documentation/_concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-taccloud.java&utm_term=run
// https://51degrees.com/documentation/_pipeline_api__concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-devicedetection-examples-console-taccloud.java&utm_term=run

// the configuration file is in the resources directory
File optionsFile = getFilePath("tacCloud.xml");
Expand Down
8 changes: 4 additions & 4 deletions examples/ip-intelligence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ to get a paid subscription with more properties.

## Running Examples and Tests

**IMPORTANT**: All examples and tests must be run from the repository root directory (`ip-intelligence-java-examples/`).
**IMPORTANT**: All examples and tests must be run from this folder, `examples/ip-intelligence`.

### Running Tests

To run all tests:

```bash
# From the repository root directory
# From examples/ip-intelligence
mvn test
```

Expand All @@ -147,14 +147,14 @@ mvn test -pl web/getting-started.onprem
Console examples can be run directly using Maven exec plugin:

```bash
# From the repository root directory
# From examples/ip-intelligence
mvn compile exec:java -pl console -Dexec.mainClass="fiftyone.ipintelligence.examples.console.GettingStartedOnPrem"
```

Web examples:

```bash
# From the repository root directory
# From examples/ip-intelligence
mvn compile exec:java -pl web/getting-started.onprem -Dexec.mainClass="fiftyone.ipintelligence.examples.web.GettingStartedWebOnPrem"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public static void run(String dataFile,
// We use the max performance profile for optimal lookup
// speed in this example. See the documentation for more detail
// on this and other configuration options.
// https://51degrees.com/documentation/_features__automatic_datafile_updates.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-ipintelligence-examples-console-compareonprem.java&utm_term=automatic-datafile-updates
// https://51degrees.com/documentation/_pipeline_api__features__automatic_datafile_updates.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-ipintelligence-examples-console-compareonprem.java&utm_term=automatic-datafile-updates
.setPerformanceProfile(Constants.PerformanceProfiles.MaxPerformance)
// inhibit sharing usage for this example
.setShareUsage(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static void run(String resourceKey,
/* In this example, we use the IPIntelligencePipelineBuilder and configure it in code.

For more information about pipelines in general see the documentation at
https://51degrees.com/documentation/_concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-ipintelligence-examples-console-gettingstartedcloud.java&utm_term=configuration-builders
https://51degrees.com/documentation/_pipeline_api__concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-ipintelligence-examples-console-gettingstartedcloud.java&utm_term=configuration-builders

Note that we wrap the creation of a pipeline in a try/resources to control its lifecycle */
IPIntelligenceCloudPipelineBuilder builder = new IPIntelligencePipelineBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static void run(String dataFile,
options contained in the file "gettingStartedOnPrem.xml".

For more information about pipelines in general see the documentation at
https://51degrees.com/documentation/_concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-ipintelligence-examples-console-gettingstartedonprem.java&utm_term=run
https://51degrees.com/documentation/_pipeline_api__concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-java&utm_content=console-src-main-java-fiftyone-ipintelligence-examples-console-gettingstartedonprem.java&utm_term=run

Note that we wrap the creation of a pipeline in a try/resources to control its lifecycle */
// the configuration file is in the resources directory
Expand Down
Loading
Loading