diff --git a/annotation/pom.xml b/annotation/pom.xml
index d89ffbb0..290a9b8d 100644
--- a/annotation/pom.xml
+++ b/annotation/pom.xml
@@ -4,7 +4,7 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../pom.xml
diff --git a/build-tool-plugins/exec/pom.xml b/build-tool-plugins/exec/pom.xml
index 21a3be76..3b0268a6 100644
--- a/build-tool-plugins/exec/pom.xml
+++ b/build-tool-plugins/exec/pom.xml
@@ -5,12 +5,12 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../../pom.xml
sharedtype-ap-exec
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
SharedType Annotation Processor Executor
Call javac to execute annotation processing.
diff --git a/build-tool-plugins/exec/src/main/java/online/sharedtype/exec/common/AnnotationProcessorExecutor.java b/build-tool-plugins/exec/src/main/java/online/sharedtype/exec/common/AnnotationProcessorExecutor.java
index e3b3ab61..3ef2a86f 100644
--- a/build-tool-plugins/exec/src/main/java/online/sharedtype/exec/common/AnnotationProcessorExecutor.java
+++ b/build-tool-plugins/exec/src/main/java/online/sharedtype/exec/common/AnnotationProcessorExecutor.java
@@ -33,7 +33,8 @@ public AnnotationProcessorExecutor(Processor processor, Logger log, DependencyRe
this.dependencyResolver = dependencyResolver;
}
- public void execute(Path projectBaseDir,
+ /** @return true if successful; false otherwise. */
+ public boolean execute(Path projectBaseDir,
Path outputDir,
Iterable compileSourceRoots,
String sourceEncoding,
@@ -52,7 +53,7 @@ public void execute(Path projectBaseDir,
JavaCompiler.CompilationTask task = compiler.getTask(logger, fileManager, diagnosticListener, compilerOptions, null, sources);
task.setProcessors(Collections.singleton(processor));
- task.call();
+ return task.call();
}
}
diff --git a/build-tool-plugins/gradle-plugin/gradle.properties b/build-tool-plugins/gradle-plugin/gradle.properties
index 6a7a5b48..f692043c 100644
--- a/build-tool-plugins/gradle-plugin/gradle.properties
+++ b/build-tool-plugins/gradle-plugin/gradle.properties
@@ -1,3 +1,3 @@
-version=0.14.0-SNAPSHOT
+version=0.13.2-SNAPSHOT
mavenCentralPublishing=true
signAllPublications=true
diff --git a/build-tool-plugins/gradle-plugin/it/gradle.properties b/build-tool-plugins/gradle-plugin/it/gradle.properties
index 77694d59..eccd91be 100644
--- a/build-tool-plugins/gradle-plugin/it/gradle.properties
+++ b/build-tool-plugins/gradle-plugin/it/gradle.properties
@@ -1 +1 @@
-projectVersion=0.14.0-SNAPSHOT
+projectVersion=0.13.2-SNAPSHOT
diff --git a/build-tool-plugins/gradle-plugin/src/main/java/online/sharedtype/gradle/SharedtypeGenTask.java b/build-tool-plugins/gradle-plugin/src/main/java/online/sharedtype/gradle/SharedtypeGenTask.java
index cf8cb552..5b21f4aa 100644
--- a/build-tool-plugins/gradle-plugin/src/main/java/online/sharedtype/gradle/SharedtypeGenTask.java
+++ b/build-tool-plugins/gradle-plugin/src/main/java/online/sharedtype/gradle/SharedtypeGenTask.java
@@ -36,14 +36,18 @@ void setExtension(SharedtypeConfigExtension extension) {
@TaskAction
void action() {
+ boolean success;
try {
- execute();
+ success = execute();
} catch (Exception e) {
throw new SharedTypeException(String.format("Failed to execute task '%s'", TASK_NAME), e);
}
+ if (!success) {
+ throw new SharedTypeException(String.format("Failed to execute task '%s'", TASK_NAME));
+ }
}
- private void execute() throws Exception {
+ private boolean execute() throws Exception {
JavaPluginExtension javaPluginExtension = project.getExtensions().findByType(JavaPluginExtension.class);
if (javaPluginExtension == null) {
throw new UnsupportedOperationException("Could not find JavaPluginExtension, only Java projects are supported.");
@@ -67,7 +71,7 @@ private void execute() throws Exception {
() -> classpathDependencies
);
- executor.execute(
+ return executor.execute(
project.getProjectDir().toPath(),
resolveOutputDirectory().toPath(),
sourceDirs,
diff --git a/build-tool-plugins/maven-plugin/it/pom.xml b/build-tool-plugins/maven-plugin/it/pom.xml
index bc09131f..7c4afc5c 100644
--- a/build-tool-plugins/maven-plugin/it/pom.xml
+++ b/build-tool-plugins/maven-plugin/it/pom.xml
@@ -5,7 +5,7 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../../../pom.xml
diff --git a/build-tool-plugins/maven-plugin/pom.xml b/build-tool-plugins/maven-plugin/pom.xml
index 992017b4..1f767bdd 100644
--- a/build-tool-plugins/maven-plugin/pom.xml
+++ b/build-tool-plugins/maven-plugin/pom.xml
@@ -5,12 +5,12 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../../pom.xml
sharedtype-maven-plugin
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
maven-plugin
SharedType Maven Plugin
diff --git a/build-tool-plugins/maven-plugin/src/main/java/online/sharedtype/maven/SharedTypeGenMojo.java b/build-tool-plugins/maven-plugin/src/main/java/online/sharedtype/maven/SharedTypeGenMojo.java
index f64bc323..f98096b4 100644
--- a/build-tool-plugins/maven-plugin/src/main/java/online/sharedtype/maven/SharedTypeGenMojo.java
+++ b/build-tool-plugins/maven-plugin/src/main/java/online/sharedtype/maven/SharedTypeGenMojo.java
@@ -5,6 +5,7 @@
import online.sharedtype.exec.common.SharedTypeApCompilerOptions;
import online.sharedtype.processor.SharedTypeAnnotationProcessor;
import online.sharedtype.processor.support.annotation.Nullable;
+import online.sharedtype.processor.support.exception.SharedTypeException;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
@@ -64,13 +65,16 @@ public void execute() throws MojoExecutionException {
new MavenDependencyResolver(repositorySystem, session, project)
);
try {
- apExecutor.execute(
+ boolean success = apExecutor.execute(
project.getBasedir().toPath(),
Paths.get(outputDirectory),
project.getCompileSourceRoots().stream().map(Paths::get).collect(Collectors.toList()),
project.getProperties().getProperty(PROP_PROJECT_SOURCE_ENCODING),
new SharedTypeApCompilerOptions(propertyFile).toList()
);
+ if (!success) {
+ throw new SharedTypeException("Some error during annotation processing.");
+ }
} catch (Exception e) {
throw new MojoExecutionException(e);
}
diff --git a/doc/Development.md b/doc/Development.md
index a62c2c67..486174ee 100644
--- a/doc/Development.md
+++ b/doc/Development.md
@@ -111,4 +111,4 @@ To Test Javadoc locally:
```
Then open `annotation/target/reports/apidocs/index.html`.
-To test deployment, see [release](../misc/release.sh).
+To test deployment, see scripts: [release](../misc/release.sh), [setversion](../misc/setversion.sh).
diff --git a/e2e/pom.xml b/e2e/pom.xml
index 2b267e02..a309de29 100644
--- a/e2e/pom.xml
+++ b/e2e/pom.xml
@@ -4,7 +4,7 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../pom.xml
diff --git a/it/java17/pom.xml b/it/java17/pom.xml
index 6c1740ab..87a66080 100644
--- a/it/java17/pom.xml
+++ b/it/java17/pom.xml
@@ -4,7 +4,7 @@
online.sharedtype
sharedtype-it-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../pom.xml
diff --git a/it/java8/pom.xml b/it/java8/pom.xml
index 9b7be552..af17bfa2 100644
--- a/it/java8/pom.xml
+++ b/it/java8/pom.xml
@@ -4,7 +4,7 @@
online.sharedtype
sharedtype-it-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../pom.xml
diff --git a/it/pom.xml b/it/pom.xml
index e597939c..4ac4eb8f 100644
--- a/it/pom.xml
+++ b/it/pom.xml
@@ -5,7 +5,7 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index b3155d4d..3ee2a7d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
pom
SharedType Parent
diff --git a/processor/pom.xml b/processor/pom.xml
index e479b4fb..a9b73a60 100644
--- a/processor/pom.xml
+++ b/processor/pom.xml
@@ -5,7 +5,7 @@
online.sharedtype
sharedtype-parent
- 0.14.0-SNAPSHOT
+ 0.13.2-SNAPSHOT
../pom.xml