This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new e811e95 SLING-10022 change default buildOutputDirectory and make it
configurable
e811e95 is described below
commit e811e95b63edb1a9ab1710751c49004a327aef39
Author: Konrad Windszus <[email protected]>
AuthorDate: Wed Dec 23 19:12:10 2020 +0100
SLING-10022 change default buildOutputDirectory and make it configurable
Update ASM to fully support Java class files up to Java 16
---
sling-maven-plugin/pom.xml | 13 ++++++++++---
.../maven/bundlesupport/GenerateAdapterMetadataMojo.java | 12 ++++++++----
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/sling-maven-plugin/pom.xml b/sling-maven-plugin/pom.xml
index 6e21f08..7960dcf 100644
--- a/sling-maven-plugin/pom.xml
+++ b/sling-maven-plugin/pom.xml
@@ -218,12 +218,19 @@
<artifactId>adapter-annotations</artifactId>
<version>1.0.0</version>
</dependency>
+ <!-- https://mvnrepository.com/artifact/org.ow2.asm/asm -->
<dependency>
- <groupId>asm</groupId>
- <artifactId>asm-all</artifactId>
- <version>3.3.1</version>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>9.0</version>
</dependency>
<dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ <version>9.0</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.4</version>
diff --git
a/sling-maven-plugin/src/main/java/org/apache/sling/maven/bundlesupport/GenerateAdapterMetadataMojo.java
b/sling-maven-plugin/src/main/java/org/apache/sling/maven/bundlesupport/GenerateAdapterMetadataMojo.java
index a16248d..a54e0a6 100644
---
a/sling-maven-plugin/src/main/java/org/apache/sling/maven/bundlesupport/GenerateAdapterMetadataMojo.java
+++
b/sling-maven-plugin/src/main/java/org/apache/sling/maven/bundlesupport/GenerateAdapterMetadataMojo.java
@@ -57,7 +57,7 @@ import org.scannotation.AnnotationDB;
/**
* Build <a
href="http://sling.apache.org/documentation/the-sling-engine/adapters.html">adapter
metadata (JSON)</a> for the Web Console Plugin at {@code
/system/console/status-adapters} and
* {@code /system/console/adapters} from classes annotated with
- * <a
href="http://svn.apache.org/viewvc/sling/trunk/tooling/maven/adapter-annotations/">adapter
annotations</a>.
+ * <a href="https://github.com/apache/sling-adapter-annotations">adapter
annotations</a>.
*/
@Mojo(name="generate-adapter-metadata", defaultPhase =
LifecyclePhase.PROCESS_CLASSES,
threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)
@@ -79,7 +79,8 @@ public class GenerateAdapterMetadataMojo extends AbstractMojo
{
}
}
- @Parameter(defaultValue = "${project.build.outputDirectory}", readonly =
true)
+ /** The directory which to check for classes with adapter metadata
annotations. */
+ @Parameter(defaultValue = "${project.build.outputDirectory}")
private File buildOutputDirectory;
/**
@@ -88,7 +89,10 @@ public class GenerateAdapterMetadataMojo extends
AbstractMojo {
@Parameter(property = "adapter.descriptor.name", defaultValue =
"SLING-INF/adapters.json")
private String fileName;
- @Parameter(defaultValue =
"${project.build.directory}/adapter-plugin-generated", required = true,
readonly = true)
+ /**
+ * The output directory in which to emit the descriptor file with name
{@link GenerateAdapterMetadataMojo#fileName}.
+ */
+ @Parameter(defaultValue = "${project.build.outputDirectory}", required =
true)
private File outputDirectory;
/**
@@ -104,7 +108,7 @@ public class GenerateAdapterMetadataMojo extends
AbstractMojo {
final AnnotationDB annotationDb = new AnnotationDB();
annotationDb.scanArchives(buildOutputDirectory.toURI().toURL());
- final Set<String> annotatedClassNames = new HashSet<String>();
+ final Set<String> annotatedClassNames = new HashSet<>();
addAnnotatedClasses(annotationDb, annotatedClassNames,
Adaptable.class);
addAnnotatedClasses(annotationDb, annotatedClassNames,
Adaptables.class);