Мой проект имеет следующую структуру.
$tree
.
├── [4.0K] src/
│ └── [4.0K] main/
│ └── [4.0K] java/
│ └── [4.0K] org/
│ └── [4.0K] jfrog/
│ └── [4.0K] example/
│ └── [6.2K] ClientExample.java
├── [1.3K] pom.xml
└── [ 781] README.md
Это пример программы из
Пример jav-клиента jFrog артефакта maven
ЕслиЯ делаю mvn compile
Я получаю следующий вывод:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ maven-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/karthik/Workspace/project-examples/artifactory-client-java-examples/maven-example/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ maven-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /home/karthik/Workspace/project-examples/artifactory-client-java-examples/maven-example/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.592 s
[INFO] Finished at: 2018-09-13T12:03:07+12:00
[INFO] Final Memory: 18M/135M
[INFO] ------------------------------------------------------------------------
, за которым следует mvn package
INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ maven-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/karthik/Workspace/project-examples/artifactory-client-java-examples/maven-example/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ maven-example ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ maven-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/karthik/Workspace/project-examples/artifactory-client-java-examples/maven-example/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ maven-example ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ maven-example ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ maven-example ---
[INFO] Building jar: /home/karthik/Workspace/project-examples/artifactory-client-java-examples/maven-example/target/maven-example-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.751 s
[INFO] Finished at: 2018-09-13T12:04:30+12:00
[INFO] Final Memory: 12M/135M
[INFO] ------------------------------------------------------------------------
Если я пытаюсь запустить сгенерированный файл jar.
java -jar target/maven-example-1.0-SNAPSHOT.jar
Я получаю следующую ошибку:
no main manifest attribute, in target/maven-example-1.0-SNAPSHOT.jar
Так как это от JFrog github repository
, я ожидаю, что это сработает.Что я делаю не так?
Импорт проекта в сборку IntelliJ IDE и попытка его запуска дают следующие результаты.Сборка выглядит успешной (jar file gets generated inside target folder
)
Однако, когда я нажимаю run, я попадаю на следующую страницу.