Das Erstellen eines öffentlichen Repositorys ist mit Jenkins einfach, aber das Vorbereiten von Jenkins ist mühsam. Aus diesem Grund sollten Sie ein lokales Repository erstellen.
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\Was für ein gewisser\.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\Was für ein gewisser\.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] ------------------------------------------------------------------------
Anschließend wird pom oder jar in C: \ Benutzer \ etwas \ .m2 \ Repository \ installiert.
Fügen Sie ein lokales Repository hinzu
pom.xml
<repositories>
<repository>
<id>localrepo</id>
<name>localrepo</name>
<url>file://${basedir}/libs/</url>
</repository>
</repositories>
des Weiteren
pom.xml
<dependency>
<groupId>com.haniokasai</groupId>
<artifactId>cpulimitController</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Einfach schreiben.
In diesem Fall im Ordner ./libs die JAR-, POM- und _remote.repositorys in C: \ Users \ what \ .m2 \ repository \ com \ haniokasai \ cpulimitController Sollte verlassen werden.
Ref https://stackoverflow.com/questions/18732175/the-pom-for-project-is-missing-no-dependency-information-available
Recommended Posts