mamorum / poml

Simplify maven pom.xml. An alternative syntax and its conversion tool.
MIT License
2 stars 0 forks source link

Java9: "poml -v" outputs null #6

Open mamorum opened 7 years ago

mamorum commented 7 years ago

Command poml -v or poml version outputs null on Java 9. The command option -v or version outputs poml version on Java8.

Java9

>poml -v
null

Java8

>poml -v
1.1.0
mamorum commented 7 years ago

In Java9, Package class is changed to get version from package-info.class. In Java8, Package class gets version from manifest. But Poml has no package-info.java. I think this change causes outputting null.

Java9

Annotations for the run-time package are read from package-info.class at the same code source as classes in the run-time package.

from Package - Java SE9

Java8

This versioning information is retrieved and made available by the ClassLoader instance that loaded the class(es). Typically, it is stored in the manifest that is distributed with the classes.

from Package - Java SE8