diff --git a/LICENSE.txt b/LICENSE.TXT
similarity index 100%
rename from LICENSE.txt
rename to LICENSE.TXT
diff --git a/assemblies/pentaho-server/src/assembly/assembly.xml b/assemblies/pentaho-server/src/assembly/assembly.xml
index 13d669f3457..50a5639adc5 100644
--- a/assemblies/pentaho-server/src/assembly/assembly.xml
+++ b/assemblies/pentaho-server/src/assembly/assembly.xml
@@ -78,6 +78,14 @@
${project.build.directory}/pentaho-solutions/system/dialects/hsqldb
pentaho-solutions/system
+
+
+ ${project.basedir}/../..
+
+ LICENSE.TXT
+
+ .
+
diff --git a/user-console/LICENSE.txt b/user-console/LICENSE.txt
deleted file mode 100644
index f24dee4b693..00000000000
--- a/user-console/LICENSE.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-Pentaho Developer Edition 10.2 Copyright 2024 Hitachi Vantara, LLC; licensed under the
-Business Source License 1.1 (BSL). This project may include third party components that
-are individually licensed per the terms indicated by their respective copyright owners
-included in text file or in the source code.
-
-License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
-"Business Source License" is a trademark of MariaDB Corporation Ab.r
-
-Parameters
-
-Licensor: Hitachi Vantara, LLC.
-Licensed Work: Pentaho Developer Edition 10.2. The Licensed Work is (c) 2024
- Hitachi Vantara, LLC.
-Additional Use Grant: None
-Change Date: Four years from the date the Licensed Work is published.
-Change License: Apache 2.0
-
-For information about alternative licensing arrangements for the Licensed Work,
-please contact support@pentaho.com.
-
-Notice
-
-Business Source License 1.1
-
-Terms
-
-The Licensor hereby grants you the right to copy, modify, create derivative
-works, redistribute, and make non-production use of the Licensed Work. The
-Licensor may make an Additional Use Grant, above, permitting limited production use.
-
-Effective on the Change Date, or the fourth anniversary of the first publicly
-available distribution of a specific version of the Licensed Work under this
-License, whichever comes first, the Licensor hereby grants you rights under
-the terms of the Change License, and the rights granted in the paragraph
-above terminate.
-
-If your use of the Licensed Work does not comply with the requirements
-currently in effect as described in this License, you must purchase a
-commercial license from the Licensor, its affiliated entities, or authorized
-resellers, or you must refrain from using the Licensed Work.
-
-All copies of the original and modified Licensed Work, and derivative works
-of the Licensed Work, are subject to this License. This License applies
-separately for each version of the Licensed Work and the Change Date may vary
-for each version of the Licensed Work released by Licensor.
-
-You must conspicuously display this License on each original or modified copy
-of the Licensed Work. If you receive the Licensed Work in original or
-modified form from a third party, the terms and conditions set forth in this
-License apply to your use of that work.
-
-Any use of the Licensed Work in violation of this License will automatically
-terminate your rights under this License for the current and all other
-versions of the Licensed Work.
-
-This License does not grant you any right in any trademark or logo of
-Licensor or its affiliates (provided that you may use a trademark or logo of
-Licensor as expressly required by this License).
-
-TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
-AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
-EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
\ No newline at end of file
diff --git a/user-console/pom.xml b/user-console/pom.xml
index cd60ea6c4be..247bbc128f8 100644
--- a/user-console/pom.xml
+++ b/user-console/pom.xml
@@ -428,6 +428,18 @@
maven-antrun-plugin
+
+ copy-license-file
+ generate-resources
+
+ run
+
+
+
+
+
+
+
copy-jquery-files
generate-resources
diff --git a/user-console/src/main/java/org/pentaho/mantle/client/commands/AboutCommand.java b/user-console/src/main/java/org/pentaho/mantle/client/commands/AboutCommand.java
index f7368f0cd48..a573f1e1a4b 100644
--- a/user-console/src/main/java/org/pentaho/mantle/client/commands/AboutCommand.java
+++ b/user-console/src/main/java/org/pentaho/mantle/client/commands/AboutCommand.java
@@ -27,18 +27,17 @@
import org.pentaho.gwt.widgets.client.utils.string.StringUtils;
import org.pentaho.mantle.client.MantleApplication;
import org.pentaho.mantle.client.messages.Messages;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.resources.client.ClientBundle;
-import com.google.gwt.resources.client.TextResource;
import java.util.Date;
public class AboutCommand extends AbstractCommand {
+ private static final String LICENSE_FILE_URL = GWT.getHostPageBaseURL() + "mantle/LICENSE.TXT";
- interface MyTextResource extends ClientBundle {
- @Source("org/pentaho/mantle/public/license.txt")
- TextResource myText();
- }
+ private static final String LICENSE_READ_ERROR =
+ "Error reading license file from server URL: \"" + LICENSE_FILE_URL + "\"";
+
+ private String versionText;
+ private String licenseText;
public AboutCommand() {
}
@@ -47,9 +46,33 @@ protected void performOperation() {
performOperation( true );
}
+ /**
+ * Begins callback chain for About window values then opens the window:
+ * -> retrieve version (if not set)
+ * -> retrieve license text (if not set nor error)
+ * -> show the window
+ */
protected void performOperation( boolean feedback ) {
- if ( StringUtils.isEmpty( MantleApplication.mantleRevisionOverride ) == false ) {
- showAboutDialog( MantleApplication.mantleRevisionOverride );
+ retrieveVersionValue();
+ }
+
+
+ //Setters are here to be accessible in RequestCallbacks
+ private void setVersionText( String text ) {
+ versionText = text;
+ }
+
+ private void setLicenseFileText( String text ) {
+ licenseText = text.replace( "\t", " " );
+ licenseText = "" + licenseText + "
";
+ }
+
+ private void retrieveVersionValue() {
+ if ( versionText != null && !versionText.isEmpty() ) {
+ retrieveLicenseFileText();
+ } else if ( StringUtils.isEmpty( MantleApplication.mantleRevisionOverride ) == false ) {
+ setVersionText( MantleApplication.mantleRevisionOverride );
+ retrieveLicenseFileText();
} else {
final String url = GWT.getHostPageBaseURL() + "api/version/show"; //$NON-NLS-1$
RequestBuilder requestBuilder = new RequestBuilder( RequestBuilder.GET, url );
@@ -59,43 +82,58 @@ protected void performOperation( boolean feedback ) {
requestBuilder.sendRequest( null, new RequestCallback() {
public void onError( Request request, Throwable exception ) {
- // showError(exception);
}
public void onResponseReceived( Request request, Response response ) {
- showAboutDialog( response.getText() );
+ setVersionText( response.getText() );
+ retrieveLicenseFileText();
}
} );
} catch ( RequestException e ) {
Window.alert( e.getMessage() );
- // showError(e);
}
}
}
- public String readTextFile() {
- MyTextResource resource = GWT.create(MyTextResource.class);
- String text = resource.myText().getText();
- text = text.replace("\t", " ");
- text = "" + text + "
";
- return text;
+ private void retrieveLicenseFileText() {
+ //if we already have a license text value that isn't the ERROR value, don't bother getting the value again.
+ if ( licenseText != null && !licenseText.isEmpty() && licenseText != LICENSE_READ_ERROR ) {
+ showAboutDialog();
+ } else {
+ RequestBuilder licenseFileRequest = new RequestBuilder( RequestBuilder.GET, LICENSE_FILE_URL );
+ licenseFileRequest.setHeader( "If-Modified-Since", "01 Jan 1970 00:00:00 GMT" );
+ licenseFileRequest.setHeader( "accept", "text/plain" );
+
+ try {
+ licenseFileRequest.sendRequest( null, new RequestCallback() {
+
+ public void onError( Request request, Throwable exception ) {
+ setLicenseFileText( LICENSE_READ_ERROR );
+ showAboutDialog();
+ }
+
+ public void onResponseReceived( Request request, Response response ) {
+ setLicenseFileText( response.getText() );
+ showAboutDialog();
+ }
+ } );
+ } catch ( RequestException e ) {
+ Window.alert( e.getMessage() );
+ }
+ }
}
- private void showAboutDialog( String version ) {
- @SuppressWarnings( "deprecation" )
- String licenseInfo = Messages.getString( "licenseInfo", "" + ( ( new Date() ).getYear() + 1900 ) );
+ private void showAboutDialog() {
String releaseLabel = Messages.getString( "release" );
PromptDialogBox dialogBox =
- new PromptDialogBox( null, Messages.getString( "ok" ), null, false, true ); //$NON-NLS-1$
-
+ new PromptDialogBox( null, Messages.getString( "ok" ), null, false, true ); //$NON-NLS-1$
VerticalPanel aboutContent = new VerticalPanel();
- aboutContent.setBorderWidth(0);
- String licenseText = readTextFile();
+ aboutContent.setBorderWidth( 0 );
aboutContent.setStyleName( "about-splash" );
- aboutContent.add( new Label( releaseLabel + " " + version ) );
+ aboutContent.add( new Label( releaseLabel + " " + versionText ) );
aboutContent.add( new HTML( licenseText ) );
dialogBox.setContent( aboutContent );
- dialogBox.setPixelSize(700, 400);
+ dialogBox.setPixelSize( 700, 400 );
dialogBox.center();
}
}
\ No newline at end of file
diff --git a/user-console/src/main/resources/org/pentaho/mantle/public/license.txt b/user-console/src/main/resources/org/pentaho/mantle/public/license.txt
deleted file mode 100644
index d599bd78e60..00000000000
--- a/user-console/src/main/resources/org/pentaho/mantle/public/license.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-Pentaho Developer Edition 10.2 Copyright 2024 Hitachi Vantara, LLC; licensed under the
-Business Source License 1.1 (BSL). This project may include third party components that
-are individually licensed per the terms indicated by their respective copyright owners
-included in text file or in the source code.
-
-License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
-"Business Source License" is a trademark of MariaDB Corporation Ab.
-
-Parameters
-
-Licensor: Hitachi Vantara, LLC.
-Licensed Work: Pentaho Developer Edition 10.2. The Licensed Work is (c) 2024
- Hitachi Vantara, LLC.
-Additional Use Grant: None
-Change Date: Four years from the date the Licensed Work is published.
-Change License: Apache 2.0
-
-For information about alternative licensing arrangements for the Licensed Work,
-please contact support@pentaho.com.
-
-Notice
-
-Business Source License 1.1
-
-Terms
-
-The Licensor hereby grants you the right to copy, modify, create derivative
-works, redistribute, and make non-production use of the Licensed Work. The
-Licensor may make an Additional Use Grant, above, permitting limited production use.
-
-Effective on the Change Date, or the fourth anniversary of the first publicly
-available distribution of a specific version of the Licensed Work under this
-License, whichever comes first, the Licensor hereby grants you rights under
-the terms of the Change License, and the rights granted in the paragraph
-above terminate.
-
-If your use of the Licensed Work does not comply with the requirements
-currently in effect as described in this License, you must purchase a
-commercial license from the Licensor, its affiliated entities, or authorized
-resellers, or you must refrain from using the Licensed Work.
-
-All copies of the original and modified Licensed Work, and derivative works
-of the Licensed Work, are subject to this License. This License applies
-separately for each version of the Licensed Work and the Change Date may vary
-for each version of the Licensed Work released by Licensor.
-
-You must conspicuously display this License on each original or modified copy
-of the Licensed Work. If you receive the Licensed Work in original or
-modified form from a third party, the terms and conditions set forth in this
-License apply to your use of that work.
-
-Any use of the Licensed Work in violation of this License will automatically
-terminate your rights under this License for the current and all other
-versions of the Licensed Work.
-
-This License does not grant you any right in any trademark or logo of
-Licensor or its affiliates (provided that you may use a trademark or logo of
-Licensor as expressly required by this License).
-
-TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
-AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
-EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
\ No newline at end of file