java - how to define path to superpom? -
any maven experts out there? inherited huge maven project , trying compile. not getting far. go highest level pom.xml can find, located in trunk directory, 1 level down main project. issue command "mvn validate". following error:
[info] scanning projects... downloading: http://repo1.maven.org/maven2/com/mycompany/neto/vsd/vsd-superpom/1.1.0/vsd-superpom-1.1.0.pom [info] unable find resource 'com.mycompany.neto.vsd:vsd-superpom:pom:1.1.0' in repository central (http://repo1.maven.org/maven2)
i noticed vsd-superpom folder @ same level main project i'm guessing main project needs point somewhere? looking @ pom.xml see
<parent> <groupid>com.mycompany.neto.vsd</groupid> <artifactid>vsd-superpom</artifactid> <version>1.1.0</version> </parent>
where put vsd-superpom folder found? don't understand why tries download it. don't see in pom.xml tells that.
apache maven has 2 level strategy resolve , distribute files, call artifacts. first level called local repository, artifact cache on system, default located @ ${user.home}/.m2/repository. when executing maven, it'll first in local cache artifacts. if artifact cannot found here, maven access remote repositories find artifact. once found stored local repository, it's available current , future usage.
see apache maven install plugin documentation
so if super pom independent of rest of project can invoke mvn install
super pom folder placed local repository. solve problem.
usually top-level project pom defines project dependencies , should enough invoke mvn verify | compile | ...
if top-level pom depends on super pom have install super pom first (or define pom contains submodules super pom , rest of project)
Comments
Post a Comment