Closed georgy7 closed 6 years ago
I was fixed and tested it at now. mvn package
was created a jar-file.
There are no dependencies in it.
And there is no target/lib
folder or something, if you prefer a separate jar.
Also, it did not build on my computer until I remove the line <scope>pom</scope>
in h2
.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ImageDBv2: Compilation failure: Compilation failure:
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalStorageServiceImpl.java:[15,21] error: package org.h2.mvstore does not exist
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalStorageServiceImpl.java:[16,21] error: package org.h2.mvstore does not exist
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalStorageServiceImpl.java:[63,15] error: cannot find symbol
[ERROR] class LocalStorageServiceImpl
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalStorageServiceImpl.java:[67,18] error: cannot find symbol
[ERROR] class LocalStorageServiceImpl
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalDaoServiceImpl.java:[20,21] error: package org.h2.mvstore does not exist
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalDaoServiceImpl.java:[21,21] error: package org.h2.mvstore does not exist
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalDaoServiceImpl.java:[56,15] error: cannot find symbol
[ERROR] class LocalDaoServiceImpl
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalDaoServiceImpl.java:[57,15] error: cannot find symbol
[ERROR] class LocalDaoServiceImpl
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalStorageServiceImpl.java:[129,29] error: package MVStore does not exist
[ERROR] /home/georgy/Downloads/JNekoImageDB_my/src/main/java/service/LocalDaoServiceImpl.java:[68,23] error: package MVStore does not exist
You may use maven-dependency-plugin for the second option. https://stackoverflow.com/a/25116745/1240328
I usually use
maven-assembly-plugin
to build standalone jar: https://github.com/georgy7/jojikenc/blob/9f855ed85306ecb14cb2eeb0b6e85e2ce1938126/pom.xml#L21And then
mvn package
.I see
maven-jar-plugin
at your master, but I don't get, how you use it.