java - How to use a local maven snapshot of another local project -


this question has answer here:

i feel must lacking very basic maven knowledge here. have (couple of) maven project(s) , shared library. library should separate maven project own life cycle. i'm trying import library project using:

<dependencymanagement>    <dependencies>       <dependency>          <groupid>nl.whatever.com</groupid>          <artifactid>my_shared_library</artifactid>          <version>1.0-snapshot</groupid>       </dependency>        ...    </dependencies> </dependencymanagement> 

but maven keeps looking in repro instead of trying find local build. , worst of all, keeps looking jar. get:

could not resolve dependencies project my.project:ejb:1.0-snapshot: not find artifact nl.whatever.com:my_shared_library:jar:1.0-snapshot

what's rookie mistake? yes, did clean install of library project.

edit:

my .m2 directory has settings file redirecting local repro

/ws/repro, contains: /ws/repro/nl/whatever/com/my_shared_library/1.0-snapshot/    my_shared_project-1.0-snapshot.jar.lastupdate    my_shared_project-1.0-snapshot.pom 

and property files.

edit2: don't think it's duplicate. looked @ question linked before posting question. there no non-maven project or external jar involved here.

your local repository in .m2/repository below user repository. if clean install on library project, should installed repository (in nl/whatever/com/my_shared_library/...). can use other maven projects on same computer.

it furthermore important <packaging> correct, i.e. packaging needs match artifact want build. if packaging pom create pom (like parent pom or bom). leaving out packaging tag implictely means use packaging jar.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -