buildbot success in on wicket-branch-8.x

2019-05-23 Thread buildbot
The Buildbot has detected a restored build on builder wicket-branch-8.x while 
building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-branch-8.x/builds/126

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-branch-8.x-commit' triggered this build
Build Source Stamp: [branch wicket-8.x] eb6b7f6ac58700c95de283c9bcbab4ee740d6060
Blamelist: Martin Tzvetanov Grigorov 

Build succeeded!

Sincerely,
 -The Buildbot





buildbot success in on wicket-master-java13

2019-05-23 Thread buildbot
The Buildbot has detected a restored build on builder wicket-master-java13 
while building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-master-java13/builds/74

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-master-java13-commit' triggered this build
Build Source Stamp: [branch master] a4b92a4322ec00832afc2fdbe2d885ca476ba6c5
Blamelist: Martin Tzvetanov Grigorov 

Build succeeded!

Sincerely,
 -The Buildbot





[wicket] branch master updated: Remove testing/wicket-arquillian from the sub-modules

2019-05-23 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
 new a4b92a4  Remove testing/wicket-arquillian from the sub-modules
a4b92a4 is described below

commit a4b92a4322ec00832afc2fdbe2d885ca476ba6c5
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu May 23 15:54:12 2019 +0300

Remove testing/wicket-arquillian from the sub-modules

It leads to build failures at BuildBot due to clashing ports. And slows 
down the build locally.
This way the code will stay in Git for anyone who wants to use it as 
inspiration, but since there is no special integration there is no chance to 
regress here.

(cherry picked from commit eb6b7f6ac58700c95de283c9bcbab4ee740d6060)
---
 pom.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 3e78ca9..9e69d7f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -115,7 +115,6 @@
archetypes/quickstart
testing/wicket-common-tests
testing/wicket-js-tests
-   testing/wicket-arquillian
wicket-native-websocket
wicket-bean-validation
wicket-user-guide



[wicket] branch wicket-8.x updated: Remove testing/wicket-arquillian from the sub-modules

2019-05-23 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch wicket-8.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-8.x by this push:
 new eb6b7f6  Remove testing/wicket-arquillian from the sub-modules
eb6b7f6 is described below

commit eb6b7f6ac58700c95de283c9bcbab4ee740d6060
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu May 23 15:54:12 2019 +0300

Remove testing/wicket-arquillian from the sub-modules

It leads to build failures at BuildBot due to clashing ports. And slows 
down the build locally.
This way the code will stay in Git for anyone who wants to use it as 
inspiration, but since there is no special integration there is no chance to 
regress here.
---
 pom.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index df20b8e..949cdb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,7 +105,6 @@
archetypes/quickstart
testing/wicket-common-tests
testing/wicket-js-tests
-   testing/wicket-arquillian
wicket-native-websocket
wicket-bean-validation
wicket-cdi-1.1



buildbot failure in on wicket-branch-8.x

2019-05-23 Thread buildbot
The Buildbot has detected a new failure on builder wicket-branch-8.x while 
building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-branch-8.x/builds/125

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-branch-8.x-commit' triggered this build
Build Source Stamp: [branch wicket-8.x] e2a11151e2bc55ae3a637efd88b1202582461780
Blamelist: Martin Tzvetanov Grigorov 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





buildbot failure in on wicket-master-java13

2019-05-23 Thread buildbot
The Buildbot has detected a new failure on builder wicket-master-java13 while 
building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-master-java13/builds/73

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-master-java13-commit' triggered this build
Build Source Stamp: [branch master] d41abaa36d96eadcf3144ddd7340c70005fc8c87
Blamelist: Martin Tzvetanov Grigorov 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread Martin Grigorov (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846674#comment-16846674
 ] 

Martin Grigorov commented on WICKET-6669:
-

Thanks for the reference, [~thomas.heigl]!

If the approach is good for getCacheKey() then I think it should be good for 
this problem as well.
We will see soon.

> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
> Fix For: 8.5.0, 9.0.0-M2, 7.14.0
>
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (WICKET-6611) Missing check for IScopeAwareTextResourceProcessor when concatenating resources

