Creating a public repository is easy with jenkins, but preparing jenkins is a hassle. That's why you should create a local repository.
mvn install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.haniokasai:cpulimitController:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 44, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cpulimitController 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cpulimitController ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cpulimitController ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cpulimitController ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory Z:\users\doc\GitHub\cpulimitController\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ cpulimitController ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cpulimitController ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cpulimitController ---
[INFO]
[INFO] --- maven-shade-plugin:2.4.3:shade (default) @ cpulimitController ---
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing Z:\users\doc\GitHub\cpulimitController\target\cpulimitController-1.0-SNAPSHOT.jar with Z:\users\doc\GitHub\cpulimitController\target\cpulimitController-1.0-SNAPSHOT-shaded.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ cpulimitController ---
[INFO] Installing Z:\users\doc\GitHub\cpulimitController\target\cpulimitController-1.0-SNAPSHOT.jar to C:\Users\What a certain\.m2\repository\com\haniokasai\cpulimitController\1.0-SNAPSHOT\cpulimitController-1.0-SNAPSHOT.jar
[INFO] Installing Z:\users\doc\GitHub\cpulimitController\pom.xml to C:\Users\What a certain\.m2\repository\com\haniokasai\cpulimitController\1.0-SNAPSHOT\cpulimitController-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.164 s
[INFO] Finished at: 2018-11-09T01:25:11+09:00
[INFO] Final Memory: 9M/128M
[INFO] ------------------------------------------------------------------------
Then, pom or jar is installed in C: \ Users \ something \ .m2 \ repository .
Add local repository
pom.xml
<repositories>
<repository>
<id>localrepo</id>
<name>localrepo</name>
<url>file://${basedir}/libs/</url>
</repository>
</repositories>
further
pom.xml
<dependency>
<groupId>com.haniokasai</groupId>
<artifactId>cpulimitController</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Just write.
And in this case in the ./libs folder, the jar, pom and _remote.repositories inside C: \ Users \ what \ .m2 \ repository \ com \ haniokasai \ cpulimitController Should be left.
Ref https://stackoverflow.com/questions/18732175/the-pom-for-project-is-missing-no-dependency-information-available
Recommended Posts