Re: Cannot build Tools from trunk
Am 2018-06-28 um 14:34 schrieb Claude Brisson: *you* spotted the bug and the entire Cargo variables are /crap/, unusable for policy files. The produce is java.io.File#toString() which does not work for URIs. The output is "file:D:\Projects\veltools...". This is like MNG-6386. There is no way to fix that, but only in Cargo by adding to each property a subproperty '.uri' via File.toPath().toUri(). I commented out the security manager sections in showcase's pom.xml. It's not even possible to generate the policy file as a filtered resource: - there is a ${project.baseUri} property, but not taken into account by the Maven resources filter (you can workaround it by assigning a new property) https://issues.apache.org/jira/browse/MNG-6436 - there is no such thing as ${localSettings.repositoryUri} (which isn't even a File but a String, is it?) It looks like it's rather a missing Maven feature to let users add an '.uri' suffix to any File property (and to do it accordingly to RFC 3986) or to anything that is known to be the string representation of a path. That is true, though it has never been requested. Definitvely worth to consider for 4.0.0. Michael - To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org
Re: Cannot build Tools from trunk
*you* spotted the bug and the entire Cargo variables are /crap/, unusable for policy files. The produce is java.io.File#toString() which does not work for URIs. The output is "file:D:\Projects\veltools...". This is like MNG-6386. There is no way to fix that, but only in Cargo by adding to each property a subproperty '.uri' via File.toPath().toUri(). I commented out the security manager sections in showcase's pom.xml. It's not even possible to generate the policy file as a filtered resource: - there is a ${project.baseUri} property, but not taken into account by the Maven resources filter (you can workaround it by assigning a new property) - there is no such thing as ${localSettings.repositoryUri} (which isn't even a File but a String, is it?) It looks like it's rather a missing Maven feature to let users add an '.uri' suffix to any File property (and to do it accordingly to RFC 3986) or to anything that is known to be the string representation of a path. - To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org
Re: Cannot build Tools from trunk
Am 2018-06-27 um 20:34 schrieb Claude Brisson: It's running for me under java 8. Log for the cargo section copy pasted below. Is it a linux/windows cargo/jetty problem? I think it's running under a SecurityManager and the policy isn't allowing the "jetty.home" system property to be read. I hitted this error during development, and fixed it with: // Give Jetty libs all permissions grant codeBase "file:@cargo.container@/-" { permission java.security.AllPermission "", ""; }; in the showcase.policy file - it worked for me. Maybe the @cargo.container@ isn't correctly populated. You can check that by inspecting the following file: target/cargo/configurations/jetty9x/showcase.policy For me it shows: grant codeBase "file:/home/claude/Projects/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/target/cargo/installs/-" { permission java.security.AllPermission "", ""; }; If this SecurityManager thing is too touchy, we can leave it commented anyway. But it'd be interesting to understand why it fails. Charming Claude, *you* spotted the bug and the entire Cargo variables are /crap/, unusable for policy files. The produce is java.io.File#toString() which does not work for URIs. The output is "file:D:\Projects\veltools...". This is like MNG-6386. There is no way to fix that, but only in Cargo by adding to each property a subproperty '.uri' via File.toPath().toUri(). The reason by it works for you on your Linux distro is that Java's URI class is crap and does not correspond to RFC 3986. Otherwise it would fail too. Please disable Cargo test for now! BTW, all tests fail on Java 10 on Windows: [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] ViewToolsIT.testBrowserTool:177 » HttpInternalError Error on HTTP request: 500... [ERROR] ViewToolsIT.testContextTool:197 » HttpInternalError Error on HTTP request: 500... [ERROR] ViewToolsIT.testJsonTool:335 » HttpInternalError Error on HTTP request: 500 In... [ERROR] ViewToolsIT.testLinkTool:224 » HttpInternalError Error on HTTP request: 500 In... [ERROR] ViewToolsIT.testParameterParserTool:267 » HttpInternalError Error on HTTP requ... [INFO] [ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0 Michael - To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org
Re: Cannot build Tools from trunk
It's running for me under java 8. Log for the cargo section copy pasted below. Is it a linux/windows cargo/jetty problem? I think it's running under a SecurityManager and the policy isn't allowing the "jetty.home" system property to be read. I hitted this error during development, and fixed it with: // Give Jetty libs all permissions grant codeBase "file:@cargo.container@/-" { permission java.security.AllPermission "", ""; }; in the showcase.policy file - it worked for me. Maybe the @cargo.container@ isn't correctly populated. You can check that by inspecting the following file: target/cargo/configurations/jetty9x/showcase.policy For me it shows: grant codeBase "file:/home/claude/Projects/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/target/cargo/installs/-" { permission java.security.AllPermission "", ""; }; If this SecurityManager thing is too touchy, we can leave it commented anyway. But it'd be interesting to understand why it fails. - To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org
Re: Cannot build Tools from trunk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Claude, On 6/25/18 6:12 PM, Claude Brisson wrote: > It's running for me under java 8. Log for the cargo section copy > pasted below. > > Is it a linux/windows cargo/jetty problem? I think it's running under a SecurityManager and the policy isn't allowing the "jetty.home" system property to be read. - -chris > [INFO] --- cargo-maven2-plugin:1.6.8:start (start-server) @ > velocity-tools-examples-showcase --- [INFO] [2.ContainerStartMojo] > Resolved container artifact > org.codehaus.cargo:cargo-core-container-jetty:jar:1.6.8 for > container jetty9x [INFO] You did not specify a container home nor > any installer. CARGO will automatically download your container's > binaries from > [http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-distribut ion/9.4.10.v20180503/jetty-distribution-9.4.10.v20180503.tar.gz]. > > [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 starting... > [INFO] [stalledLocalDeployer] Deploying WAR by creating Jetty > context XML file in > [/home/claude/Projects/velocity/tools/trunk/velocity-tools-examples/ve locity-tools-examples-showcase/target/cargo/configurations/jetty9x/webap ps/velocity-tools-examples-showcase.xml]... > > [WARNING] [talledLocalContainer] WARN : System properties and/or > JVM args set. Consider using --dry-run or --exec [INFO] > [talledLocalContainer] 2018-06-26 00:07:56.806:INFO::main: Logging > initialized @329ms to org.eclipse.jetty.util.log.StdErrLog [INFO] > [talledLocalContainer] 2018-06-26 00:07:56.929:INFO::main: Console > stderr/stdout captured to > /home/claude/Projects/velocity/tools/trunk/velocity-tools-examples/vel ocity-tools-examples-showcase/target/cargo/configurations/jetty9x/logs/2 018_06_25.jetty.log > > [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 started on > port [8080] [INFO] [INFO] --- > maven-failsafe-plugin:2.22.0:integration-test (integration-test) @ > velocity-tools-examples-showcase --- [INFO] [INFO] > --- [INFO] T E > S T S [INFO] > --- [INFO] > Running org.apache.velocity.examples.showcase.ViewToolsIT [INFO] > Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 1.755 s - in org.apache.velocity.examples.showcase.ViewToolsIT > [INFO] [INFO] Results: [INFO] [INFO] Tests run: 5, Failures: 0, > Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- > cargo-maven2-plugin:1.6.8:stop (stop-server) @ > velocity-tools-examples-showcase --- [INFO] [talledLocalContainer] > Jetty 9.4.10.v20180503 is stopping... [INFO] [talledLocalContainer] > Jetty 9.4.10.v20180503 is stopped > > > On 06/25/2018 11:02 PM, Michael Osipov wrote: >> Folks, >> >> who is able to Tools from trunk? >> >> I cannot with Java 8 and 10: >>> [INFO] --- cargo-maven2-plugin:1.6.8:start (start-server) @ >>> velocity-tools-examples-showcase --- [INFO] >>> [2.ContainerStartMojo] Resolved container artifact >>> org.codehaus.cargo:cargo-core-container-jetty:jar:1.6.8 for >>> container jetty9x [INFO] You did not specify a container home >>> nor any installer. CARGO will automatically download your >>> container's binaries from >>> [http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-distrib ution/9.4.10.v20180503/jetty-distribution-9.4.10.v20180503.tar.gz]. >>> >>> >>> [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 starting... >>> [INFO] [stalledLocalDeployer] Deploying WAR by creating Jetty >>> context XML file in >>> [D:\Entwicklung\Projekte\velocity-tools\velocity-tools-examples\velo city-tools-examples-showcase\target\cargo\configurations\jetty9x\webapps \velocity-tools-examples-showcase.xml]... >>> >>> >>> [INFO] [talledLocalContainer] java.security.AccessControlException: >>> access denied ("java.util.PropertyPermission" "jetty.home" >>> "read") [INFO] [talledLocalContainer] at >>> java.security.AccessControlContext.checkPermission(AccessControlCont ext.java:472) >>> >>> >>> [INFO] [talledLocalContainer] at >>> java.security.AccessController.checkPermission(AccessController.java :884) >>> >>> >>> [INFO] [talledLocalContainer] at >>> java.lang.SecurityManager.checkPermission(SecurityManager.java:549) >>> >>> [INFO] [talledLocalContainer] at >>> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1 294) >>> >>> [INFO] [talledLocalContainer] at >>> java.lang.System.getProperty(System.java:717) [INFO] >>> [talledLocalContainer] at >>> org.eclipse.jetty.start.config.CommandLineConfigSource.findJettyHome Path(CommandLineConfigSource.java:103) >>> >>> >>> [INFO] [talledLocalContainer] at >>> org.eclipse.jetty.start.config.CommandLineConfigSource.(Comman dLineConfigSource.java:62) >>> >>> >>> [INFO] [talledLocalContainer] at >>> org.eclipse.jetty.start.Main.processCommandLine(Main.java:281) >>> [INFO] [talledLocalContainer] at >>> org.eclipse.jetty.start.Main.main(Main.java:75) [INFO] >>> [talledLocalContainer] [INFO]
Re: Cannot build Tools from trunk
It's running for me under java 8. Log for the cargo section copy pasted below. Is it a linux/windows cargo/jetty problem? [INFO] --- cargo-maven2-plugin:1.6.8:start (start-server) @ velocity-tools-examples-showcase --- [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-jetty:jar:1.6.8 for container jetty9x [INFO] You did not specify a container home nor any installer. CARGO will automatically download your container's binaries from [http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.10.v20180503/jetty-distribution-9.4.10.v20180503.tar.gz]. [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 starting... [INFO] [stalledLocalDeployer] Deploying WAR by creating Jetty context XML file in [/home/claude/Projects/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/target/cargo/configurations/jetty9x/webapps/velocity-tools-examples-showcase.xml]... [WARNING] [talledLocalContainer] WARN : System properties and/or JVM args set. Consider using --dry-run or --exec [INFO] [talledLocalContainer] 2018-06-26 00:07:56.806:INFO::main: Logging initialized @329ms to org.eclipse.jetty.util.log.StdErrLog [INFO] [talledLocalContainer] 2018-06-26 00:07:56.929:INFO::main: Console stderr/stdout captured to /home/claude/Projects/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/target/cargo/configurations/jetty9x/logs/2018_06_25.jetty.log [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 started on port [8080] [INFO] [INFO] --- maven-failsafe-plugin:2.22.0:integration-test (integration-test) @ velocity-tools-examples-showcase --- [INFO] [INFO] --- [INFO] T E S T S [INFO] --- [INFO] Running org.apache.velocity.examples.showcase.ViewToolsIT [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.755 s - in org.apache.velocity.examples.showcase.ViewToolsIT [INFO] [INFO] Results: [INFO] [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- cargo-maven2-plugin:1.6.8:stop (stop-server) @ velocity-tools-examples-showcase --- [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 is stopping... [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 is stopped On 06/25/2018 11:02 PM, Michael Osipov wrote: Folks, who is able to Tools from trunk? I cannot with Java 8 and 10: [INFO] --- cargo-maven2-plugin:1.6.8:start (start-server) @ velocity-tools-examples-showcase --- [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-jetty:jar:1.6.8 for container jetty9x [INFO] You did not specify a container home nor any installer. CARGO will automatically download your container's binaries from [http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.10.v20180503/jetty-distribution-9.4.10.v20180503.tar.gz]. [INFO] [talledLocalContainer] Jetty 9.4.10.v20180503 starting... [INFO] [stalledLocalDeployer] Deploying WAR by creating Jetty context XML file in [D:\Entwicklung\Projekte\velocity-tools\velocity-tools-examples\velocity-tools-examples-showcase\target\cargo\configurations\jetty9x\webapps\velocity-tools-examples-showcase.xml]... [INFO] [talledLocalContainer] java.security.AccessControlException: access denied ("java.util.PropertyPermission" "jetty.home" "read") [INFO] [talledLocalContainer] at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) [INFO] [talledLocalContainer] at java.security.AccessController.checkPermission(AccessController.java:884) [INFO] [talledLocalContainer] at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) [INFO] [talledLocalContainer] at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294) [INFO] [talledLocalContainer] at java.lang.System.getProperty(System.java:717) [INFO] [talledLocalContainer] at org.eclipse.jetty.start.config.CommandLineConfigSource.findJettyHomePath(CommandLineConfigSource.java:103) [INFO] [talledLocalContainer] at org.eclipse.jetty.start.config.CommandLineConfigSource.(CommandLineConfigSource.java:62) [INFO] [talledLocalContainer] at org.eclipse.jetty.start.Main.processCommandLine(Main.java:281) [INFO] [talledLocalContainer] at org.eclipse.jetty.start.Main.main(Main.java:75) [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs] [INFO] [talledLocalContainer] java -jar $JETTY_HOME/start.jar --help # for more information With Zulu 7 I get: [INFO] --- cargo-maven2-plugin:1.6.8:start (start-server) @ velocity-tools-examples-showcase --- [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-jetty:jar:1.6.8 for container jetty9x [INFO] You did not specify a container home nor any installer. CARGO will