-
Type: Bug
-
Status: Resolved
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: NXFT-1.7.1
-
Fix Version/s: NXFT-1.7.19
-
Component/s: nuxeo-ftest
-
Tags:
-
Upgrade notes:
-
Sprint:DevOps Sprint 10
When an assembly uses artifact:resolveFile, the resolved artifact will not come from the dependency graph but directly from the Maven repositories.
It must not be used on artifacts which are produced by the build (ie nuxeo-distribution-tomcat. Else Maven won't be aware of the dependency between the two modules and may not properly order them.
Instead of artifact:resolveFile, we should use artifact:file and have the wanted artifact in the dependency graph, at least with the "provided" scope.
For instance, the following change illustrates the resolution:
diff --git i/nuxeo-distribution/nuxeo-distribution-tomcat/pom.xml w/nuxeo-distribution/nuxeo-distribution-tomcat/pom.xml index 60ba582..47c3a3f 100644 @@ -62,6 +63,13 @@ <type>zip</type> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.nuxeo.ecm.distribution</groupId> + <artifactId>nuxeo-distribution-resources</artifactId> + <type>zip</type> + <classifier>doc</classifier> + <scope>provided</scope> + </dependency> </dependencies> <profiles> diff --git i/nuxeo-distribution/nuxeo-distribution-tomcat/src/main/assemble/assembly.xml w/nuxeo-distribution/nuxeo-distribution-tomcat/src/main/assemble/assembly.xml index 73b1c47..74d6007 100644 --- i/nuxeo-distribution/nuxeo-distribution-tomcat/src/main/assemble/assembly.xml +++ w/nuxeo-distribution/nuxeo-distribution-tomcat/src/main/assemble/assembly.xml @@ -77,7 +77,7 @@ </copy> <unzip dest="${tomcat}"> - <artifact:resolveFile key="org.nuxeo.ecm.distribution:nuxeo-distribution-resources::zip:doc" /> + <artifact:file key="org.nuxeo.ecm.distribution:nuxeo-distribution-resources:${nuxeo.distribution.version}:zip:doc" /> </unzip> <copy todir="${tomcat}"> <fileset dir="src/main/resources/common" />
Side note: ${nuxeo.distribution.version} should not be required in the key, like in the following equivalent sentence:
- <artifact:resolveFile key="org.nuxeo.ecm.distribution:nuxeo-distribution-resources::zip:doc" /> + <artifact:file groupid="org.nuxeo.ecm.distribution" + artifactid="nuxeo-distribution-resources" + type="zip" + classifier="doc" />
=> NXBT-935
Lines to review:
528: <artifact:resolveFile key="org.nuxeo.ecm.platform:nuxeo-importer-core:${maven.project.version}:jar" /> 529: <artifact:resolveFile key="org.nuxeo.ecm.platform:nuxeo-importer-jaxrs:${maven.project.version}:jar" /> 530: <artifact:resolveFile key="org.nuxeo.ecm:nuxeo-drive-core:${maven.project.version}:jar" /> 531: <artifact:resolveFile key="org.nuxeo.ecm:nuxeo-drive-jsf:${maven.project.version}:jar" /> 532: <artifact:resolveFile key="org.nuxeo.ecm:nuxeo-drive-operations:${maven.project.version}:jar" /> 533: <artifact:resolveFile key="org.nuxeo.ecm.platform:nuxeo-platform-login-token:${maven.project.version}:jar" /> 941: <artifact:resolveFile key="com.oracle:ojdbc14:${oracle10g.driver.version}:jar" /> 946: <artifact:resolveFile key="com.oracle:ojdbc6:${oracle11g.driver.version}:jar" /> 951: <artifact:resolveFile key="com.oracle:ojdbc7:${oracle12c.driver.version}:jar" /> 964: <artifact:resolveFile key="com.oracle:ojdbc14:${oracle10g.driver.version}:jar" /> 969: <artifact:resolveFile key="com.oracle:ojdbc6:${oracle11g.driver.version}:jar" /> 974: <artifact:resolveFile key="com.oracle:ojdbc7:${oracle12c.driver.version}:jar" /> 989: <artifact:resolveFile key="${ear-jboss-groupId}:${ear-jboss-artifactId}:${ear-jboss-version}:zip:${ear-jboss-classifier}" /> 995: <artifact:resolveFile key="${groupId}:${artifactId}::zip:${classifier}-ear" /> 1010: <artifact:resolveFile key="com.oracle:ojdbc14:${oracle10g.driver.version}:jar" /> 1015: <artifact:resolveFile key="com.oracle:ojdbc6:${oracle11g.driver.version}:jar" /> 1020: <artifact:resolveFile key="com.oracle:ojdbc7:${oracle12c.driver.version}:jar" /> 1214: <artifact:resolveFile key="postgresql:postgresql::jar" /> 1220: <artifact:resolveFile key="net.sourceforge.jtds:jtds::jar" /> 1227: <artifact:resolveFile key="com.oracle:ojdbc14:${oracle10g.driver.version}:jar" /> 1232: <artifact:resolveFile key="com.oracle:ojdbc6:${oracle11g.driver.version}:jar" /> 1237: <artifact:resolveFile key="com.oracle:ojdbc7:${oracle12c.driver.version}:jar" /> 1244: <artifact:resolveFile key="mysql:mysql-connector-java::jar" /> 1378: <artifact:resolveFile key="${groupId}:${artifactId}::zip:${classifier}" /> 1393: <artifact:resolveFile key="org.seleniumhq.selenium:selenium-server-standalone::jar" />