2019-05-23 Thread Martin Grigorov (JIRA)


 [ 
https://issues.apache.org/jira/browse/WICKET-6611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-6611.
-
   Resolution: Duplicate
 Assignee: Martin Grigorov
Fix Version/s: 7.14.0
   9.0.0-M2
   8.5.0

Fixed with WICKET-6669

> Missing check for IScopeAwareTextResourceProcessor when concatenating 
> resources
> ---
>
> Key: WICKET-6611
> URL: https://issues.apache.org/jira/browse/WICKET-6611
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 8.1.0
>Reporter: Thomas Heigl
>Assignee: Martin Grigorov
>Priority: Major
> Fix For: 8.5.0, 9.0.0-M2, 7.14.0
>
>
> Resource concatenation cannot be used with text compressors relying on scope 
> information.
> I tried to use {{CssUrlReplacer}} in my application and it failed on startup 
> with an {{UnsupportedOperationException}} in the {{compress}} method.
> In {{CssPackageResource}} we have the following code:  
> {code:java}
> ICssCompressor compressor = getCompressor();
> if (compressor != null && getCompress())
> {
>try
>{
>   String charsetName = "UTF-8";
>   String nonCompressed = new String(processedResponse, charsetName);
>   String output;
>   if (compressor instanceof IScopeAwareTextResourceProcessor)
>   {
>  IScopeAwareTextResourceProcessor scopeAwareProcessor = 
> (IScopeAwareTextResourceProcessor) compressor;
>  output = scopeAwareProcessor.process(nonCompressed, getScope(), 
> name);
>   }
>   else
>   {
>  output = compressor.compress(nonCompressed);
>   }
>   return output.getBytes(charsetName);
>}
>catch (Exception e)
>{
>   log.error("Error while filtering content", e);
>   return processedResponse;
>}
> }{code}
> In {{ConcatBundleResource}} this {{instanceof}} is missing and {{compress}} 
> is called directly.
> {code:java}
> if (getCompressor() != null)
> {
>String nonCompressed = new String(bytes, "UTF-8");
>bytes = getCompressor().compress(nonCompressed).getBytes("UTF-8");
> }{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


buildbot success in on wicket-master-java12

2019-05-23 Thread buildbot
The Buildbot has detected a restored build on builder wicket-master-java12 
while building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-master-java12/builds/75

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-master-java12-commit' triggered this build
Build Source Stamp: [branch master] d41abaa36d96eadcf3144ddd7340c70005fc8c87
Blamelist: Martin Tzvetanov Grigorov 

Build succeeded!

Sincerely,
 -The Buildbot





[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread Thomas Heigl (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846670#comment-16846670
 ] 

Thomas Heigl commented on WICKET-6669:
--

This should also fix my issue WICKET-6611

> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
> Fix For: 8.5.0, 9.0.0-M2, 7.14.0
>
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846663#comment-16846663
 ] 

ASF subversion and git services commented on WICKET-6669:
-

Commit d41abaa36d96eadcf3144ddd7340c70005fc8c87 in wicket's branch 
refs/heads/master from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=d41abaa ]

WICKET-6669 Use the scope and name of the first provided resource for 
IScopeAwareTextResourceProcessor#process()

The same is already done in ConcatBundleResource#getCacheKey()

(cherry picked from commit 8566ed24031641c060871cb0732b7171fd2deac8)


> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
> Fix For: 8.5.0, 9.0.0-M2, 7.14.0
>
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread Martin Grigorov (JIRA)


 [ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-6669.
-
   Resolution: Fixed
Fix Version/s: 7.14.0
   9.0.0-M2
   8.5.0

> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
> Fix For: 8.5.0, 9.0.0-M2, 7.14.0
>
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846662#comment-16846662
 ] 

ASF subversion and git services commented on WICKET-6669:
-

Commit e2a11151e2bc55ae3a637efd88b1202582461780 in wicket's branch 
refs/heads/wicket-8.x from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=e2a1115 ]

WICKET-6669 Use the scope and name of the first provided resource for 
IScopeAwareTextResourceProcessor#process()

The same is already done in ConcatBundleResource#getCacheKey()

(cherry picked from commit 8566ed24031641c060871cb0732b7171fd2deac8)


> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[wicket] branch master updated: WICKET-6669 Use the scope and name of the first provided resource for IScopeAwareTextResourceProcessor#process()

2019-05-23 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
 new d41abaa  WICKET-6669 Use the scope and name of the first provided 
