[ODLPARENT-79] addInstallRepositoryPath only works for bundles (JARs), but not for attached artifacts such as feature.xml Created: 22/Mar/17  Updated: 24/Jan/18

Status: Confirmed
Project: odlparent
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Michael Vorburger Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8050

 Description   

Background: addInstallRepositoryPath is a parameter (which I originally contributed); documented e.g. here https://wiki.opendaylight.org/view/CrossProject:Integration_Group:karaf#Getting_your_code_into_Karaf_.28for_developers.3B_-DaddInstallRepositoryPath_.2F_addInstallRepositoryPath.29)

I'd like to use the -DaddInstallRepositoryPath to install a feature of a project under development into a Karaf; for example:

vorburger@work:~/dev/ODL/git/daexim$ mvn -Pq -DaddInstallRepositoryPath=../../netvirt/vpnservice/distribution/karaf/target/assembly/system clean install

But this only correctly installs bundles (JARs), but does not work for attached artifacts such as feature.xml ...

This is because the additional-install uses:

<configuration>
<file>${project.build.directory}/${project.build.finalName}.jar

of course that's technically wrong, it's not sufficient, because it misses attached artifacts, as we see here:

[INFO] — maven-install-plugin:2.5.2:install (default-install) @ daexim-features —
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/daexim-features-1.0.0-SNAPSHOT.jar to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.jar
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/pom.xml to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.pom
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/daexim-features-1.0.0-SNAPSHOT.kar to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.kar
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/classes/features.xml to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT-features.xml
[INFO]
[INFO] — maven-install-plugin:2.5.2:install-file (additional-install) @ daexim-features —
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/daexim-features-1.0.0-SNAPSHOT.jar to /home/vorburger/dev/ODL/git/netvirt/vpnservice/distribution/karaf/target/assembly/system/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.jar
[INFO] Installing /tmp/mvninstall8580636725527113759.pom to /home/vorburger/dev/ODL/git/netvirt/vpnservice/distribution/karaf/target/assembly/system/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.pom

NB that the features.xml is only installed by the default-install but not by the additional-install.



 Comments   
Comment by Michael Vorburger [ 22/Mar/17 ]

Don't see how I could solve this downstream without major hacking, so I've contributed a fix upstream in https://issues.apache.org/jira/browse/MINSTALL-126.. if that get merged, and a new maven-install-plugin was released (3.0.0 or even just a 2.5.3), then we could do https://git.opendaylight.org/gerrit/#/c/53691/, which would fix this properly for good, see:

[INFO] — maven-install-plugin:3.0.0-SNAPSHOT:install (default-install) @ daexim-features —
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/daexim-features-1.0.0-SNAPSHOT.jar to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.jar
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/pom.xml to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.pom
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/daexim-features-1.0.0-SNAPSHOT.kar to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.kar
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/classes/features.xml to /home/vorburger/.m2/repository/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT-features.xml
[INFO]
[INFO] — maven-install-plugin:3.0.0-SNAPSHOT:install (additional-install) @ daexim-features —
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/daexim-features-1.0.0-SNAPSHOT.jar to /home/vorburger/dev/ODL/git/netvirt/vpnservice/distribution/karaf/target/assembly/system/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.jar
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/pom.xml to /home/vorburger/dev/ODL/git/netvirt/vpnservice/distribution/karaf/target/assembly/system/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.pom
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/daexim-features-1.0.0-SNAPSHOT.kar to /home/vorburger/dev/ODL/git/netvirt/vpnservice/distribution/karaf/target/assembly/system/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT.kar
[INFO] Installing /home/vorburger/dev/ODL/git/daexim/features/target/classes/features.xml to /home/vorburger/dev/ODL/git/netvirt/vpnservice/distribution/karaf/target/assembly/system/org/opendaylight/daexim/daexim-features/1.0.0-SNAPSHOT/daexim-features-1.0.0-SNAPSHOT-features.xml

Generated at Wed Feb 07 20:27:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.