Skip to content

Commit

Permalink
Merge pull request #19 from bouvet-apps/feature/xp7.9
Browse files Browse the repository at this point in the history
Feature/xp7.9
  • Loading branch information
vi-h authored Sep 29, 2022
2 parents afbe4ec + 3328893 commit bae5f45
Show file tree
Hide file tree
Showing 20 changed files with 11,446 additions and 3,716 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@
This Enonic XP application adds a widget to your [Enonic XP](https://github.com/enonic/xp) site. This widget lets you check all your content for broken links, both internal (to other content on same site) and external (URL).

## Installation

### Enonic Market
Go into the Enonic XP Application admin tool and install the app from the [Enonic Market](https://market.enonic.com/).

The **Link checker** app will then be available in the widget panel in the content studio.

### Build yourself
Build this app with gradle. In the terminal, from the root of the project, enter `./gradlew build`.
On Windows, just enter `gradlew build` in the command line from the project root.
Next, move the JAR file from /build/libs to your `$XP_HOME/deploy` directory.

The **Link checker** app will then be available in the widget panel in the content studio.

If you update package.json, make sure to run `./gradlew npm_install`.

## How to use this app

After adding this app you should see a new LinkChecker option in detail panel to the top right in the content studio. Selecting a content and pressing the **Start** button will start the process. It will check the current content and all its children content for broken links. You can choose to only check the selected content, only the sub-content of that content or both.
Expand Down Expand Up @@ -67,13 +76,18 @@ If you are running HTTPS and you are met with `failed: Error during WebSocket ha

| Version | XP version |
| ------------- | ------------- |
| 3.0.0 | >=7.9.0 |
| 2.0.1 | >=7.2.0 |
| 2.0.0 | >=7.2.0 |
| 1.0.0 | >=6.12.0 |

Not tested for below 6.12.0

## Changelog
### Version 3.0.0

* Possible to use with Content Security Policy (CSP) from Enonic XP version 7.9.0.
* Localization added, so it now supports Norwegian and English.

### Version 2.0.1

Expand Down
95 changes: 56 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
plugins {
id 'java'
id "com.moowork.node" version "1.3.1"
id 'com.enonic.xp.app' version '2.0.0'
id 'maven-publish'
id 'com.enonic.xp.app' version '3.2.0'
id "com.github.node-gradle.node" version "3.4.0"
id 'org.ajoberstar.grgit' version '4.1.1'
id "com.github.ben-manes.versions" version '0.42.0'
}

sourceCompatibility = "1.8"
targetCompatibility = "1.8"
sourceCompatibility = "1.11"
targetCompatibility = "1.11"

publishing {
publications {
maven(MavenPublication) {
groupId = "${group}"
artifactId = "${projectName}"
version = "${version}"

from components.java
}
}
}

app {
name = project.ext.appName
displayName = 'LinkChecker'
vendorName = 'Bouvet Norge AS'
vendorUrl = 'https://wwww.bouvet.no'
displayName = project.ext.displayName
vendorName = project.ext.vendorName
vendorUrl = project.ext.vendorUrl
systemVersion = "${xpVersion}"
keepArchiveFileName = true
}

sourceSets {
Expand Down Expand Up @@ -42,9 +57,27 @@ task cleanDist(type: Delete) {
println "Cleaned ${rootDir}/dist/${projectName}.jar"
}

task installWithCI(
type: NpmTask,
group: 'node',
description: 'Install node dependencies with ci, ignoring scripts'
) {
inputs.files "package.json"
outputs.dir "./node_modules"
args = ['ci', '--ignore-scripts', '--quiet']
}

task npm_install(
type: NpmTask,
group: 'node',
description: 'Install node dependencies, ignoring scripts'
) {
args = ['install', '--ignore-scripts', '--quiet']
}

task npmBuild(type: NpmTask,
group: 'node',
dependsOn: 'npmInstall',
dependsOn: 'installWithCI',
description: 'Transpile ES6 files'
) {
args = ['run', 'build']
Expand All @@ -59,54 +92,38 @@ build.finalizedBy(copyDist)
clean.dependsOn(cleanDist)

dependencies {
compile "com.enonic.xp:core-api:${xpVersion}"
compile "com.enonic.xp:portal-api:${xpVersion}"
include "com.enonic.xp:lib-content:${xpVersion}"
include "com.enonic.xp:lib-portal:${xpVersion}"
implementation "com.enonic.xp:core-api:${xpVersion}"
implementation "com.enonic.xp:portal-api:${xpVersion}"
include "com.enonic.xp:lib-auth:${xpVersion}"
include "com.enonic.xp:lib-content:${xpVersion}"
include "com.enonic.xp:lib-context:${xpVersion}"
include "com.enonic.xp:lib-i18n:${xpVersion}"
include "com.enonic.xp:lib-portal:${xpVersion}"
include "com.enonic.xp:lib-websocket:${xpVersion}"
include "com.enonic.lib:lib-thymeleaf:2.0.0"
include 'com.enonic.lib:lib-http-client:2.2.1'
include 'com.enonic.lib:lib-cache:1.1.0'
include 'com.enonic.lib:lib-cache:2.1.1'
include 'com.enonic.lib:lib-http-client:3.1.0'
include "com.enonic.lib:lib-thymeleaf:2.0.1"
}

repositories {
mavenLocal()
jcenter()
mavenCentral()
xp.enonicRepo()
maven { url 'https://jitpack.io' }
maven { url 'http://repo.enonic.com/public' }
maven { url 'https://repo.enonic.com/public' }
}

node {
// Version of node to use.
version = '12.16.0'
version = '16.14.2'
// Version of npm to use.
npmVersion = '6.13.4'
npmVersion = '8.5.0'
// If true, it will download node using above parameters.
// If false, it will try to use globally installed node.
download = true
}

wrapper {
gradleVersion = '5.6.4'
gradleVersion = '7.3.1'
distributionType = Wrapper.DistributionType.BIN
}


publishing {
publications {
mavenJava( MavenPublication ) {
from components.java
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/bouvet-apps/distro"
credentials {
username = project.property("bouvetGithubUser")
password = project.property("bouvetGithubToken")
}
}
}
}
Binary file modified dist/linkchecker.jar
Binary file not shown.
10 changes: 6 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#
# Project settings
#
group = no.bouvet
group = no.bouvet.app
projectName = linkchecker
appName = no.bouvet.app.linkchecker
xpVersion = 7.2.0
version = 2.0.1
jarVersion = 2.0.1
displayName = LinkChecker
vendorName = Bouvet Norge AS
vendorUrl = https://www.bouvet.no
xpVersion = 7.9.0
version = 3.0.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 4 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdk:
- openjdk11
install:
- ./gradlew build publishToMavenLocal
Loading

0 comments on commit bae5f45

Please sign in to comment.