[FIX] ready to deploy on maven central

This commit is contained in:
Edouard DUPIN 2025-04-03 10:29:56 +02:00
parent 8dde49adff
commit 9ebd37788d
10 changed files with 47 additions and 63 deletions

40
pom.xml
View File

@ -4,6 +4,8 @@
<groupId>org.atria-soft</groupId>
<artifactId>archidata</artifactId>
<version>0.26.3-SNAPSHOT</version>
<description>Wrapper to manage a simple interface for REST project to bind MySQL, SQLite or mongoDB.</description>
<url>https://github.com/kangaroo-and-rabbit/archidata</url>
<licenses>
<license>
<name>Mozilla Public License 2.0</name>
@ -26,12 +28,6 @@
<connection>scm:git:git://github.com/kangaroo-and-rabbit/archidata.git</connection>
<developerConnection>scm:git:ssh:github.com/kangaroo-and-rabbit/archidata.git</developerConnection>
</scm>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
@ -253,7 +249,7 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
@ -296,10 +292,14 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Check the style of the code -->
<plugin>
@ -364,25 +364,23 @@
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- Generate Java-docs As Part Of Project Reports -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<show>public</show>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
</plugins>
</reporting>
</build>
</project>

View File

@ -20,7 +20,7 @@ import java.lang.annotation.Target;
* - When a field is annotated with @DataNotRead, it will not be included in the
* default data retrieval process from the database.
* - To override this behavior and read all columns, including those marked with
* @DataNotRead, the query must include the option ReadAllColumn.
* `@DataNotRead`, the query must include the option ReadAllColumn.
*
* <p>Example:
* <pre>{@code

View File

@ -22,7 +22,8 @@ import java.lang.annotation.Target;
* more flexible API designs where certain inputs can be omitted.
*
* <p>Example:
* <pre>{@code
*
* {@code
* public class AlbumService {
*
* @POST
@ -39,7 +40,8 @@ import java.lang.annotation.Target;
* // some code
* }
* }
* }</pre>
* }
*
*
* Note: @FormDataParam must be allway at the last position.
*
@ -47,7 +49,8 @@ import java.lang.annotation.Target;
* marked as optional, allowing the client to omit them when calling the API.
*
* <p>Generated TypeScript code example:
* <pre>{@code
*
* {@code
* //Add a cover on a specific album
* export function uploadCover({
* restConfig,
@ -64,10 +67,11 @@ import java.lang.annotation.Target;
* uri?: string, // element is optional
* },
* callbacks?: RESTCallbacks,
* }): Promise<Album> { ...
* }</pre>
* }): Promise<Album> { ... }
* }
*
* The generated TypeScript function reflects the optional nature of the form data parameters.
*
* The generated TypeScript function reflects the optional nature of the form data parameters
*/
@Target({ ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)

View File

@ -25,7 +25,7 @@ import java.lang.annotation.Target;
* the older XMLHttpRequest interface is utilized.
*
* <p>Example:
* <pre>{@code
* {@code
* public class SeasonService {
*
* @POST
@ -41,13 +41,13 @@ import java.lang.annotation.Target;
* // Upload logic
* }
* }
* }</pre>
* }
*
* In this example, the uploadCover method will generate a client-side API
* with progress tracking capabilities using XMLHttpRequest.
*
* <p>Generated TypeScript code example:
* <pre>{@code
* {@code
* export function uploadCover({
* restConfig,
* params,
@ -62,8 +62,9 @@ import java.lang.annotation.Target;
* file: File,
* },
* callbacks?: RESTCallbacks,
* }): Promise<Season> {...
* }</pre>
* }): Promise<Season> {...}
* }
*
*
*/
@Target({ ElementType.PARAMETER, ElementType.METHOD })

View File

