Skip to content

Commit

Permalink
#240 - Initial springboot archetype
Browse files Browse the repository at this point in the history
  • Loading branch information
tavoda committed Mar 6, 2021
1 parent b48c5ab commit bbc62da
Show file tree
Hide file tree
Showing 11 changed files with 662 additions and 0 deletions.
67 changes: 67 additions & 0 deletions sculptor-maven/sculptor-maven-archetype-springboot/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sculptorgenerator</groupId>
<artifactId>sculptor-maven</artifactId>
<version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>sculptor-maven-archetype-springboot</artifactId>
<packaging>maven-archetype</packaging>
<name>Sculptor :: Maven :: Archetype for springboot application</name>
<description>Maven archetype for a SpringBoot project using the Sculptor code generator</description>

<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
</extensions>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/pom.xml</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
</includes>
</testResource>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/pom.xml</exclude>
</excludes>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<escapeString>\</escapeString>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
name="Sculptor Parent Project"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<fileSets>
<fileSet filtered="true">
<directory></directory>
<includes>
<include>**/*.btdesign</include>
<include>**/*.properties</include>
</includes>
</fileSet>
</fileSets>

</archetype-descriptor>
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
#set( $artifactIdBaseLength = $artifactId.length() - 4 )
#set( $artifactIdBase = $artifactId.substring(0, $artifactIdBaseLength) )
<?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 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>New Sculptor Project :: SpringBoot</name>

<properties>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<java-version>1.8</java-version>
<maven-version>3.0</maven-version>
<maven.compiler.source>${java-version}</maven.compiler.source>
<maven.compiler.target>${java-version}</maven.compiler.target>

<sculptor-version>${project.version}</sculptor-version>
<spring-boot-version>2.4.3</spring-boot-version>
<tomcat-jasper-el>${tomcat-jasper-el}</tomcat-jasper-el>
<joda-time-version>${joda-time-version}</joda-time-version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.sculptorgenerator</groupId>
<artifactId>sculptor-maven-plugin</artifactId>
<version>\${sculptor-version}</version>
<configuration>
<verbose>false</verbose>
</configuration>
<executions>
<execution>
<id>cleanup</id>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<id>code-generation</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>\${spring-boot-version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<argLine>-Xms32m -Xmx200m</argLine>
<!-- Adjusting TZ '-Duser.timezone=UTC' -->
<!-- Using dynamic class enhancement '-javaagent:/home/tavoda/.m2/repository/org/eclipse/persistence/eclipselink/2.7.1/eclipselink-2.7.1.jar' -->
</configuration>
</plugin>
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>\${spring-boot-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
<dependency>
<groupId>org.sculptorgenerator</groupId>
<artifactId>sculptor-framework-main</artifactId>
<classifier>without-ejb</classifier>
<version>\${sculptor-version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jcache</artifactId>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
<dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.core</artifactId>
<version>6.0.1.GA</version>
<exclusions>
<exclusion>
<groupId>org.joda</groupId>
<artifactId>joda-money</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>\${joda-time-version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sculptorgenerator</groupId>
<artifactId>sculptor-framework-test</artifactId>
<version>\${sculptor-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper-el</artifactId>
<version>\${tomcat-jasper-el}</version>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<!-- Add scope test when running with a persistent database (mysql etc) -->
<!-- Add scope test when deployed in jboss -->
<!-- <scope>test</scope> -->
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<!-- Add scope test when running with a persistent database (mysql etc) -->
<!-- Add scope test when deployed in jboss -->
<!-- <scope>test</scope> -->
</dependency>
</dependencies>

</project>

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#set( $symbol_pound = '#' )
${symbol_pound}
${symbol_pound} Customized properties for the Sculptor generator.
${symbol_pound}
${symbol_pound} In this file you can define customized properties
${symbol_pound} for the generator. By default the properties in
${symbol_pound} default-sculptor-generator.properties are used,
${symbol_pound} but you can override the properties by defining
${symbol_pound} them in this file. Only the properties you need
${symbol_pound} to change need to be defined here.
${symbol_pound}
${symbol_pound} Look in default-sculptor-generator.properties
${symbol_pound} in sculptor-generator-core to see
${symbol_pound} what properties are available.
${symbol_pound}

project.nature=business-tier
cartridges=builder

generate.spring.dataSourceSupport=true
generate.resource=true
generate.restWeb=true
generate.restWeb.config.springboot=true

generate.modeldoc=false
generate.umlgraph=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Application MySpringBootApp {
basePackage=${groupId}

Module examplemodule {
Resource FrontResource {
String front return="front/overview";
}

Entity Person {
scaffold

String firstName;
String secondName;
Date birthDate;
-@Sex sex;
String emailAddress email;
-List<Address> addresses inverse <-> person;
}

Entity Address {
-@Person person <-> addresses;
String street;
String city;
String zip length="8";
}

enum Sex {
MAN, WOMAN
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Thu Jul 04 00:05:29 CEST 2013
groupId=archetype.it
artifactId=basic-web
package=it.pkg
version=0.1-SNAPSHOT

0 comments on commit bbc62da

Please sign in to comment.