Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10f559d

Browse files
committed
2 parents be34114 + 6854a0f commit 10f559d

File tree

2 files changed

+106
-25
lines changed

2 files changed

+106
-25
lines changed

BUILD.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,37 @@ JavaFXLibrary uses Apache Maven as a build tool.
2929
* create tag ``git tag -a x.x.x``
3030
* push ``git push origin master`` and ``git push origin x.x.x``
3131
* create a new release and upload the jar file, html documentation and xml file to https://github.com/eficode/JavaFXLibrary/releases
32-
* upload to Maven Repository (TBD)
32+
* upload to Maven Repository (uses release profile)
33+
* Create pgp key if not already: https://central.sonatype.org/pages/working-with-pgp-signatures.html
34+
* In your .m2/settings.xml
35+
````
36+
<settings>
37+
<servers>
38+
<server>
39+
<id>ossrh</id>
40+
<username>sonatype username</username>
41+
<password>sonatype password</password>
42+
</server>
43+
<server>
44+
<id>key id from gpg --list-keys</id>
45+
<passphrase>passphrase for the key</passphrase>
46+
</server>
47+
</servers>
48+
<profiles>
49+
<profile>
50+
<activation>
51+
<activeByDefault>true</activeByDefault>
52+
</activation>
53+
<properties>
54+
<gpg.keyname>key id from gpg --list-keys</gpg.keyname>
55+
</properties>
56+
</profile>
57+
</profiles>
58+
</settings>
59+
````
60+
* Release snapshot or actual release (depending what is in version tag in pom.xml)``mvn clean deploy -P release``
61+
* snapshots can be found from https://oss.sonatype.org/content/repositories/snapshots/org/robotframework/javafxlibrary/
62+
* actual releases can be found from https://search.maven.org/ and typing `javafxlibrary` in the search field.
3363

3464
## Announcements
3565

pom.xml

+75-24
Original file line numberDiff line numberDiff line change
@@ -71,33 +71,83 @@
7171
<url>http://github.com/eficode/JavaFXLibrary/tree/master</url>
7272
</scm>
7373

74+
<profiles>
75+
<profile>
76+
<id>release</id>
77+
<build>
78+
<plugins>
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-source-plugin</artifactId>
82+
<version>3.0.1</version>
83+
<executions>
84+
<execution>
85+
<id>attach-sources</id>
86+
<goals>
87+
<goal>jar-no-fork</goal>
88+
</goals>
89+
</execution>
90+
</executions>
91+
</plugin>
92+
<plugin>
93+
<groupId>org.apache.maven.plugins</groupId>
94+
<artifactId>maven-javadoc-plugin</artifactId>
95+
<version>3.0.1</version>
96+
<executions>
97+
<execution>
98+
<id>attach-javadocs</id>
99+
<goals>
100+
<goal>jar</goal>
101+
</goals>
102+
</execution>
103+
</executions>
104+
</plugin>
105+
<plugin>
106+
<groupId>org.apache.maven.plugins</groupId>
107+
<artifactId>maven-gpg-plugin</artifactId>
108+
<version>1.6</version>
109+
<executions>
110+
<execution>
111+
<id>sign-artifacts</id>
112+
<phase>package</phase>
113+
<goals>
114+
<goal>sign</goal>
115+
</goals>
116+
<configuration>
117+
<gpgArguments>
118+
<arg>--pinentry-mode</arg>
119+
<arg>loopback</arg>
120+
</gpgArguments>
121+
<keyname>${gpg.keyname}</keyname>
122+
<passphraseServerId>${gpg.keyname}</passphraseServerId>
123+
</configuration>
124+
</execution>
125+
</executions>
126+
</plugin>
127+
</plugins>
128+
</build>
129+
</profile>
130+
</profiles>
131+
132+
<distributionManagement>
133+
<snapshotRepository>
134+
<id>ossrh</id>
135+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
136+
</snapshotRepository>
137+
</distributionManagement>
138+
74139
<build>
75140
<plugins>
76141
<plugin>
77-
<groupId>org.apache.maven.plugins</groupId>
78-
<artifactId>maven-source-plugin</artifactId>
79-
<version>3.0.1</version>
80-
<executions>
81-
<execution>
82-
<id>attach-sources</id>
83-
<goals>
84-
<goal>jar-no-fork</goal>
85-
</goals>
86-
</execution>
87-
</executions>
88-
</plugin>
89-
<plugin>
90-
<groupId>org.apache.maven.plugins</groupId>
91-
<artifactId>maven-javadoc-plugin</artifactId>
92-
<version>3.0.1</version>
93-
<executions>
94-
<execution>
95-
<id>attach-javadocs</id>
96-
<goals>
97-
<goal>jar</goal>
98-
</goals>
99-
</execution>
100-
</executions>
142+
<groupId>org.sonatype.plugins</groupId>
143+
<artifactId>nexus-staging-maven-plugin</artifactId>
144+
<version>1.6.7</version>
145+
<extensions>true</extensions>
146+
<configuration>
147+
<serverId>ossrh</serverId>
148+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
149+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
150+
</configuration>
101151
</plugin>
102152
<plugin>
103153
<artifactId>maven-compiler-plugin</artifactId>
@@ -244,6 +294,7 @@
244294
</plugin>
245295
</plugins>
246296
</build>
297+
247298
<dependencies>
248299
<dependency>
249300
<groupId>org.apache.maven</groupId>

0 commit comments

Comments
 (0)