@ -185,7 +185,8 @@ public abstract class DBAccess implements Closeable {
/** @param <T>
* @param data
* @param id
* @param filterValue
* @param updateColomn
* @param option
* @return the affected rows.
* @throws Exception */
public <T, ID_TYPE> long update(
@ -300,8 +301,7 @@ public abstract class DBAccess implements Closeable {
/** Delete items with the specific condition and some options. If the Entity is manage as a softDeleted model, then it is flag as removed (if not already done before).
* @param clazz Data model that might remove element.
* @param condition Condition to remove elements.
* @param options (Optional) Options of the request.
* @param option (Optional) Options of the request.
* @return Number of element that is removed. */
public long deleteWhere(final Class<?> clazz, final QueryOption... option) throws Exception {
final String hasDeletedFieldName = AnnotationTools.getDeletedFieldName(clazz);

View File

@ -111,12 +111,6 @@ public class DataAccess {
}
}
/** @param <T>
* @param data
* @param id
* @param filterValue
* @return the affected rows.
* @throws Exception */
public static <T, ID_TYPE> long update(
final T data,
final ID_TYPE id,
@ -225,7 +219,6 @@ public class DataAccess {
/** Delete items with the specific condition and some options. If the Entity is manage as a softDeleted model, then it is flag as removed (if not already done before).
* @param clazz Data model that might remove element.
* @param condition Condition to remove elements.
* @param options (Optional) Options of the request.
* @return Number of element that is removed. */
public static long deleteWhere(final Class<?> clazz, final QueryOption... options) throws Exception {

View File

@ -26,12 +26,6 @@ public interface DataAccessAddOn {
* @return True of the field is manage by the current Add-on. */
boolean isCompatibleField(Field elem);
/** Insert data in the specific field (the field must be in the current db, otherwiise it does not work at all.
* @param ps DB statement interface.
* @param data The date to inject.
* @param iii The index of injection
* @return the new index of injection in case of multiple value management
* @throws SQLException */
void insertData(
final DBAccessMorphia ioDb,
final Field field,
@ -65,14 +59,7 @@ public interface DataAccessAddOn {
throws Exception, SQLException, IllegalArgumentException, IllegalAccessException;
/** Create associated table of the specific element.
* @param tableName
* @param elem
* @param mainTableBuilder
* @param ListOtherTables
* @param createIfNotExist
* @param createDrop
* @param fieldId
* @throws Exception */
*/
void createTables(
String tableName,
final Field primaryField,

View File

@ -31,10 +31,9 @@ public interface DataAccessAddOn {
boolean isCompatibleField(Field elem);
/** Insert data in the specific field (the field must be in the current db, otherwiise it does not work at all.
* @param ps DB statement interface.
* @param ioDb DB statement interface.
* @param data The date to inject.
* @param iii The index of injection
* @return the new index of injection in case of multiple value management
* @throws SQLException */
void insertData(final DBAccessSQL ioDb, PreparedStatement ps, final Field field, Object data, CountInOut iii)
throws Exception, SQLException, IllegalArgumentException, IllegalAccessException;
@ -76,9 +75,11 @@ public interface DataAccessAddOn {
/** Create associated table of the specific element.
* @param tableName
* @param elem
* @param primaryField
* @param field
* @param mainTableBuilder
* @param ListOtherTables
* @param preActionList
* @param postActionList
* @param createIfNotExist
* @param createDrop
* @param fieldId

View File

@ -172,7 +172,7 @@ public class MigrationEngine {
/** Process the automatic migration of the system
* @param config SQL connection for the migration
* @throws IOException Error if access on the DB */
* @throws MigrationException Error if access on the DB */
@SuppressFBWarnings({ "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING",
"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" })
public void migrateErrorThrow(final DbConfig config) throws MigrationException {

View File

@ -13,7 +13,7 @@ public interface MigrationInterface {
* @param log Stored data in the BDD for the migration progression.
* @param migration Migration post data on each step...
* @return true if migration is finished. */
boolean applyMigration(DBAccess entry, StringBuilder log, Migration model) throws Exception;
boolean applyMigration(DBAccess entry, StringBuilder log, Migration migration) throws Exception;
/** Remove a migration the system to the previous version.
* @param entry DB interface for the migration.