ikvmnet / ikvm-maven

Support for adding dependencies on Maven artifacts to .NET projects, using IKVM.
MIT License
53 stars 5 forks source link

Moving Maven cache to another drive #52

Closed NightOwl888 closed 10 months ago

NightOwl888 commented 10 months ago

I want to move the Maven cache to another drive, since there are some large binaries in there and I am running low on disk space. However, according to https://howtodoinjava.com/maven/change-local-repository-location/, there doesn't seem to be a unified way to do it like there is for NuGet. Maven and Eclipse have to be configured individually.

For Maven, it says we need to change the {M2_HOME}\conf\settings.xml file (adding a <localRepository> element). But, with MavenReference do we even have a file? If so, where is it?

If not, consider this a feature request. Ideally this would not have to be set individually per project, but system-wide somewhere so each newly created project uses the same cache location.

wasabii commented 10 months ago

You can make that file I believe.

wasabii commented 10 months ago

Well, the user version of it. I don't know about the global one.

NightOwl888 commented 10 months ago

image

Well, I have another instance of Maven installed.

But we aren't using the environment variable. It is hard coded to user home: https://github.com/ikvmnet/ikvm-maven/blob/main/src/IKVM.Maven.Sdk.Tasks/MavenEnvironment.cs#L99

NightOwl888 commented 10 months ago

Unless there is some way to change the property of user.home...

wasabii commented 10 months ago

All ya gotta do is put the file where it should be in your home.

wasabii commented 10 months ago

https://maven.apache.org/settings.html

NightOwl888 commented 10 months ago

Yeah, looks like that worked. Thanks.

NightOwl888 commented 10 months ago

Is there a way to move the IKVM cache?

1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 1 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 2 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 3 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 4 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 5 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 6 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 7 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 8 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 9 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026: Could not copy "obj\Debug\net6.0\ikvm\stage\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log" to "C:\Users\shad\AppData\Local\Temp\ikvm\cache\1\98d8a00cec0a4eba59aac8021db3ba9a\xalan.dll.log". Beginning retry 10 in 1000ms. There is not enough space on the disk.
1>F:\Users\shad\.nuget\packages\ikvm\8.7.4\buildTransitive\IKVM.Tasks.targets(72,9): warning MSB3026:
wasabii commented 10 months ago

IkvmCacheDir property I think? Maybe IkvmCachePath. One of the two.

wasabii commented 10 months ago

Yeah, two of em:

IkvmCacheDir for jar->dll IkvmExportCacheDir for dll->jar

NightOwl888 commented 10 months ago

Hmm...in MSBuild? Is there something at the user or system level?

wasabii commented 10 months ago

In Msbuild, yes.

Other than env variables, no. The only usage of the cache is MSBuild.