質問編集履歴

3

解決方法の記入場所変更

2020/02/12 04:05

投稿

takeosan
takeosan

スコア5

test CHANGED
File without changes
test CHANGED
@@ -15,63 +15,3 @@
15
15
  Nexusに登録する方法(記述の仕方)が分かる方、教えて下さい。
16
16
 
17
17
  宜しくお願い致します。
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
- ####build.gradleに以下の記載を追加したら、Nexusに登録することが出来ました。
28
-
29
-
30
-
31
- ```gradle
32
-
33
- apply plugin: 'maven'
34
-
35
- group = 'org.sonatype.nexus.examples'
36
-
37
- version = '1.0.0-SNAPSHOT'
38
-
39
-
40
-
41
- repositories {
42
-
43
- maven {
44
-
45
- url "${nexusUrl}/content/groups/public"
46
-
47
- }
48
-
49
- }
50
-
51
-
52
-
53
- uploadArchives {
54
-
55
- repositories {
56
-
57
- mavenDeployer {
58
-
59
- repository(url: "${nexusUrl}/repositories/releases") {
60
-
61
- authentication(userName: nexusUsername, password: nexusPassword)
62
-
63
- }
64
-
65
- snapshotRepository(url: "${nexusUrl}/repositories/snapshots") {
66
-
67
- authentication(userName: nexusUsername, password: nexusPassword)
68
-
69
- }
70
-
71
- }
72
-
73
- }
74
-
75
- }
76
-
77
- ```

2

情報の追加

2020/02/12 04:05

投稿

takeosan
takeosan

スコア5

test CHANGED
File without changes
test CHANGED
@@ -15,3 +15,63 @@
15
15
  Nexusに登録する方法(記述の仕方)が分かる方、教えて下さい。
16
16
 
17
17
  宜しくお願い致します。
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+ ####build.gradleに以下の記載を追加したら、Nexusに登録することが出来ました。
28
+
29
+
30
+
31
+ ```gradle
32
+
33
+ apply plugin: 'maven'
34
+
35
+ group = 'org.sonatype.nexus.examples'
36
+
37
+ version = '1.0.0-SNAPSHOT'
38
+
39
+
40
+
41
+ repositories {
42
+
43
+ maven {
44
+
45
+ url "${nexusUrl}/content/groups/public"
46
+
47
+ }
48
+
49
+ }
50
+
51
+
52
+
53
+ uploadArchives {
54
+
55
+ repositories {
56
+
57
+ mavenDeployer {
58
+
59
+ repository(url: "${nexusUrl}/repositories/releases") {
60
+
61
+ authentication(userName: nexusUsername, password: nexusPassword)
62
+
63
+ }
64
+
65
+ snapshotRepository(url: "${nexusUrl}/repositories/snapshots") {
66
+
67
+ authentication(userName: nexusUsername, password: nexusPassword)
68
+
69
+ }
70
+
71
+ }
72
+
73
+ }
74
+
75
+ }
76
+
77
+ ```

1

変更

2020/02/07 07:25

投稿

takeosan
takeosan

スコア5

test CHANGED
@@ -1 +1 @@
1
- Gradleビルドで生成したファイルをNexusに登録したい
1
+ Gradleで生成したファイルをNexusに登録したい
test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  リポジトリ管理したいのですが、build.gradleファイルにどのように記述したらいいのかが
6
6
 
7
- 分かりませんでした。Snapshotの場合とReleaseの場合の両方。
7
+ 分かりませんでした。SnapshotとReleaseの両方。
8
8
 
9
9
  開発:Java
10
10
 
@@ -12,92 +12,6 @@
12
12
 
13
13
 
14
14
 
15
- 調べてみて、build.gradle以下の記述で試してみたですエラーとなっしまました
15
+ Nexus登録する方法(記述の仕方)分かる方、教え下さい。
16
16
 
17
- ```gradle
18
-
19
- apply plugin:'maven-publish'
20
-
21
-
22
-
23
- version = '1.0.0'
24
-
25
- group = 'jp.co.aaa.bbb'
26
-
27
-
28
-
29
- publishing {
30
-
31
- publications {
32
-
33
- mavenJava(MavenPublication) {
34
-
35
- from components.java
36
-
37
- artifact sourceJar {
38
-
39
- classifier 'sources'
40
-
41
- }
42
-
43
- }
44
-
45
- }
46
-
47
- repositories {
48
-
49
- def properties = new Properties()
50
-
51
- file('secret.properties').withInputStream { properties.load(it) }
52
-
53
- maven {
54
-
55
- url properties.getProperty 'http://xxxxxx/repository/aaahosted/'
56
-
57
- credentials {
58
-
59
- username = properties.getProperty 'user'
60
-
61
- password = properties.getProperty 'pass'
62
-
63
- }
64
-
65
- }
66
-
67
- }
68
-
69
- ```
70
-
71
-
72
-
73
- #####エラー
74
-
75
- ```エラー
76
-
77
- Exception thrown while executing model rule: PublishingPluginRules#publishing(ExtensionContainer)
78
-
79
- > Could not find method sourceJar() for arguments [build_rewki83di2hj8kdso7w3iz7f$_run_closure8$_closure13$_closure15$_closure16@1826ff2] on object of type org.gradle.api.publish.maven.internal.publication.DefaultMavenPublication.
80
-
81
-
82
-
83
- * Try:
84
-
85
- Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
86
-
87
-
88
-
89
- * Get more help at https://help.gradle.org
90
-
91
-
92
-
93
- Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
94
-
95
- See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings
96
-
97
- ```
98
-
99
- sourceJar{}でエラーになっているのは分かったのですが、
100
-
101
- ここには何を記述すればいいのか分からず。。。
102
-
103
- ビルドツールの知識が無いため、記述の仕方を教えて頂きたいのですが、宜しくお願い致します。
17
+ 宜しくお願い致します。