remove springboot-api-archetype

This commit is contained in:
2026-05-21 08:58:50 -04:00
parent 3f06b1738f
commit 906ad41928
13 changed files with 0 additions and 499 deletions
@@ -1,9 +0,0 @@
# Maven
/target
pom.xml.versionsBackup
# Eclipse
.settings
.project
.classpath
-56
View File
@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>beedk-springboot-api-archetype</artifactId>
<packaging>maven-archetype</packaging>
<parent>
<groupId>com.inteligr8.ootbee</groupId>
<artifactId>beedk-parent</artifactId>
<version>1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<name>Order of the Bee Development Kit: Project Scaffolding for a Spring Boot application using ACS/API remote APIs</name>
<url>https://git.inteligr8.com/inteligr8/ootbee-beedk</url>
<licenses>
<license>
<name>GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://git.inteligr8.com/inteligr8/ootbee-beedk.git</connection>
<developerConnection>scm:git:git@git.inteligr8.com:inteligr8/ootbee-beedk.git</developerConnection>
<url>https://git.inteligr8.com/inteligr8/ootbee-beedk</url>
</scm>
<organization>
<name>Order of the Bee</name>
<url>https://orderofthebee.net</url>
</organization>
<developers>
<developer>
<id>brian.long</id>
<name>Brian Long</name>
<email>brian@inteligr8.com</email>
<organization>Inteligr8</organization>
<organizationUrl>https://www.inteligr8.com</organizationUrl>
<url>https://twitter.com/brianmlong</url>
</developer>
</developers>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>${archetype-packaging.version}</version>
</extension>
</extensions>
</build>
</project>
@@ -1,40 +0,0 @@
<archetype-descriptor name="${project.artifactId}"
xmlns="https://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd">
<requiredProperties>
<requiredProperty key="shortname">
<validationRegex>[A-Za-z0-9]+</validationRegex>
</requiredProperty>
<requiredProperty key="dockerRegistryHost">
<defaultValue>quay.io</defaultValue>
</requiredProperty>
<requiredProperty key="dockerImagePrefix">
<defaultValue>local</defaultValue>
</requiredProperty>
<requiredProperty key="beedkVersion">
<defaultValue>[1.0.0,2.0.0)</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
<fileSet filtered="true" packaged="true">
<directory>src/main/java</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true">
<directory>src/test/java</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet filtered="true">
<directory>src</directory>
<excludes>
<exclude>main/java/**/*</exclude>
<exclude>test/java/**/*</exclude>
</excludes>
</fileSet>
</fileSets>
</archetype-descriptor>
@@ -1,9 +0,0 @@
# Maven
/target
pom.xml.versionsBackup
# Eclipse
.settings
.project
.classpath
@@ -1,68 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>jar</packaging>
<name>${shortname}</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.release.source>11</maven.release.source>
<alfresco.restapi.version>5.0.0</alfresco.restapi.version>
<!-- for RAD environment -->
<edition>community</edition>
<alfresco.platform.version>7.4.2</alfresco.platform.version>
<!-- for Docker deployment -->
<docker.image.registry>${dockerRegistryHost}</docker.image.registry>
<docker.image.name>${dockerImagePrefix}/${project.artifactId}</docker.image.name>
<docker.image.tag>${project.version}</docker.image.tag>
</properties>
<dependencies>
<!-- Optional; use for REST API access -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-java-rest-api-spring-boot-starter</artifactId>
<version>${alfresco.restapi.version}</version>
</dependency>
<!-- Optional; use for Event API access -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-java-event-api-spring-boot-starter</artifactId>
<version>${alfresco.restapi.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>2.40</version>
<extensions>true</extensions>
<configuration>
<tiles>
<!-- Documentation: https://git.inteligr8.com/inteligr8/ootbee-beedk/src/branch/stable/beedk-acs-platform-artifact-rad-tile -->
<tile>com.inteligr8.ootbee:beedk-acs-platform-artifact-rad-tile:${beedkVersion}</tile>
<!-- Documentation: https://git.inteligr8.com/inteligr8/ootbee-beedk/src/branch/stable/beedk-springboot-docker-tile -->
<tile>com.inteligr8.ootbee:beedk-springboot-docker-tile:${beedkVersion}</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
</repositories>
</project>
@@ -1,26 +0,0 @@
FROM docker.inteligr8.com/inteligr8/ubuntu-jdk:20.04-11
# Set default user information
ARG JAR_FILE=target/${env.project_artifactId}-${env.project_version}.jar
ARG APPGROUPNAME=alfresco
ARG APPGROUPID=1000
ARG APPUSERNAME=atengine
ARG APPUSERID=33001
ENV JAVA_OPTS="-Xmx128m"
ENV JAR_PATH=/usr/local/bin/${env.project_artifactId}-${env.project_version}.jar
COPY ${JAR_FILE} ${JAR_PATH}
# Install your engine's dependencies here
#RUN apt update && \
# apt -y install {dependency names in APT repository}
RUN groupadd -g ${APPGROUPID} ${APPGROUPNAME} && \
useradd -u ${APPUSERID} -G ${APPGROUPNAME} ${APPUSERNAME} && \
chown ${APPUSERNAME}:${APPGROUPNAME} ${JAR_PATH}
USER ${APPUSERNAME}
ENTRYPOINT java ${JAVA_OPTS} -jar ${JAR_PATH}
@@ -1,67 +0,0 @@
/*
* #%L
* Alfresco Transform Core
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package ${package};
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.event.EventListener;
import io.micrometer.core.instrument.MeterRegistry;
@SpringBootApplication
@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class })
@ImportResource({"classpath*:application-context.xml"})
public class Application {
private final Logger logger = LoggerFactory.getLogger(Application.class);
@Value("${container.name}")
private String containerName;
@Bean
public MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
return registry -> registry.config().commonTags("containerName", this.containerName);
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@EventListener(ApplicationReadyEvent.class)
public void startup() {
this.logger.info("Starting application components... Done");
}
}
@@ -1,8 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean autowire-candidate="true" class="org.springframework.web.client.RestTemplate" />
</beans>
@@ -1,5 +0,0 @@
#set( $dollar = '$' )
logging:
level:
${groupId}: ${dollar}{LOG_LEVEL:info}
@@ -1,174 +0,0 @@
/*
* #%L
* Alfresco Transform Core
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package ${groupId};
import java.util.HashSet;
import java.util.Set;
import javax.annotation.PostConstruct;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.junit.Assert;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.web.client.HttpStatusCodeException;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class HttpRequestIT {
private final Logger logger = LoggerFactory.getLogger(HttpRequestIT.class);
@LocalServerPort
private int port;
@Autowired
private TestRestTemplate restTemplate;
protected String baseUrl;
@PostConstruct
public void init() {
this.baseUrl = "http://localhost:" + this.port;
}
@Test
public void testRootPath() {
String result = this.restTemplate.getForObject(this.baseUrl, String.class);
if (this.logger.isDebugEnabled())
this.logger.debug("testRootPath(): result: " + result);
Assert.assertNotNull("A result from the HTTP GET was expected", result);
Document htmldoc = Jsoup.parse(result);
Assert.assertNotNull("An HTML compliant result was expected: " + result.substring(0, 50), htmldoc);
Elements elements = htmldoc.select("html body h2");
Assert.assertFalse("The HTML body is expected to have an h2 element: html: " + htmldoc.toString(), elements.isEmpty());
Assert.assertEquals("The HTML body is expected to have just one h2 element", 1, elements.size());
Assert.assertEquals("The HTML body header is not what was expected", "${shortname} Test Transformation", elements.html());
elements = htmldoc.select("html input");
Set<String> inputs = new HashSet<String>();
for (Element element : elements)
inputs.add(element.attr("name"));
Assert.assertTrue("The HTML is expected to have a form input for 'file': " + inputs.toString(), inputs.contains("file"));
Assert.assertTrue("The HTML is expected to have a form input for 'targetExtension': " + inputs.toString(), inputs.contains("targetExtension"));
}
@Test
public void testLogPath() {
String result = this.restTemplate.getForObject(this.baseUrl + "/log", String.class);
if (this.logger.isDebugEnabled())
this.logger.debug("testLogPath(): result: " + result);
Assert.assertNotNull("A result from the HTTP GET was expected", result);
Document htmldoc = Jsoup.parse(result);
Assert.assertNotNull("An HTML compliant result was expected: " + result.substring(0, 50), htmldoc);
Elements elements = htmldoc.select("html body div h2");
Assert.assertFalse("The HTML is expected to have an html/body/div/h2 element: html: " + htmldoc.select("html").toString(), elements.isEmpty());
Assert.assertEquals("The HTML is expected to have just one html/body/div/h2 element", 1, elements.size());
Assert.assertEquals("The HTML body header is not what was expected", "${shortname} Log Entries", elements.html());
}
@Test
public void testNoPath() {
try {
ResponseEntity<String> response = this.restTemplate.getForEntity(this.baseUrl + "/doesnotexist", String.class);
Assert.assertEquals("An unexpected path must return a 404 error", 404, response.getStatusCodeValue());
} catch (HttpStatusCodeException hsce) {
Assert.assertEquals("An unexpected path must return a 404 error", 404, hsce.getRawStatusCode());
}
}
@Test
public void testServiceGet() {
try {
ResponseEntity<String> response = this.restTemplate.getForEntity(this.baseUrl + "/transform", String.class);
Assert.assertEquals("An unexpected path must return a 405 error", 405, response.getStatusCodeValue());
} catch (HttpStatusCodeException hsce) {
Assert.assertEquals("An unexpected path must return a 405 error", 405, hsce.getRawStatusCode());
}
}
@Test
public void testServiceNoFile() {
try {
ResponseEntity<String> response = this._testService(null, "trgt");
Assert.assertEquals("An unexpected path must return a 400 error", 400, response.getStatusCodeValue());
} catch (HttpStatusCodeException hsce) {
Assert.assertEquals("An unexpected path must return a 400 error", 400, hsce.getRawStatusCode());
}
}
@Test @Ignore
public void testServiceNoTargetExtension() {
try {
ResponseEntity<String> response = this._testService("quick.src", null);
Assert.assertEquals("An unexpected path must return a 400 error", 400, response.getStatusCodeValue());
} catch (HttpStatusCodeException hsce) {
Assert.assertEquals("An unexpected path must return a 400 error", 400, hsce.getRawStatusCode());
}
}
@Test @Ignore
public void testServiceQuick() {
this._testService("quick.src", "trgt");
}
protected ResponseEntity<String> _testService(String filename, String targetExtension) {
LinkedMultiValueMap<String, Object> parameters = new LinkedMultiValueMap<>();
if (filename != null)
parameters.add("file", new ClassPathResource(filename));
if (targetExtension != null)
parameters.add("targetExtension", targetExtension);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
HttpEntity<LinkedMultiValueMap<String, Object>> entity = new HttpEntity<>(parameters, headers);
return this.restTemplate.postForEntity(this.baseUrl + "/transform", entity, String.class);
}
}
@@ -1,22 +0,0 @@
package ${groupId};
import org.alfresco.transformer.AbstractTransformerController;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@WebMvcTest(controllers = TransformerController.class)
public class TransformerControllerTest {
@Autowired
protected AbstractTransformerController controller;
@Test @Ignore
public void test() {
}
}
@@ -1,14 +0,0 @@
queue:
#set( $dollar = '$' )
engineRequestQueue: ${dollar}{TRANSFORM_ENGINE_REQUEST_QUEUE:${groupId}.${shortname}.acs}
transform:
core:
config:
location: classpath:this_engine_config.json
${shortname}:
version: ${project.version}
logging:
level:
${groupId}: ${dollar}{LOG_LEVEL:trace}
-1
View File
@@ -125,7 +125,6 @@
<module>beedk-acs-share-module-archetype</module> <module>beedk-acs-share-module-archetype</module>
<module>beedk-ate-archetype</module> <module>beedk-ate-archetype</module>
<module>beedk-acs-allinone-archetype</module> <module>beedk-acs-allinone-archetype</module>
<module>beedk-springboot-api-archetype</module>
<module>beedk-activiti-ext-archetype</module> <module>beedk-activiti-ext-archetype</module>
<module>beedk-aps-ext-archetype</module> <module>beedk-aps-ext-archetype</module>
</modules> </modules>