I'm new to maven. My team and I are trying to work with maven over git, but when I share my code over git, the .classpath file has a dependency that is pointing to my user location:
<classpathentry kind="lib" path="C:/Users/MY_USERNAME/.m2/repository/org/springframework/security/spring-security-crypto/5.1.0.RELEASE/spring-security-crypto-5.1.0.RELEASE.jar" sourcepath="C:/Users/MY_USERNAME/.m2/repository/org/springframework/security/spring-security-crypto/5.1.0.RELEASE/spring-security-crypto-5.1.0.RELEASE-sources.jar">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="maven.groupId" value="org.springframework.security"/>
<attribute name="maven.artifactId" value="spring-security-crypto"/>
<attribute name="maven.version" value="5.1.0.RELEASE"/>
<attribute name="maven.scope" value="compile"/>
</attributes>
</classpathentry>
This causes config issues for my team members.
- Is there a way the add the
.m2
folder in my project and then reference it in the build path? - Is that recommended?
I don't want to exclude my .classpath file because I want my team members to receive all the build path configurations, without having to do it themselves.