[ https://issues.apache.org/jira/browse/MWAR-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov updated MWAR-448: -------------------------------- Fix Version/s: waiting-for-feedback > packaging dependencies fails with "mvn install" but not "mvn package" > --------------------------------------------------------------------- > > Key: MWAR-448 > URL: https://issues.apache.org/jira/browse/MWAR-448 > Project: Maven WAR Plugin > Issue Type: Bug > Affects Versions: 3.3.2 > Environment: maven 3.6.3 ( later versions have bugs which we can't > take in) > Reporter: Kari J. Niemi > Priority: Minor > Fix For: waiting-for-feedback > > > I think we discovered a minor odd difference with war-packaging between "mvn > package" or "mvn install". We would expect that only difference between the > two is that the latter also installs the produced stuff in the local maven > repository. > > We are packaging a few jars to a war. We have a parent pom with some modules, > and that is defined as a dependency in the pom.xml that produces a > war-package. Like this: > my-war-thingie:pom.xml (packaging:war) > * dependency: some-parent > some-parent:pom.xml (packaging:pom) > * module1 (packaging:jar) > * module2 (packaging:jar) > Earlier we had a different structure and everything was just fine: we did not > the have the child-modules but the parent-pom produced the jar. When we > changed the structure to the one described above: our CI was still OK, some > developers building OK as well -but some developers had failing maven builds > because of missing "some-parent.jar". > > It was bit of devastating hunt, but finally we discovered that "mvn package" > was building OK, but "mvn install" looks for "some-parent.jar". > We don't actually mind if the above scenario would fail in both cases, or if > it was successful - we would just expect that it works the same way for both. > If this is intended behaviour, it would be nice to have it documented. > FWIW: in our case, we anyway wanted to define direct dependencies from the > war-packaging to the child-modules. So actually, we are OK wih our builds > already. But the difference caused so may doubts about our builds > reproducibility - and also, it seems like a bug - so I wanted to be good > citizen and report the problem. > Edit: further note from our troubleshooting sessions: we don't have the > "type" for the dependency at all in my-war-thingie:pom.xml. Yesterday, we did > experiment setting the type as "pom" -and as a consequence, both "mvn > package" and "mvn install" were successful. The default as we know, > should/would be "jar". Maybe the missing dependency type is for some odd > reason resolved differently for "maven package" and "maven install"? -- This message was sent by Atlassian Jira (v8.20.1#820001)