i have maven project, uses jar packaging. when run install phase, install both project-1.0.jar , project-1.0.pom files in local repository.
now jar built classifier. easy enough: add line jar plugin configuration:
<plugin> <artifactid>maven-jar-plugin</artifactid> <configuration> <classifier>whatever</classifier> [...] </configuration> </plugin> now, works in installs project-1.0-whatever.jar in repo, no longer installs pom.
in case matters, want use feature in conjunction profiles, i.e. want build jars different classifiers different profiles.
the reason want pom because have other projects depending on one. when build 1 of these, try find pom dependency. if can't, happily use jar, not acceptable solution me couple of reasons:
it's bad enough try contact external repos , it, worse, use share repo, download pom shared repo, may not want - example if made changes pom , trying test them.
is there solution, or can suggest reasonable workaround?
edit: discovered issue affects maven 2.2.1, not maven 3.0.5. may therefore bug or difference in features between versions. still interested in solutions/workarounds maven 2, migrating project maven 3 complicated affair , not happen.
the reason turned out nothing maven version such, , version of maven-install-plugin. turns out versions prior 2.3 have bug.
old installations of maven suffer issue, maven 2 use version of plugin has unless version has been explicitly specified in pom, maven-install-plugin included default , it's quite possible pom not explicitly specify @ (as in case).
Comments
Post a Comment