You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by GitBox <gi...@apache.org> on 2021/01/14 18:08:02 UTC

[GitHub] [ofbiz-framework] ieugen opened a new pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

ieugen opened a new pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251


   (OFBIZ-12136)
   
   Allows people to add configuration files and jars (database drivers) when
   using the binary distribution.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] ieugen commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
ieugen commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760481935


   > Would the following work? It would mean we wouldn't need to manipulate the text content of the two different types of start script:
   > 
   > ```
   > tasks.startScripts {
   >     classpath = files('lib/conf/', 'lib-extra/*') + classpath
   > }
   > ```
   
   I did not try but I think Gradle will resolve those during build (the files function). 
   We need the scripts to take the classpath when the script is run and not try to resolve the `lib-extra/*` path. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] danwatford commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
danwatford commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760809858


   @ieugen , yes you're right.
   Setting the classpath property for startScripts did indeed try to resolve all the wild card (*) entries at build time and place them under /lib in the distribution. Never mind.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] danwatford commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
danwatford commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760898560


   Hi @ieugen , I've been able to successfully test overriding properties by placing files in the dist's config directory.
   
   I tested in an openjdk-8 container using:
   `docker run -it --rm --publish 8080:8080 --publish 8443:8443 --mount type=bind,source=$PWD/build/distributions,destination=/distributions openjdk:8 bash -c "tar xf /distributions/ofbiz.tar; cd /ofbiz; bash"`
   
   I placed a copy of security.properties file in /ofbiz/config and set `password.length.min=10`
   
   Data was loaded with `bin/ofbiz -l` and then ofbiz started with `bin/ofbiz`
   
   I attempted to change the admin user's password to a single character value and was correctly shown an error message stating minimum password length was 10 characters, proving that the config override had worked.
   
   I then repeated the test using security.properties in windows which also passed. It seems url.properties and start.properties were not good candidates for overriding, perhaps they are loaded in an unusual way.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] danwatford commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
danwatford commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760859262


   @ieugen  I haven't been able to test these changes successfully on Windows with git-bash.
   
   I created a distZip using the PR.
   Unzipped to c:\dev\tmp\zip
   In git bash:
   ```
   cd /c/dev/tmp/zip
   bin/ofbiz
   ```
   
   The above launched ofbiz and I was able to access https://localhost:8443/partymgr/control/login successfully.
   
   I then copied start.properties and url.properties to /c/dev/tmp/zip/ofbiz/config.
   Edited start.properties to have `ofbiz.log.dir=runtime/logs2`
   Edited url.properties to have `port.https=9443`
   Created directory /c/dev/tmp/zip/ofbiz/runtime/logs2
   
   I then ran ofbiz using `bin/ofbiz` and attempted to access `https://localhost:9443/partymgr/control/login` whereas I could still connect to port 8443.
   
   Also no files were written to runtime/logs2.
   
   Can you give an example of a property you were able to override by using the new config directory?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] ieugen commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
ieugen commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-761619973


   @danwatford : start.properties is in package org/apache/ofbiz/base/start/start.properties  .
   So you will need a full directory path for it. 
   
   I don't know in which package url.properties should be. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] danwatford commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
danwatford commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760899967


   @ieugen I 'squashed and merged' using GitHub for this PR and the original author (you) still gets recorded against the commit.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] ieugen commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
ieugen commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760881172


   I don't have Windows to test that on.
   I just made similar changes to CLASSPATH.
   I read ofbiz.bat, saw how the CLASSPATH was used and added the same options.
   
   I did test on linux and you can test too using docker:
   I use these commands to run OFBiz on my Raspnerry PI with postgresql db running in another container. 
   
   ```
       # Data loading
       docker run --rm \
           --name ofbiz-netdava \
           --net=host \
           --volume /opt/ofbiz/entityengine.postgres.xml:/opt/ofbiz/config/entityengine.xml:ro \
           --volume /opt/ofbiz/security.properties:/opt/ofbiz/config/security.properties:ro \
           --volume ofbiz-netdava:/opt/ofbiz/runtime \
           ieugen/ofbiz:trunk-8 --load-data
   
       docker run --detach \
           --name ofbiz-netdava \
           --restart unless-stopped \
           --net=host \
           --volume /opt/ofbiz/entityengine.postgres.xml:/opt/ofbiz/config/entityengine.xml:ro \
           --volume /opt/ofbiz/security.properties:/opt/ofbiz/config/security.properties:ro \
           --volume ofbiz-netdava:/opt/ofbiz/runtime \
           ieugen/ofbiz:trunk-8
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] danwatford commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
danwatford commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760458130


   Would the following work? It would mean we wouldn't need to manipulate the text content of the two different types of start script:
   
   ```
   tasks.startScripts {
       classpath = files('lib/conf/', 'lib-extra/*') + classpath
   }
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] sonarcloud[bot] commented on pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251#issuecomment-760371772


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework&pullRequest=251&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework&pullRequest=251) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework&pullRequest=251&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework&pullRequest=251&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ofbiz-framework] danwatford merged pull request #251: Improved: Add extra classpath directories for ofbiz.tar/zip

Posted by GitBox <gi...@apache.org>.
danwatford merged pull request #251:
URL: https://github.com/apache/ofbiz-framework/pull/251


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org