Re: Installing effective Maven POM files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Status report.

> 5. I will implement the described behaviour before the next Java SIG
>    meeting and make it available in rawhide.

Everything is implemented as I promised. Respective packages are built
for rawhide, but not tagged yet. I expect interested parties to test
the new behaviour before I tag the builds. I will tag them if there
are no objections.

https://koji.fedoraproject.org/koji/buildinfo?buildID=398128
https://koji.fedoraproject.org/koji/buildinfo?buildID=398141

> 1. %mvn_install will install raw POMs into /usr/share/maven-poms
>    as this was always done
> 
> 2. %mvn_install will additionally install effective POMs into some
>    other location (perhaps /usr/share/maven-fragments) for every
>    non-POM artifact

Done: http://pkgs.fedoraproject.org/cgit/xmvn.git/commit/?id=e176466b18f1d9adf96d2f7a0cca27448e15c6a1

> 3. XMvn and all scripts and programs that use is (including xmvn,
>    mvn-rpmbuild, mvn-local, %mvn_build, Tycho) will resolve effective
>    POMs by default. With some option specified they will not
>    resolve effective POMs, but raw POMs instead.

Done: http://git.fedorahosted.org/cgit/javapackages.git/commit/?id=025470e7b5967d5edff77d85371e6d385dec1a99

With option -Dmaven.local.effective.pom=false mvn-rpmbuild and mvn-local
will not resolve effective POMs, ever. Respective option for %mvn_build
is -E or --disable-effective-poms.


I tested the new behaviour and it seems to be as expected.

1. Rebuild some package that is using %mvn_build (for example apache-commons-io)

2. Install the package.

3. Verify that both raw POM and effective POM are installed:
  $ rpm -ql apache-commons-io | grep pom
  /usr/share/maven-effective-poms/JPP-commons-io.pom
  /usr/share/maven-poms/JPP-commons-io.pom

4. Verify that POM in /usr/share/maven-poms is raw:
  $ grep parent /usr/share/maven-poms/JPP-commons-io.pom
    <parent>
      <artifactId>commons-parent</artifactId>
    </parent>

5. Verify that POM in /usr/share/maven-effective-poms is effective:
  $ grep parent /usr/share/maven-effective-poms/JPP-commons-io.pom

6. Rebuild some package and verify that effective POM is resolved by default:

%mvn_build

[DEBUG] Trying to resolve artifact [org.apache.commons:commons-io:3.2.1:pom]
[DEBUG] File .xm2/org/apache/commons/commons-io/3.2.1/commons-io-3.2.1.pom was not found
[DEBUG] Resolving [org.apache.commons:commons-io:3.2.1:pom]
[DEBUG] Trying to translate artifact [org.apache.commons:commons-io]
[DEBUG] Artifact [org.apache.commons:commons-io] was mapped to [JPP:commons-io]
[DEBUG] Translation result is [ [JPP:commons-io], [org.apache.commons:commons-io] ]
[DEBUG] File /usr/share/maven2/poms/JPP-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven-effective-poms/JPP-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven-poms/JPP-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven2/poms/org.apache.commons-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven-effective-poms/org.apache.commons-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven-poms/org.apache.commons-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven2/poms/JPP-commons-io.pom was not found
[DEBUG] Resolved [JPP:commons-io:3.2.1:pom] to /usr/share/maven-effective-poms/JPP-commons-io.pom
[DEBUG] Artifact [org.apache.commons:commons-io:3.2.1:pom] was resolved to /usr/share/maven-effective-poms/JPP-commons-io.pom
[DEBUG] Artifact [org.apache.commons:commons-io:3.2.1:pom] is provided by apache-commons-io

7. Rebuild some package and verify that raw POM is resolved if given -E option:

%mvn_build -E

[DEBUG] Trying to resolve artifact [org.apache.commons:commons-io:3.2.1:pom]
[DEBUG] File .xm2/org/apache/commons/commons-io/3.2.1/commons-io-3.2.1.pom was not found
[DEBUG] Resolving [org.apache.commons:commons-io:3.2.1:pom]
[DEBUG] Trying to translate artifact [org.apache.commons:commons-io]
[DEBUG] Artifact [org.apache.commons:commons-io] was mapped to [JPP:commons-io]
[DEBUG] Translation result is [ [JPP:commons-io], [org.apache.commons:commons-io] ]
[DEBUG] File /usr/share/maven2/poms/JPP-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven-poms/JPP-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven2/poms/org.apache.commons-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven-poms/org.apache.commons-commons-io-3.2.1.pom was not found
[DEBUG] File /usr/share/maven2/poms/JPP-commons-io.pom was not found
[DEBUG] Resolved [JPP:commons-io:3.2.1:pom] to /usr/share/maven-poms/JPP-commons-io.pom
[DEBUG] Artifact [org.apache.commons:commons-io:3.2.1:pom] was resolved to /usr/share/maven-poms/JPP-commons-io.pom
[DEBUG] Artifact [org.apache.commons:commons-io:3.2.1:pom] is provided by apache-commons-io
[DEBUG] Trying to resolve artifact [org.apache.commons:commons-parent:25:pom]
[DEBUG] File .xm2/org/apache/commons/commons-parent/25/commons-parent-25.pom was not found
[DEBUG] Resolving [org.apache.commons:commons-parent:25:pom]
[DEBUG] Trying to translate artifact [org.apache.commons:commons-parent]
[DEBUG] Artifact [org.apache.commons:commons-parent] was mapped to [JPP:commons-parent]
[DEBUG] Translation result is [ [JPP:commons-parent], [org.apache.commons:commons-parent] ]
[DEBUG] File /usr/share/maven2/poms/JPP-commons-parent-25.pom was not found
[DEBUG] File /usr/share/maven-poms/JPP-commons-parent-25.pom was not found
[DEBUG] File /usr/share/maven2/poms/org.apache.commons-commons-parent-25.pom was not found
[DEBUG] File /usr/share/maven-poms/org.apache.commons-commons-parent-25.pom was not found
[DEBUG] File /usr/share/maven2/poms/JPP-commons-parent.pom was not found
[DEBUG] Resolved [JPP:commons-parent:25:pom] to /usr/share/maven-poms/JPP-commons-parent.pom
[DEBUG] Artifact [org.apache.commons:commons-parent:25:pom] was resolved to /usr/share/maven-poms/JPP-commons-parent.pom
[DEBUG] Artifact [org.apache.commons:commons-parent:25:pom] is provided by apache-commons-parent

--
Mikolaj Izdebski
--
java-devel mailing list
java-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/java-devel



[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux