发布时间:2025-06-24 20:14:42 作者:北方职教升学中心 阅读量:169
另外,在Nexus第一次启动时,会在数据卷中创建初始密码文件,我们需要查看该文件,获得初始密码我们才能进行进一步的Nexus初始化工作。Ubuntu下使用VisualStudioCode进行Java开发
你需要Nexus
Java应用编译构建的一种主流方式就是通过Maven, Maven可以很方便的管理Java应用的各种依赖包。Ubuntu下Docker环境安装
三、
vian@txzq1899-ubuntu:/media/vian/Work/Workspace/hello-world$ mvn clean install[INFO]Scanning forprojects...[INFO][INFO]------------------------<com.txzq:hello-world >------------------------[INFO]Building hello-world 0.0.1-SNAPSHOT[INFO]from pom.xml[INFO]--------------------------------[jar ]---------------------------------[INFO][INFO]--- clean:3.3.2:clean (default-clean)@ hello-world ---[INFO]Deleting /media/vian/Work/Workspace/hello-world/target[INFO][INFO]--- resources:3.3.1:resources (default-resources)@ hello-world ---[INFO]Copying 1resource from src/main/resources to target/classes[INFO]Copying 0resource from src/main/resources to target/classes[INFO][INFO]--- compiler:3.11.0:compile (default-compile)@ hello-world ---[INFO]Changes detected - recompiling the module!:source[INFO]Compiling 1sourcefilewith javac [debug release 17]to target/classes[INFO][INFO]--- resources:3.3.1:testResources (default-testResources)@ hello-world ---[INFO]skip non existing resourceDirectory /media/vian/Work/Workspace/hello-world/src/test/resources[INFO][INFO]--- compiler:3.11.0:testCompile (default-testCompile)@ hello-world ---[INFO]Changes detected - recompiling the module!:dependency[INFO]Compiling 1sourcefilewith javac [debug release 17]to target/test-classes[INFO][INFO]--- surefire:3.1.2:test (default-test)@ hello-world ---[INFO]Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider[INFO][INFO]-------------------------------------------------------[INFO]T E S T S[INFO]-------------------------------------------------------[INFO]Running com.txzq.helloworld.HelloWorldApplicationTests19:28:21.256 [main]INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes fortestclass [com.txzq.helloworld.HelloWorldApplicationTests]: HelloWorldApplicationTests does not declareany static, non-private, non-final, nested classes annotated with @Configuration.19:28:21.413 [main]INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.txzq.helloworld.HelloWorldApplication fortestclass com.txzq.helloworld.HelloWorldApplicationTests .____ _ __ _ _ /\\/ ___'_ __ _ _(_)_ __ __ _ \ \ \ \( ( )\___ | '_ |'_| | '_ \/ _` |\\\\\\/ ___)||_)|||||||(_||))))' |____|.__|_||_|_||_\__, |/ / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.2.4)2024-04-17T19:28:21.903+08:00 INFO 183809--- [hello-world][main]c.t.h.HelloWorldApplicationTests :Starting HelloWorldApplicationTests using Java 17.0.9 with PID 183809(started by vian in/media/vian/Work/Workspace/hello-world)2024-04-17T19:28:21.905+08:00 INFO 183809--- [hello-world][main]c.t.h.HelloWorldApplicationTests :No active profile set, falling back to 1default profile: "default"2024-04-17T19:28:23.656+08:00 INFO 183809--- [hello-world][main]c.t.h.HelloWorldApplicationTests :Started HelloWorldApplicationTests in2.067seconds (process running for3.35)Java HotSpot(TM)64-Bit Server VM warning: Sharing is only supported forboot loader classes because bootstrap classpath has been appended[INFO]Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.697s -- incom.txzq.helloworld.HelloWorldApplicationTests[INFO][INFO]Results:[INFO][INFO]Tests run: 1, Failures: 0, Errors: 0, Skipped: 0[INFO][INFO][INFO]--- jar:3.3.0:jar (default-jar)@ hello-world ---[INFO]Building jar: /media/vian/Work/Workspace/hello-world/target/hello-world-0.0.1-SNAPSHOT.jar[INFO][INFO]--- spring-boot:3.2.4:repackage (repackage)@ hello-world ---Downloading from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-buildpack-platform/3.2.4/spring-boot-buildpack-platform-3.2.4.pomDownloaded from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-buildpack-platform/3.2.4/spring-boot-buildpack-platform-3.2.4.pom (3.2kB at 2.7kB/s)Downloading from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-loader-tools/3.2.4/spring-boot-loader-tools-3.2.4.pomDownloaded from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-loader-tools/3.2.4/spring-boot-loader-tools-3.2.4.pom (2.2kB at 4.7kB/s)Downloading from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-buildpack-platform/3.2.4/spring-boot-buildpack-platform-3.2.4.jarDownloaded from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-buildpack-platform/3.2.4/spring-boot-buildpack-platform-3.2.4.jar (272kB at 331kB/s)Downloading from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-loader-tools/3.2.4/spring-boot-loader-tools-3.2.4.jarDownloaded from nexus: http://localhost:8081/nexus/repository/maven-public/org/springframework/boot/spring-boot-loader-tools/3.2.4/spring-boot-loader-tools-3.2.4.jar (434kB at 732kB/s)[INFO]Replacing main artifact /media/vian/Work/Workspace/hello-world/target/hello-world-0.0.1-SNAPSHOT.jar with repackaged archive, adding nested dependencies inBOOT-INF/.[INFO]The original artifact has been renamed to /media/vian/Work/Workspace/hello-world/target/hello-world-0.0.1-SNAPSHOT.jar.original[INFO][INFO]--- install:3.1.1:install (default-install)@ hello-world ---[INFO]Installing /media/vian/Work/Workspace/hello-world/pom.xml to /home/vian/Dev_Environment/maven_repository/com/txzq/hello-world/0.0.1-SNAPSHOT/hello-world-0.0.1-SNAPSHOT.pom[INFO]Installing /media/vian/Work/Workspace/hello-world/target/hello-world-0.0.1-SNAPSHOT.jar to /home/vian/Dev_Environment/maven_repository/com/txzq/hello-world/0.0.1-SNAPSHOT/hello-world-0.0.1-SNAPSHOT.jar[INFO]------------------------------------------------------------------------[INFO]BUILD SUCCESS[INFO]------------------------------------------------------------------------[INFO]Total time: 12.542s[INFO]Finished at: 2024-04-17T19:28:29+08:00[INFO]------------------------------------------------------------------------