Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated to jakarta namespace #9

Merged
merged 1 commit into from
Oct 6, 2023
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Makes Maven Archetype creation a breeze
[![LGPLv3 License](http://img.shields.io/badge/license-LGPLv3-blue.svg)](https://www.gnu.org/licenses/lgpl.html)
[![Java Development Kit 11](https://img.shields.io/badge/JDK-11-green.svg)](https://openjdk.java.net/projects/jdk/11/)

## Versions
- 0.5.x (or later) = **Java 11** with new **jakarta** namespace
- 0.4.x = **Java 11** before namespace change from 'javax' to 'jakarta'

## Why?
You may argue "Creating a Maven Archetype from a project is already possible using the [create-from-project](https://maven.apache.org/archetype/maven-archetype-plugin/create-from-project-mojo.html) Mojo". You are right. Unfortunately it's pretty limited and does not allow much individual customization. That's where the **marchetyper** kicks in. It has a specialized configuration file and allows **repeating the creation process** every time your existing example project has changed. As your example project will change over time, having an *automated build* that automatically updates your Archetype is the major benefit of **marchetyper**.

Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/fuin/marchetyper/core/Archetype.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import java.util.Collections;
import java.util.List;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;

/**
* Archetype definition.
Expand Down
18 changes: 9 additions & 9 deletions core/src/main/java/org/fuin/marchetyper/core/ConfigImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@
import java.util.Collections;
import java.util.List;

import javax.validation.constraints.NotNull;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.FileExists;
import org.fuin.objects4j.common.FileExistsValidator;
Expand All @@ -42,6 +33,15 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jakarta.validation.constraints.NotNull;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper;
import jakarta.xml.bind.annotation.XmlRootElement;

/**
* Application configuration.
*/
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/fuin/marchetyper/core/FileFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import java.io.File;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import org.fuin.objects4j.common.Nullable;

import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;

/**
* Defines a path and/or file filter with expressions.
*/
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/org/fuin/marchetyper/core/Mapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

import java.io.File;

import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.NotEmpty;
import org.fuin.objects4j.common.Nullable;

import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;

/**
* Maps a search term to a replace expression.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import java.util.Arrays;
import java.util.Properties;

import javax.validation.constraints.NotNull;

import org.apache.maven.shared.invoker.CommandLineConfigurationException;
import org.apache.maven.shared.invoker.DefaultInvocationRequest;
import org.apache.maven.shared.invoker.DefaultInvoker;
Expand All @@ -37,6 +35,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jakarta.validation.constraints.NotNull;

/**
* Executes a Maven build.
*/
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/org/fuin/marchetyper/core/Property.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
*/
package org.fuin.marchetyper.core;

import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.NotEmpty;
import org.fuin.objects4j.common.Nullable;

import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;

/**
* Maven archetype property.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
import java.util.Arrays;
import java.util.List;

import javax.validation.constraints.NotNull;

import org.apache.commons.lang3.StringUtils;
import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.utils4j.Utils4J;

import jakarta.validation.constraints.NotNull;

/**
* Replaces a source path segment (structure of directories) with a target path segment. Example: Given a directory structure
* 'a/b/c/d/e/f/g'. Source segment 'b/c/d' can be replaced with target segment 'x' . The target structure will be 'a/x/e/f/g'. Files within
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/java/org/fuin/marchetyper/core/Variable.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
*/
package org.fuin.marchetyper.core;

import javax.validation.constraints.NotNull;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.NotEmpty;

import jakarta.validation.constraints.NotNull;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlTransient;

/**
* Variable that holds a transformation of a source property.
*/
Expand Down
14 changes: 7 additions & 7 deletions core/src/test/resources/ReplacingFileReaderTest-expected.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

import java.lang.management.ManagementFactory;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.inject.Inject;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import jakarta.ejb.Singleton;
import jakarta.ejb.Startup;
import jakarta.inject.Inject;
import jakarta.management.MBeanServer;
import jakarta.management.ObjectName;

import com.udojava.jmx.wrapper.JMXBeanWrapper;

Expand Down
14 changes: 7 additions & 7 deletions core/src/test/resources/ReplacingFileReaderTest-original.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

import java.lang.management.ManagementFactory;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.inject.Inject;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import jakarta.ejb.Singleton;
import jakarta.ejb.Startup;
import jakarta.inject.Inject;
import jakarta.management.MBeanServer;
import jakarta.management.ObjectName;

import com.udojava.jmx.wrapper.JMXBeanWrapper;

Expand Down
32 changes: 16 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.fuin</groupId>
<artifactId>pom</artifactId>
<version>1.7.0</version>
<version>1.7.1</version>
</parent>

<groupId>org.fuin.marchetyper</groupId>
Expand Down Expand Up @@ -48,7 +48,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<version>5.10.0</version>
</dependency>

<dependency>
Expand All @@ -60,7 +60,7 @@
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.14</version>
<version>3.15.2</version>
</dependency>

<dependency>
Expand All @@ -72,19 +72,19 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.14.0</version>
</dependency>

<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.3</version>
<version>4.0.3</version>
</dependency>

<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.2.5.Final</version>
<version>8.0.1.Final</version>
</dependency>

<dependency>
Expand All @@ -96,25 +96,25 @@
<dependency>
<groupId>org.fuin</groupId>
<artifactId>ext4logback</artifactId>
<version>0.2.0</version>
<version>0.4.0</version>
</dependency>

<dependency>
<groupId>org.fuin</groupId>
<artifactId>utils4j</artifactId>
<version>0.11.1</version>
<version>0.12.0</version>
</dependency>

<dependency>
<groupId>org.fuin</groupId>
<artifactId>objects4j</artifactId>
<version>0.7.1</version>
<version>0.8.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.13.0</version>
</dependency>

<dependency>
Expand All @@ -126,19 +126,19 @@
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
<version>3.0.2</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.6</version>
<version>2.0.7</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.6</version>
<version>1.4.11</version>
</dependency>

<dependency>
Expand All @@ -150,7 +150,7 @@
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
<version>3.1.9.Final</version>
<version>5.1.2.Final</version>
</dependency>

<dependency>
Expand All @@ -162,13 +162,13 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.9.0</version>
<version>3.9.5</version>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.4</version>
<version>3.9.0</version>
</dependency>

<dependency>
Expand Down