Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 117 additions & 51 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@


<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- release, not source/target: source/target still compile against the running JDK's
class library, so a newer JDK silently accepts APIs the 11 runtime does not have -->
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -149,69 +150,134 @@

<plugins>
<plugin>
<!-- pinned because maven.compiler.release is only honored from 3.6 on, and an
undeclared plugin takes whatever version the running Maven binds -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
</plugin>
<plugin>
<!-- fail the build on the wrong JDK rather than shipping a jar that only looks right:
release 11 keeps the bytecode correct, but a newer JDK still packages differently -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.6.3</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<id>enforce-toolchain</id>
<goals>
<goal>sign</goal>
<goal>enforce</goal>
</goals>

<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>


<configuration>
<rules>
<requireJavaVersion>
<version>[11,12)</version>
<message>Build with JDK 11. The plugin ships for a Java 11 runtime.</message>
</requireJavaVersion>
<requireMavenVersion>
<version>[3.6.3,)</version>
<message>Maven 3.6.3 or newer is required for maven.compiler.release.</message>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>

<!-- versions stay pinned here so an on-demand goal such as mvn javadoc:javadoc still runs a
known version; only the executions move into the release profile -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<!-- everything Maven Central needs and a plugin build does not: signing, the javadoc and
sources jars, and staging. Off by default so mvn package stays compile plus package;
build with -Prelease to publish. Docs on demand come from mvn javadoc:javadoc -->
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<distributionManagement>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.micromanager.lightsheetmanager.gui.components.ListeningPanel;
import org.micromanager.lightsheetmanager.gui.components.SettingsListener;
import org.micromanager.lightsheetmanager.gui.data.Icons;
import org.micromanager.lightsheetmanager.gui.utils.DialogUtils;
import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.gui.tabs.acquisition.AdvancedTimingPanel;
import org.micromanager.lightsheetmanager.gui.tabs.acquisition.CameraPanel;
Expand Down Expand Up @@ -232,7 +233,15 @@ private void createEventHandlers() {
if (btnRunAcquisition_.isSelected()) {
runAcquisition(false);
} else {
model_.acquisitions().requestStop();
// confirm first: one stray click discards a run in progress
if (DialogUtils.showYesNoDialog(this, "Stop Acquisition",
"Stop the current acquisition?")) {
model_.acquisitions().requestStop();
} else {
// the press already flipped the toggle, so put it back or the button
// reads "Start Acquisition" while the run is still going
btnRunAcquisition_.setState(true);
}
}
});

Expand Down
Loading