23.06.15
DEVOTEE를 활성화 시키면
지금 작성한 커뮤니티 글에 대해 1개의 댓글을 달아줍니다.
버튼을 누르면 글 수정 시 ChatGPT가 작성한 댓글이 수정됩니다.
| 컨텐츠 유형 | 제목 | 저장일 | 삭제 |
|---|
본인인증 로그인에 실패하였습니다.
회원이 아니시거나 본인인증 등록이
완료되지 않은 사용자입니다.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>my-repo-snapshot</id>
<username>my-repo-user</username>
<password>1234</password>
</server>
<server>
<id>my-repo-release</id>
<username>my-repo-user</username>
<password>1234</password>
</server>
</servers>
</settings>
package com.schooldevops.libdemo.services;
import lombok.extern.slf4j.Slf4j;
import java.util.Locale;
@Slf4j
public class StringUtil {
public static String toUpper(String inputValue) {
String convertedString = inputValue.toUpperCase(Locale.ROOT);
log.info("toUpperCase: from {} to {}", inputValue, convertedString );
return convertedString;
}
public static String toLower(String inputValue) {
String convertedString = inputValue.toLowerCase(Locale.ROOT);
log.info("toLowerCase: from {} to {}", inputValue, convertedString );
return convertedString;
}
}
... 생략
<distributionManagement>
<snapshotRepository>
<id>my-repo-snapshot</id>
<name>my-repo-snapshot</name>
<url>http://localhost:8081/repository/my-repo-snapshot/</url>
</snapshotRepository>
<repository>
<id>my-repo-release</id>
<name>my-repo-release</name>
<url>http://localhost:8081/repository/my-repo-release/</url>
</repository>
</distributionManagement>
mvn clean compile deploy
Ξ nexus_samples/lib-demo → mvn clean compile deploy [INFO] Scanning for projects... [INFO] [INFO] ---------------------< com.schooldevops:lib-demo >---------------------- [INFO] Building lib-demo 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ lib-demo --- [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ lib-demo --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ lib-demo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to /Users/kido/Documents/06.PROGRAMMING_COURSES/nexus_samples/lib-demo/target/classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ lib-demo --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ lib-demo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to /Users/kido/Documents/06.PROGRAMMING_COURSES/nexus_samples/lib-demo/target/classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ lib-demo --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory /Users/kido/Documents/06.PROGRAMMING_COURSES/nexus_samples/lib-demo/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ lib-demo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /Users/kido/Documents/06.PROGRAMMING_COURSES/nexus_samples/lib-demo/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ lib-demo --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.schooldevops.libdemo.LibDemoApplicationTests 11:26:41.882 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] ... 생략 [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ lib-demo --- Downloading from my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/0.0.1-SNAPSHOT/maven-metadata.xml Uploading to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/0.0.1-SNAPSHOT/lib-demo-0.0.1-20211027.022644-1.jar Uploaded to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/0.0.1-SNAPSHOT/lib-demo-0.0.1-20211027.022644-1.jar (8.7 MB at 12 MB/s) Uploading to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/0.0.1-SNAPSHOT/lib-demo-0.0.1-20211027.022644-1.pom Uploaded to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/0.0.1-SNAPSHOT/lib-demo-0.0.1-20211027.022644-1.pom (2.4 kB at 12 kB/s) Downloading from my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/maven-metadata.xml Uploading to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/0.0.1-SNAPSHOT/maven-metadata.xml Uploaded to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/0.0.1-SNAPSHOT/maven-metadata.xml (774 B at 11 kB/s) Uploading to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/maven-metadata.xml Uploaded to my-repo-snapshot: http://localhost:8081/repository/my-repo-snapshot/com/schooldevops/lib-demo/maven-metadata.xml (284 B at 4.6 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.625 s [INFO] Finished at: 2021-10-27T11:26:45+09:00 [INFO] ------------------------------------------------------------------------
... 생략
<repositories>
<repository>
<id>my-repo-snapshot</id>
<name>snapshot</name>
<url>http://localhost:8081/repository/my-repo-snapshot/</url>
</repository>
<repository>
<id>my-repo-release</id>
<name>release</name>
<url>http://localhost:8081/repository/my-repo-release/</url>
</repository>
</repositories>
... 생략
<dependency>
<groupId>com.schooldevops</groupId>
<artifactId>lib-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
... 생략
package com.schooldevops.libusedemo;
import com.schooldevops.libdemo.services.StringUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api")
public class StringController {
@GetMapping("/upper/{string}")
public String upper(@PathVariable("string") String string) {
return StringUtil.toUpper(string);
}
@GetMapping("/lower/{string}")
public String lower(@PathVariable("string") String string) {
return StringUtil.toLower(string);
}
}
curl http://localhost:8080/api/upper/hello HELLO
curl http://localhost:8080/api/lower/HELLO hello
<groupId>com.schooldevops</groupId>
<artifactId>lib-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<groupId>com.schooldevops</groupId>
<artifactId>lib-demo</artifactId>
<version>0.0.1</version>
mvn clean compile deploy
... 생략 Uploaded to my-repo-release: http://localhost:8081/repository/my-repo-release/com/schooldevops/lib-demo/0.0.1/lib-demo-0.0.1.pom (2.4 kB at 36 kB/s) Downloading from my-repo-release: http://localhost:8081/repository/my-repo-release/com/schooldevops/lib-demo/maven-metadata.xml Uploading to my-repo-release: http://localhost:8081/repository/my-repo-release/com/schooldevops/lib-demo/maven-metadata.xml Uploaded to my-repo-release: http://localhost:8081/repository/my-repo-release/com/schooldevops/lib-demo/maven-metadata.xml (304 B at 6.3 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.479 s [INFO] Finished at: 2021-10-27T12:18:15+09:00 [INFO] ------------------------------------------------------------------------
mvn clean compile deploy ... 생략 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project lib-demo: Failed to deploy artifacts: Could not transfer artifact com.schooldevops:lib-demo:jar:0.0.1 from/to my-repo-release (http://localhost:8081/repository/my-repo-release/): transfer failed for http://localhost:8081/repository/my-repo-release/com/schooldevops/lib-demo/0.0.1/lib-demo-0.0.1.jar, status: 400 Repository does not allow updating assets: my-repo-release -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
DEVOTEE를 활성화 시키면
지금 작성한 댓글에 AI가 댓글을 달아줍니다.