resource for IScopeAwareTextResourceProcessor#process()
d41abaa is described below

commit d41abaa36d96eadcf3144ddd7340c70005fc8c87
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu May 23 09:03:18 2019 +0300

WICKET-6669 Use the scope and name of the first provided resource for 
IScopeAwareTextResourceProcessor#process()

The same is already done in ConcatBundleResource#getCacheKey()

(cherry picked from commit 8566ed24031641c060871cb0732b7171fd2deac8)
---
 .../wicket/resource/bundles/ConcatBundleResource.java | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
index 1a0826f..c7aea39 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
@@ -33,6 +33,7 @@ import org.apache.wicket.request.resource.AbstractResource;
 import org.apache.wicket.request.resource.IResource;
 import org.apache.wicket.request.resource.ResourceReference;
 import org.apache.wicket.request.resource.caching.IStaticCacheableResource;
+import org.apache.wicket.resource.IScopeAwareTextResourceProcessor;
 import org.apache.wicket.resource.ITextResourceCompressor;
 import org.apache.wicket.util.io.ByteArrayOutputStream;
 import org.apache.wicket.util.io.IOUtils;
@@ -174,14 +175,28 @@ public class ConcatBundleResource extends 
AbstractResource implements IStaticCac
{
ByteArrayOutputStream output = new ByteArrayOutputStream();
for (IResourceStream curStream : resources)
+   {
IOUtils.copy(curStream.getInputStream(), output);
+   }
 
byte[] bytes = output.toByteArray();
 
-   if (getCompressor() != null)
+   final ITextResourceCompressor textResourceCompressor = 
getCompressor();
+   if (textResourceCompressor != null)
{
String nonCompressed = new String(bytes, "UTF-8");
-   bytes = 
getCompressor().compress(nonCompressed).getBytes("UTF-8");
+
+   if (textResourceCompressor instanceof 
IScopeAwareTextResourceProcessor)
+   {
+   final ResourceReference reference = 
providedResources.get(0).getReference();
+   final Class scope = reference.getScope();
+   final String name = reference.getName();
+   bytes = ((IScopeAwareTextResourceProcessor) 
textResourceCompressor).process(nonCompressed, scope, name).getBytes("UTF-8");
+   }
+   else
+   {
+   bytes = 
textResourceCompressor.compress(nonCompressed).getBytes("UTF-8");
+   }
}
 
return bytes;



[wicket] branch wicket-8.x updated: WICKET-6669 Use the scope and name of the first provided resource for IScopeAwareTextResourceProcessor#process()

2019-05-23 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch wicket-8.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-8.x by this push:
 new e2a1115  WICKET-6669 Use the scope and name of the first provided 
resource for IScopeAwareTextResourceProcessor#process()
e2a1115 is described below

commit e2a11151e2bc55ae3a637efd88b1202582461780
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu May 23 09:03:18 2019 +0300

WICKET-6669 Use the scope and name of the first provided resource for 
IScopeAwareTextResourceProcessor#process()

The same is already done in ConcatBundleResource#getCacheKey()

(cherry picked from commit 8566ed24031641c060871cb0732b7171fd2deac8)
---
 .../wicket/resource/bundles/ConcatBundleResource.java | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
index 95087c4..62f57a2 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
@@ -32,6 +32,7 @@ import org.apache.wicket.request.resource.AbstractResource;
 import org.apache.wicket.request.resource.IResource;
 import org.apache.wicket.request.resource.ResourceReference;
 import org.apache.wicket.request.resource.caching.IStaticCacheableResource;
+import org.apache.wicket.resource.IScopeAwareTextResourceProcessor;
 import org.apache.wicket.resource.ITextResourceCompressor;
 import org.apache.wicket.util.io.ByteArrayOutputStream;
 import org.apache.wicket.util.io.IOUtils;
@@ -174,14 +175,28 @@ public class ConcatBundleResource extends 
AbstractResource implements IStaticCac
{
ByteArrayOutputStream output = new ByteArrayOutputStream();
for (IResourceStream curStream : resources)
+   {
IOUtils.copy(curStream.getInputStream(), output);
+   }
 
byte[] bytes = output.toByteArray();
 
-   if (getCompressor() != null)
+   final ITextResourceCompressor textResourceCompressor = 
getCompressor();
+   if (textResourceCompressor != null)
{
String nonCompressed = new String(bytes, "UTF-8");
-   bytes = 
getCompressor().compress(nonCompressed).getBytes("UTF-8");
+
+   if (textResourceCompressor instanceof 
IScopeAwareTextResourceProcessor)
+   {
+   final ResourceReference reference = 
providedResources.get(0).getReference();
+   final Class scope = reference.getScope();
+   final String name = reference.getName();
+   bytes = ((IScopeAwareTextResourceProcessor) 
textResourceCompressor).process(nonCompressed, scope, name).getBytes("UTF-8");
+   }
+   else
+   {
+   bytes = 
textResourceCompressor.compress(nonCompressed).getBytes("UTF-8");
+   }
}
 
return bytes;



[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread Sven Meier (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846619#comment-16846619
 ] 

Sven Meier commented on WICKET-6669:


+1

> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


buildbot success in on wicket-master-java13

2019-05-23 Thread buildbot
The Buildbot has detected a restored build on builder wicket-master-java13 
while building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-master-java13/builds/72

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-master-java13-commit' triggered this build
Build Source Stamp: [branch master] 5b78cec619040beb55231d84bcb813088f677968
Blamelist: Martin Tzvetanov Grigorov 

Build succeeded!

Sincerely,
 -The Buildbot





buildbot failure in on wicket-master-java12

2019-05-23 Thread buildbot
The Buildbot has detected a new failure on builder wicket-master-java12 while 
building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-master-java12/builds/74

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-master-java12-commit' triggered this build
Build Source Stamp: [branch master] 5b78cec619040beb55231d84bcb813088f677968
Blamelist: Martin Tzvetanov Grigorov 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





[wicket] branch master updated: Update maven-source-plugin to 3.1.0

2019-05-23 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
 new 5b78cec  Update maven-source-plugin to 3.1.0
5b78cec is described below

commit 5b78cec619040beb55231d84bcb813088f677968
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu May 23 10:05:27 2019 +0300

Update maven-source-plugin to 3.1.0

https://blogs.apache.org/maven/entry/apache-maven-source-plugin-version
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0a0e718..3e78ca9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1018,7 +1018,7 @@
true

org.apache.maven.plugins

maven-source-plugin
-   3.0.1
+   3.1.0


attach-sources



[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread Martin Grigorov (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846450#comment-16846450
 ] 

Martin Grigorov commented on WICKET-6669:
-

Devs: if you don't see problems with the fix I will port it to 8.x and master. 
If you see problems then we can revert it.

> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846449#comment-16846449
 ] 

ASF subversion and git services commented on WICKET-6669:
-

Commit 8566ed24031641c060871cb0732b7171fd2deac8 in wicket's branch 
refs/heads/wicket-7.x from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=8566ed2 ]

WICKET-6669 Use the scope and name of the first provided resource for 
IScopeAwareTextResourceProcessor#process()

The same is already done in ConcatBundleResource#getCacheKey()


> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Priority: Major
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread Martin Grigorov (JIRA)


 [ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov reassigned WICKET-6669:
---

Assignee: Martin Grigorov

> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Assignee: Martin Grigorov
>Priority: Major
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[wicket] branch wicket-7.x updated: WICKET-6669 Use the scope and name of the first provided resource for IScopeAwareTextResourceProcessor#process()

2019-05-23 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch wicket-7.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-7.x by this push:
 new 8566ed2  WICKET-6669 Use the scope and name of the first provided 
resource for IScopeAwareTextResourceProcessor#process()
8566ed2 is described below

commit 8566ed24031641c060871cb0732b7171fd2deac8
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu May 23 09:03:18 2019 +0300

WICKET-6669 Use the scope and name of the first provided resource for 
IScopeAwareTextResourceProcessor#process()

The same is already done in ConcatBundleResource#getCacheKey()
---
 .../resource/IScopeAwareTextResourceProcessor.java|  2 +-
 .../wicket/resource/ITextResourceCompressor.java  |  2 +-
 .../wicket/resource/bundles/ConcatBundleResource.java | 19 +--
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/IScopeAwareTextResourceProcessor.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/IScopeAwareTextResourceProcessor.java
index 169d600..42bceb7 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/IScopeAwareTextResourceProcessor.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/IScopeAwareTextResourceProcessor.java
@@ -35,5 +35,5 @@ public interface IScopeAwareTextResourceProcessor extends 
ITextResourceCompresso
 *  The name of the package resource
 * @return The processed input
 */
-   public String process(String input, Class scope, String name);
+   String process(String input, Class scope, String name);
 }
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/ITextResourceCompressor.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/ITextResourceCompressor.java
index dcbffe6..25b8569 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/ITextResourceCompressor.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/ITextResourceCompressor.java
@@ -27,5 +27,5 @@ public interface ITextResourceCompressor
 * @param original
 * @return compressed text resource
 */
-   public String compress(String original);
+   String compress(String original);
 }
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
index 95087c4..62f57a2 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/bundles/ConcatBundleResource.java
@@ -32,6 +32,7 @@ import org.apache.wicket.request.resource.AbstractResource;
 import org.apache.wicket.request.resource.IResource;
 import org.apache.wicket.request.resource.ResourceReference;
 import org.apache.wicket.request.resource.caching.IStaticCacheableResource;
+import org.apache.wicket.resource.IScopeAwareTextResourceProcessor;
 import org.apache.wicket.resource.ITextResourceCompressor;
 import org.apache.wicket.util.io.ByteArrayOutputStream;
 import org.apache.wicket.util.io.IOUtils;
@@ -174,14 +175,28 @@ public class ConcatBundleResource extends 
AbstractResource implements IStaticCac
{
ByteArrayOutputStream output = new ByteArrayOutputStream();
for (IResourceStream curStream : resources)
+   {
IOUtils.copy(curStream.getInputStream(), output);
+   }
 
byte[] bytes = output.toByteArray();
 
-   if (getCompressor() != null)
+   final ITextResourceCompressor textResourceCompressor = 
getCompressor();
+   if (textResourceCompressor != null)
{
String nonCompressed = new String(bytes, "UTF-8");
-   bytes = 
getCompressor().compress(nonCompressed).getBytes("UTF-8");
+
+   if (textResourceCompressor instanceof 
IScopeAwareTextResourceProcessor)
+   {
+   final ResourceReference reference = 
providedResources.get(0).getReference();
+   final Class scope = reference.getScope();
+   final String name = reference.getName();
+   bytes = ((IScopeAwareTextResourceProcessor) 
textResourceCompressor).process(nonCompressed, scope, name).getBytes("UTF-8");
+   }
+   else
+   {
+   bytes = 
textResourceCompressor.compress(nonCompressed).getBytes("UTF-8");
+   }
}
 
return bytes;



[jira] [Commented] (WICKET-6669) CSS Resource Bundling throws exception when used with CssUrlReplacer

2019-05-23 Thread Martin Grigorov (JIRA)


[ 
https://issues.apache.org/jira/browse/WICKET-6669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16846445#comment-16846445
 ] 

Martin Grigorov commented on WICKET-6669:
-

I have an improvement which I am testing locally.
I will push it to wicket-7.x branch soon.

> CSS Resource Bundling throws exception when used with CssUrlReplacer
> 
>
> Key: WICKET-6669
> URL: https://issues.apache.org/jira/browse/WICKET-6669
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.10.0
>Reporter: Claudia Hirt
>Priority: Major
>
> Using CssUrlReplacer as compressor and trying to create a Css Resource bundle 
> like this:
> {code:java}
> getResourceSettings().setCssCompressor(new CssUrlReplacer());
> getResourceBundles().addCssBundle(WicketApplication.class, "testBundle", new 
> CssResourceReference(WicketApplication.class, "css/cssFile1.css"), new 
> CssResourceReference(WicketApplication.class, "css/cssFile2.css"));{code}
> I get the following stack trace when requesting one of the css files:
> Caused by: java.lang.UnsupportedOperationException: CssUrlReplacer.process() 
> should be used instead!
>  at 
> org.apache.wicket.resource.CssUrlReplacer.compress(CssUrlReplacer.java:159) 
> ~[wicket-core-7.10.0.jar:7.10.0]
>  at 
> org.apache.wicket.resource.bundles.ConcatBundleResource.readAllResources(ConcatBundleResource.java:184)
>  ~[wicket-core-7.10.0.jar:7.10.0]
> 
> ConcatBundleResource calls the compress method of CssUrlReplacer which throws 
> the exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)