Skip to content

Commit adef2eb

Browse files
authored
Merge pull request #811 from nicost/mavenMigration
Build: transition to maven central deployment.
2 parents a11b4fb + cd1d2c7 commit adef2eb

3 files changed

Lines changed: 30 additions & 29 deletions

File tree

.github/workflows/build_and_deploy.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
if: ${{ needs.check-java-version.outputs.changed == 'true' }}
4848

4949

50-
name: Deploy PycroManagerJava.jar to Sonatype OSS
50+
name: Deploy PycroManagerJava.jar to Maven central
5151
runs-on: ubuntu-latest
5252

5353
steps:
@@ -65,18 +65,17 @@ jobs:
6565
with: # running setup-java again overwrites the settings.xml
6666
java-version: 8
6767
distribution: 'zulu'
68-
69-
server-id: ossrh
70-
server-username: OSSRH_USERNAME
71-
server-password: OSSRH_PASSWORD
68+
server-id: central
69+
server-username: MAVEN_USERNAME
70+
server-password: MAVEN_PASSWORD
7271
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
7372
gpg-passphrase: MAVEN_GPG_PASSPHRASE
7473

7574
- name: Publish to Apache Maven Central
7675
run: mvn deploy --file java/pom.xml -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }}
7776
env:
78-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
79-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
77+
OSSRH_USERNAME: ${{ secrets.MAVEN_USERNAME }}
78+
OSSRH_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
8079
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
8180

8281

java/pom.xml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<developer>
2424
<id>nicost</id>
2525
<name>Nico Stuurman</name>
26-
<organization>UCSF/HHMI</organization>
26+
<organization>UCSF</organization>
2727
</developer>
2828
</developers>
2929

@@ -55,7 +55,7 @@
5555
<dependency>
5656
<groupId>org.micro-manager.acqengj</groupId>
5757
<artifactId>AcqEngJ</artifactId>
58-
<version>0.39.0</version>
58+
<version>0.39.2</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>org.micro-manager.ndviewer</groupId>
@@ -111,29 +111,27 @@
111111
<goal>sign</goal>
112112
</goals>
113113

114-
<configuration>
115-
<gpgArguments>
116-
<arg>--pinentry-mode</arg>
117-
<arg>loopback</arg>
118-
</gpgArguments>
114+
<configuration>
115+
<gpgArguments>
116+
<arg>--pinentry-mode</arg>
117+
<arg>loopback</arg>
118+
</gpgArguments>
119119
</configuration>
120120

121121
</execution>
122122
</executions>
123123
</plugin>
124124

125125
<plugin>
126-
<groupId>org.sonatype.plugins</groupId>
127-
<artifactId>nexus-staging-maven-plugin</artifactId>
128-
<version>1.6.13</version>
129-
<extensions>true</extensions>
130-
<configuration>
131-
<serverId>ossrh</serverId>
132-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
133-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
134-
<stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
135-
</configuration>
136-
126+
<groupId>org.sonatype.central</groupId>
127+
<artifactId>central-publishing-maven-plugin</artifactId>
128+
<version>0.8.0</version>
129+
<extensions>true</extensions>
130+
<configuration>
131+
<publishingServerId>central</publishingServerId>
132+
<autoPublish>true</autoPublish>
133+
<waitUntil>published</waitUntil>
134+
</configuration>
137135
</plugin>
138136

139137
</plugins>
@@ -148,4 +146,4 @@
148146
</repository>
149147
</distributionManagement>
150148

151-
</project>
149+
</project>

pycromanager/test/conftest.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ def install_mm():
5555
if is_port_in_use(4827):
5656
print('Using Micro-manager running on port 4827 for testing')
5757
yield
58-
elif find_existing_mm_install():
58+
try:
59+
path = find_existing_mm_install()
5960
print('Micro-Manager is already installed, skipping installation')
60-
yield find_existing_mm_install()
61-
else:
61+
yield path
62+
except FileNotFoundError:
63+
print("No Micro-Manager installation found, installing now")
6264
# Download an install latest nightly build
6365
mm_install_dir = download_and_install_mm(destination='auto')
6466

67+
print('Micro-Manager installed in ' + mm_install_dir)
68+
6569
#### Replace with newer versions of Java libraries ####
6670
# find pycro-manager/java path
6771
if os.path.isdir('java'):

0 commit comments

Comments
 (0)