Nelligan, Steven M schrieb am 03.12.2020 um 17:02:
> I want to move the .m2 folder from my windows user's profile folder to be
> within my project folder.
> i.e. C:\dev\Projects-Java8\.m2
>
> In Netbeans \Options\Java\Maven I have the following configurations:
> Maven Home: C:\Program Files\apache-maven-3.6.3
> Default JDK: JDK 1.8
> Global Execution Options: -gs C:\dev\Projects-java8\.m2\settings.xml -s
> C:\dev\Projects-java8\.m2\settings.xml
>
> If I build the project with the .m2 folder deleted from my window user's
> profile everything is working.
>
> The problem is that the NetBeans IDE shows errors in the edit windows (red
> underline), since it cannot resolve the imports.
> If I put a copy of the .m2 folder in my window user's profile, the red line
> disappear.
>
> How do I configure Netbeans to have the edit window look in the redirected
> .m2 folder.
One obvious solution would be a symlink from %USERPROFILE%\.m2 to your
project's .m2 folder
Another solution is to define an environment variable:
MAVEN_OPTS="-Dmaven.repo.local=c:/dev/Projects-java8/.m2"
And as a third alternative, it is also possible to specify this in settings.xml
<localRepository>c:/dev/Projects-java8/.m2</localRepository>
See https://datacadamia.com/maven/local for details
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists