I'm trying to define a folder for the Tar/Repository files in Sling. However, I can't figure out the right way to set an alternative repository.home folder.
As I understand it the Tar SegmentNodeStoreService is supposed to default to a folder under the {sling.home} path, set with the -c argument. No matter what I try it is always placing the repository folder relative to the folder I'm running start from. The rest of Sling goes in the sling.home folder.
For instance, if I'm in
~/Development
and I run
java -jar project/target/sling-app.jar -c /temp
The sling bundles, logs, etc will be under /temp, but the sling/repository folder will be put under the ~/Development folder.
I've tried adding these extra command line arguments too, but they don't help.
-Drepository.home=/temp
-Dsling.repository.home=/temp
Thanks in advance
Turns out it was a bug and it is now fixed in sling 9
https://issues.apache.org/jira/browse/SLING-6022
Related
Im trying to install a JSON formatter for Cucumber but am having trouble configuring it. The steps (listed here) go like this:
1. Download cucumber-json-formatter-darwin-amd64 and rename it to cucumber-json-formatter
2. Move it to a directory that's on your PATH
3. Make it executable with chmod +x cucumber-json-formatter
4. Verify that you can run it: cucumber-json-formatter --help
I have the file downloaded and renamed correctly. However, I am stuck on the second step of moving it to a directory thats on my PATH.
Doing some research, I know what the folder structure looks like but I'm not sure exactly what the step is instructing. How would I achieve this step? Can it be in ANY directory on my PATH? I am currently using a Mac if that makes any difference for the solution.
Move it to a directory that's on your PATH
PATH refers to the machine's environment variable named PATH. Any time the OS is asked to execute something PATH is searched.
On Windows open System Properties dialog, click Environment Variables button and Path is listed there. You can add a new entry for the location of cucumber-json-formatter or you can move it to an existing Path entry.
The idea here is to make 2 .exe files run when I open only 1 of them.
I have 2 files:
F:\Gry\Riot Games\League of Legends\LeagueClient.exe
C:\Program Files (x86)\Overwolf\OverwolfLauncher.exe
When I launch LeagueClient.exe I'd like OverwolfLauncher.exe to run alongside it. Is there a way to do it?
I don't think you'll be able to modify the LeagueClient without running with any issues with the anticheat, I believe creating a bat file would be what you want.
#ECHO off
start F:\Gry\Riot Games\League of Legends\LeagueClient.exe
start C:\Program Files (x86)\Overwolf\OverwolfLauncher.exe
I'm trying to run ./gradlew build command, which has artifactory_contextUrl property used in build.gradle file.
gradlew.properties is located in C:\Users\XXX.gradle folder, when I build the project in windows Intellij it takes the gradle.properties file in user folder and so gets the contexturl and everything is fine but,
when I try to build the project in docker toolbox it couldnt find it.
Toolbox starts with some location in C folder.
I tried with placing gradle.properties at the same level as build.gradle it works fine in toolbox. Eventually I dont want to keep the gradle.properties at buils.gradle level
What should I do? Does any one has any suggestions?
Well, I guess the docker toolbox (whatever it is, I don't know it) does run with another user account and thus does not find your gradle.properties file in your user directory.
The file is actually called gradle.properties, isn't it? In your question you use gradlew.properties and gradle.properties and only the latter is valid.
To solve your problem you can either make sure the gradle.properties is also in the users home directory that is used in the docker toolbox. To find out which directory this is, you can run Gradle with -d and search for Gradle user home, there it tells you which directory is the one where the gradle.properties is expected.
Alternatively you can use -P artifactory_contextUrl=asdf to set the property from the commandline, or use the system property org.gradle.project.artifactory_contextUrl or environment variable ORG_GRADLE_PROJECT_artifactory_contextUrl to set the project property.
in my dockerfile I have these two lines:
ADD /ansible/inventory /etc/ansible/hosts
ADD /ansible/. /ansiblerepo
The first line works, as I can run the container and see my hosts file has been populated with all the ips from my inventory file.
The second line doesn't appear to be working though. I'm just trying to copy all the files/subdirectories of ansible and copy them over to the ansiblerepo directory inside the new container.
There are no errors while building the image, but again ansiblerepo is just an empty directory and nothing has copied over to it. I assume I'm just missing a back slash or something.
Docker ADD and COPY commands work relative to the build directly, and only for files in that directory that weren't excluded with a .dockerignore file. The reason for this is that builds actually run on the docker host, which may be a remote machine. The first step of a docker build . is to package up all the files in the directory (in this case .) and send them to the host to run your build. Any absolute paths you provide are interpreted as relative to the build directory and anything you reference that wasn't sent to the server will be interpreted as a missing file.
The solution is to copy /ansible to your build directory (typically the same folder as your Dockerfile).
Make sure that in your ".dockerignore" file, it does not excluded everything. usually, dockerignore file has these lines
*
!obj\Docker\publish\*
!obj\Docker\empty\
this means that everything is ignored except publish and empty folders.
Removing trailing /. from source directory should fix the ADD command.
On a related note, Docker Best Practices suggest using COPY over ADD if you don't need the URL download feature.
I have a project which for its tests runs:
./node_modules/.bin/mocha tests/**/*.coffee -r coffee-script/register -c
tests/ looks like this:
_helper.coffee
database-tests.coffee
routers/
index-router-tests.coffee
team-router-tests.coffee
On my windows dev machine it works fine running _helper.coffee first and then the rest of the files.
On my CI server running debian it only tries to run routers/* missing out anything in the root folder.
I am assuming that tests/**/*.coffee isnt right for unix?
Moving Comments to an Answer for others since it appears to have fixed your problem.
I have had the same problems on Windows where it is not returning the files in the same order that you see them listed on the drive. I have therefore used tests/*.coffee and then tests/**/*.coffee.
I found that Windows will retrieve the files in the order they were likely written to the hard drive, while a directory or other list will have them sorted for display. This seemed to be the problem I was encountering.
The parent directory ('tests') does not seem to be included when using tests/** which seams to mean directories under the tests folder, and does not include the tests folder itself.