Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade licensor parent version to 14.10 #163 #167

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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 Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// See https://github.com/jenkinsci/workflow-cps-global-lib-plugin for details.

xwikisasModule {
javaTool = 'java8'
javaTool = 'java11'
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Manage and enforce application licenses for paid extensions
* [Documentation & Download](http://store.xwiki.com/xwiki/bin/view/Extension/Licensing+Application)
* [JIRA Issue Tracker](https://github.com/xwikisas/application-licensing/issues)
* [Development Practices](http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices)
* Minimal XWiki version supported: XWiki 13.10
* Minimal XWiki version supported: XWiki 14.10
* License: LGPL 2.1
* Translations: N/A
* Sonar Dashboard: N/A
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import org.xwiki.crypto.internal.DefaultSecureRandomProvider;
import org.xwiki.crypto.internal.asymmetric.keyfactory.BcDSAKeyFactory;
import org.xwiki.crypto.internal.digest.factory.BcSHA1DigestFactory;
import org.xwiki.crypto.internal.asymmetric.keyfactory.BcRSAKeyFactory;
import org.xwiki.crypto.internal.digest.factory.BcSHA256DigestFactory;
import org.xwiki.crypto.internal.digest.factory.DefaultDigestFactory;
import org.xwiki.crypto.internal.encoder.Base64BinaryStringEncoder;
import org.xwiki.crypto.pkix.internal.BcStoreX509CertificateProvider;
import org.xwiki.crypto.pkix.internal.BcX509CertificateChainBuilder;
import org.xwiki.crypto.pkix.internal.BcX509CertificateFactory;
import org.xwiki.crypto.pkix.internal.BcX509CertificateGeneratorFactory;
import org.xwiki.crypto.pkix.params.x509certificate.X509CertificateParameters;
import org.xwiki.crypto.signer.internal.DefaultBcContentVerifierProviderBuilder;
import org.xwiki.crypto.signer.internal.cms.DefaultCMSSignedDataVerifier;
import org.xwiki.crypto.signer.internal.factory.BcDSAwithSHA1SignerFactory;
import org.xwiki.crypto.signer.internal.factory.BcSHA1withRsaSignerFactory;
import org.xwiki.crypto.signer.internal.factory.BcSHA256withRsaSignerFactory;
import org.xwiki.crypto.signer.internal.factory.DefaultSignerFactory;
import org.xwiki.test.annotation.ComponentList;

Expand All @@ -56,11 +59,14 @@
@Target({ TYPE, METHOD, ANNOTATION_TYPE })
@ComponentList({
Base64BinaryStringEncoder.class,
DefaultSecureRandomProvider.class,
BcDSAKeyFactory.class,
BcRSAKeyFactory.class,
DefaultDigestFactory.class,
BcSHA1DigestFactory.class,
BcSHA1withRsaSignerFactory.class,
BcDSAwithSHA1SignerFactory.class,
BcSHA256DigestFactory.class,
BcSHA256withRsaSignerFactory.class,
BcX509CertificateGeneratorFactory.class,
X509CertificateParameters.class,
DefaultSignerFactory.class,
BcX509CertificateFactory.class,
DefaultBcContentVerifierProviderBuilder.class,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,23 @@
<!-- Only contain generated sources for which we don't control the code style -->
<xwiki.checkstyle.skip>true</xwiki.checkstyle.skip>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<configuration>
<extension>true</extension>
<args>
<arg>-Xfluent-api</arg>
</args>
<generatePackage>com.xwiki.licensing.model.jaxb</generatePackage>
<verbose>true</verbose>
<removeOldOutput>false</removeOldOutput>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-fluent-api</artifactId>
<version>3.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-default-value</artifactId>
<version>1.1</version>
</plugin>
</plugins>
</configuration>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<xwiki.extension.namespaces>{root}</xwiki.extension.namespaces>
<checkstyle.suppressions.location>${basedir}/src/main/checkstyle/checkstyle-suppressions.xml</checkstyle.suppressions.location>
<xwiki.jacoco.instructionRatio>0.50</xwiki.jacoco.instructionRatio>
<!-- Added for the licensor-ui dependency, since a JAR extension shouldn't depend on a XAR one. -->
<xwiki.enforcer.banneddependencytype-xar.skip>true</xwiki.enforcer.banneddependencytype-xar.skip>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it depend on the UI module?

Copy link
Contributor Author

@oanalavinia oanalavinia Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand, this is how the licensor was designed, so each pro app has the api module as dependency, which has the ui. This, as we know, makes the pro (licensed) apps to be identified by the api dependency and I guess that they didn't used the ui module instead since you might want to depend on it for other usecases (displaying something, I don't know). Or simply it wasn't a best practice at that moment to not have apis depending on xar and the current solution felt more natural.
Anyway, I don't think it's an easy fix to avoid it now, maybe only adding also the ui dependency besides the api one, but I'm not very fond of this. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, If i understand correctly, the pro apps have a dependency to the licensor-api which marks them as an app that requires a license. The licensor-api has a dependency to the ui module in order to bring all the xwiki pages when installing the the mentioned pro app.

In order to get rid of this dependency to the ui module, we would need to update the code that checks whether an app depends on the licensor-api and update all the pro apps to depend on the licensor-ui?

If so, it does sound like plenty of work that might cause some complications. But it might also be fairly simple to do. (unless im missing some implications).

I'm not a fan of also adding the ui dependency. Doing that or skipping the enforcer is kind of the same thing - a hack that needs a comment as an explanation.

I think its ok to leave this as is, for now. But it would be useful to have an issue for this.

</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.AddLicense" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.AddLicense" locale="">
<web>Licenses.Code</web>
<name>AddLicense</name>
<language/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.AutomaticUpgradesClass" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.AutomaticUpgradesClass" locale="">
<web>Licenses.Code</web>
<name>AutomaticUpgradesClass</name>
<language/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.GetTrialLicenseService" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.GetTrialLicenseService" locale="">
<web>Licenses.Code</web>
<name>GetTrialLicenseService</name>
<language/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.LicenseJSON" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.LicenseJSON" locale="">
<web>Licenses.Code</web>
<name>LicenseJSON</name>
<language/>
Expand Down Expand Up @@ -202,6 +202,7 @@ $jsontool.serialize({
<name>code</name>
<number>2</number>
<prettyName>Code</prettyName>
<restricted>0</restricted>
<rows>20</rows>
<size>50</size>
<unmodifiable>0</unmodifiable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.LicensedExtensionUpgradeJob" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.LicensedExtensionUpgradeJob" locale="">
<web>Licenses.Code</web>
<name>LicensedExtensionUpgradeJob</name>
<language/>
Expand Down Expand Up @@ -101,6 +101,7 @@
<name>jobDescription</name>
<number>2</number>
<prettyName>Job Description</prettyName>
<restricted>0</restricted>
<rows>10</rows>
<size>45</size>
<unmodifiable>0</unmodifiable>
Expand All @@ -122,6 +123,7 @@
<name>script</name>
<number>6</number>
<prettyName>Job Script</prettyName>
<restricted>0</restricted>
<rows>10</rows>
<size>60</size>
<unmodifiable>0</unmodifiable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.LicensesNotificationsUIX" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.LicensesNotificationsUIX" locale="">
<web>Licenses.Code</web>
<name>LicensesNotificationsUIX</name>
<language/>
Expand Down Expand Up @@ -115,6 +115,7 @@
<name>code</name>
<number>2</number>
<prettyName>Code</prettyName>
<restricted>0</restricted>
<rows>20</rows>
<size>50</size>
<unmodifiable>0</unmodifiable>
Expand Down Expand Up @@ -250,7 +251,7 @@
<separators>|, </separators>
<size>5</size>
<unmodifiable>0</unmodifiable>
<values>action=Action|doc.reference=Document|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.parameters=Request parameters|request.url=Request URL|request.wiki=Request wiki|user=User|wiki=Wiki</values>
<values>action=Action|doc.reference=Document|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.cookies|request.headers|request.parameters=Request parameters|request.remoteAddr|request.url=Request URL|request.wiki=Request wiki|user=User|wiki=Wiki</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</async_context>
<async_enabled>
Expand All @@ -270,6 +271,7 @@
<name>content</name>
<number>1</number>
<prettyName>Executed Content</prettyName>
<restricted>0</restricted>
<rows>25</rows>
<size>120</size>
<unmodifiable>0</unmodifiable>
Expand Down Expand Up @@ -300,6 +302,7 @@
<name>parameters</name>
<number>7</number>
<prettyName>Extension Parameters</prettyName>
<restricted>0</restricted>
<rows>10</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.LicensingConfig" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.LicensingConfig" locale="">
<web>Licenses.Code</web>
<name>LicensingConfig</name>
<language/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.LicensingOwnerClass" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.LicensingOwnerClass" locale="">
<web>Licenses.Code</web>
<name>LicensingOwnerClass</name>
<language/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.LicensingStoreClass" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.LicensingStoreClass" locale="">
<web>Licenses.Code</web>
<name>LicensingStoreClass</name>
<language/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.MissingLicenseMessageMacro" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.MissingLicenseMessageMacro" locale="">
<web>Licenses.Code</web>
<name>MissingLicenseMessageMacro</name>
<language/>
Expand Down Expand Up @@ -77,7 +77,7 @@
<separators>|, </separators>
<size>5</size>
<unmodifiable>0</unmodifiable>
<values>action=Action|doc.reference=Document|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.parameters=Request parameters|request.url=Request URL|request.wiki=Request wiki|user=User|wiki=Wiki</values>
<values>action=Action|doc.reference=Document|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.cookies|request.headers|request.parameters=Request parameters|request.remoteAddr|request.url=Request URL|request.wiki=Request wiki|user=User|wiki=Wiki</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</async_context>
<async_enabled>
Expand All @@ -97,6 +97,7 @@
<name>code</name>
<number>10</number>
<prettyName>Macro code</prettyName>
<restricted>0</restricted>
<rows>20</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
Expand All @@ -109,6 +110,7 @@
<name>contentDescription</name>
<number>9</number>
<prettyName>Content description (Not applicable for "No content" type)</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
Expand Down Expand Up @@ -152,22 +154,32 @@
<values>Optional|Mandatory|No content</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</contentType>
<defaultCategory>
<defaultCategories>
<cache>0</cache>
<disabled>0</disabled>
<name>defaultCategory</name>
<displayType>input</displayType>
<freeText>forbidden</freeText>
<largeStorage>0</largeStorage>
<multiSelect>1</multiSelect>
<name>defaultCategories</name>
<number>4</number>
<prettyName>Default category</prettyName>
<size>30</size>
<prettyName>Default categories</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators>|, </separators>
<size>1</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</defaultCategory>
<values/>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</defaultCategories>
<description>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>description</name>
<number>3</number>
<prettyName>Macro description</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
Expand Down Expand Up @@ -272,7 +284,7 @@
<contentType>No content</contentType>
</property>
<property>
<defaultCategory/>
<defaultCategories/>
oanalavinia marked this conversation as resolved.
Show resolved Hide resolved
</property>
<property>
<description>Display an error message when the extension does not have a valid license.</description>
Expand Down Expand Up @@ -321,6 +333,7 @@
<name>description</name>
<number>2</number>
<prettyName>Parameter description</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.MissingLicensesUIX" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.MissingLicensesUIX" locale="">
<web>Licenses.Code</web>
<name>MissingLicensesUIX</name>
<language/>
Expand Down Expand Up @@ -77,7 +77,7 @@
<separators>|, </separators>
<size>5</size>
<unmodifiable>0</unmodifiable>
<values>action=Action|doc.reference=Document|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.parameters=Request parameters|request.url=Request URL|request.wiki=Request wiki|user=User|wiki=Wiki</values>
<values>action=Action|doc.reference=Document|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.cookies|request.headers|request.parameters=Request parameters|request.remoteAddr|request.url=Request URL|request.wiki=Request wiki|user=User|wiki=Wiki</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</async_context>
<async_enabled>
Expand All @@ -97,6 +97,7 @@
<name>content</name>
<number>1</number>
<prettyName>Executed Content</prettyName>
<restricted>0</restricted>
<rows>25</rows>
<size>120</size>
<unmodifiable>0</unmodifiable>
Expand Down Expand Up @@ -127,6 +128,7 @@
<name>parameters</name>
<number>7</number>
<prettyName>Extension Parameters</prettyName>
<restricted>0</restricted>
<rows>10</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="Licenses.Code.NewExtensionVersionAvailableJob" locale="">
<xwikidoc version="1.5" reference="Licenses.Code.NewExtensionVersionAvailableJob" locale="">
<web>Licenses.Code</web>
<name>NewExtensionVersionAvailableJob</name>
<language/>
Expand Down Expand Up @@ -101,6 +101,7 @@
<name>jobDescription</name>
<number>2</number>
<prettyName>Job Description</prettyName>
<restricted>0</restricted>
<rows>10</rows>
<size>45</size>
<unmodifiable>0</unmodifiable>
Expand All @@ -122,6 +123,7 @@
<name>script</name>
<number>6</number>
<prettyName>Job Script</prettyName>
<restricted>0</restricted>
<rows>10</rows>
<size>60</size>
<unmodifiable>0</unmodifiable>
Expand Down
Loading