bloxbean / aion4j-maven-plugin

Aion4j Maven Plugin for AVM based smart contract on Aion
MIT License
4 stars 3 forks source link

Document the pom.xml warning #33

Open fulldecent opened 5 years ago

fulldecent commented 5 years ago

pom.xml currently includes this:

    <!-- Don't change the following dependency. This is required to compile & run test cases. The avm.jar for the project will be installed into the local maven repository during mvn initialize phase. -->

And the maven initialization phase currently produces warnings:

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

Please update this comment to better document why this dependency should not be changed and why we should trust this comment in the file (which is copy-pasted for generations) instead of what Maven says.

satran004 commented 5 years ago

Thanks. I will try to add a proper comment. The maven warnings are harmless. As avm jars are not in maven central repo, we have to use the system scope and copy the avm jars from maven plugin to lib folder during initialization. I think, the build stability warning comes for system scope dependencies. But it doesn't have any impact in runtime or packaging of final jar as long as initialize is executed, otherwise build will fail. I will explore if this warning can be avoided.

fulldecent commented 5 years ago

The build system warnings are harmless

^^ Famous last words!

I have been studying best practices in Aion and am documenting them here https://github.com/fulldecent/aion-aip010

specifically relevant here is https://github.com/junit-team/junit5-samples/tree/master/junit5-jupiter-starter-maven which builds without warnings.

satran004 commented 5 years ago

I will try to upgrade the archetype to junit5 in next archetype release. Currently its using junit4. But I still believe the warning is due to the usage of system scope in dependency.

fulldecent commented 5 years ago

Cross reference:

https://github.com/jennijuju/Aion-ATS-Token-Contract-Java/issues/7#issuecomment-510891298

https://github.com/fulldecent/Aion-ATS-Token-Contract-Java/commit/00065709fd7366bf7f756c83b12e05fcbcc8efc0