jboss-set / wildfly-channel-cli

Comparison and report generation tool for wildfly-channel manifests.
Apache License 2.0
0 stars 1 forks source link

create-manifest-from-repo: NullPointerException when no <versioning> tag is present in maven-metadata.xml #1

Open tommaso-borgato opened 5 hours ago

tommaso-borgato commented 5 hours ago

If you build e.g. git@github.com:infinispan/infinispan.git like:

mvn -s maven-settings.xml deploy \
    -DaltDeploymentRepository=repo::default::file:///$CUSTOM_REPO/infinispan/ \
    -Dmaven.repo.local=$CUSTOM_REPO/infinispan \
    -DskipTests=true -Denforcer.DskipTests

and then you try to run the create-manifest-from-repo command you get:

$ java -jar $WILDFLY_CHANNEL_CLI_JAR create-manifest-from-repo $CUSTOM_REPO/infinispan -o infinispan-$MANIFEST_NAME
java.lang.NullPointerException: Cannot invoke "org.apache.maven.artifact.repository.metadata.Versioning.getVersions()" because the return value of "org.apache.maven.artifact.repository.metadata.Metadata.getVersioning()" is null
    at org.jboss.set.channel.cli.CreateManifestFromRepoCommand.call(CreateManifestFromRepoCommand.java:50)
    at org.jboss.set.channel.cli.CreateManifestFromRepoCommand.call(CreateManifestFromRepoCommand.java:19)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
    at picocli.CommandLine.execute(CommandLine.java:2170)
    at org.jboss.set.channel.cli.Main.main(Main.java:17)
tommaso-borgato commented 5 hours ago

Fixed in https://github.com/jboss-set/wildfly-channel-cli/pull/2