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

Bump org.apache.maven.plugins:maven-release-plugin from 2.5.3 to 3.1.1 #68

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f83db70
Bump org.mariadb.jdbc:mariadb-java-client from 3.3.3 to 3.4.0
dependabot[bot] May 20, 2024
fedb7be
Bump org.apache.camel.springboot:camel-spring-boot-dependencies
dependabot[bot] May 20, 2024
4e35da3
Bump liquibase.version from 4.27.0 to 4.28.0
dependabot[bot] May 27, 2024
d6f8829
supports embeddedid
Tcharl Jun 14, 2024
df88ea8
supports embeddedid
Tcharl Jun 14, 2024
1d3aed8
Merge pull request #55 from OsgiliathEnterprise/embeddedid
Tcharl Jun 14, 2024
dfcc0bf
supports embeddedid
Tcharl Jun 14, 2024
0548fcc
Merge pull request #56 from OsgiliathEnterprise/embeddedid
Tcharl Jun 14, 2024
41854bc
[maven-release-plugin] prepare release 1.59
actions-user Jun 14, 2024
12832b7
[maven-release-plugin] prepare for next development iteration
actions-user Jun 14, 2024
43e7de2
more use of bean introspector
Tcharl Jun 15, 2024
feac975
bump version
Tcharl Jun 15, 2024
a8a2a2b
Merge pull request #53 from OsgiliathEnterprise/dependabot/maven/liqu…
Tcharl Jun 15, 2024
983e0ed
Merge pull request #51 from OsgiliathEnterprise/dependabot/maven/org.…
Tcharl Jun 15, 2024
966e2f3
Merge pull request #50 from OsgiliathEnterprise/dependabot/maven/org.…
Tcharl Jun 15, 2024
878c633
Merge pull request #57 from OsgiliathEnterprise/embeddedid
Tcharl Jun 15, 2024
c199eb1
[maven-release-plugin] prepare release 1.60
actions-user Jun 15, 2024
23ef7cd
[maven-release-plugin] prepare for next development iteration
actions-user Jun 15, 2024
57252ec
simplification of the api
Tcharl Jun 15, 2024
883c708
bump version
Tcharl Jun 15, 2024
20de8a2
use Jpaprocessor getRawId for getId
Tcharl Jun 15, 2024
ee82612
Merge pull request #58 from OsgiliathEnterprise/embeddedid
Tcharl Jun 15, 2024
1de45fd
[maven-release-plugin] prepare release 1.61
actions-user Jun 15, 2024
48e03f7
[maven-release-plugin] prepare for next development iteration
actions-user Jun 15, 2024
c2747f6
avoid transactional glitch
Tcharl Jun 15, 2024
35676a5
[maven-release-plugin] prepare release 1.61
actions-user Jun 15, 2024
3691084
[maven-release-plugin] prepare for next development iteration
actions-user Jun 15, 2024
ca801ec
bump version
Tcharl Jun 15, 2024
faedcde
Merge pull request #59 from OsgiliathEnterprise/embeddedid
Tcharl Jun 15, 2024
b929d39
[maven-release-plugin] prepare release 1.62
actions-user Jun 15, 2024
ed25e8e
[maven-release-plugin] prepare for next development iteration
actions-user Jun 15, 2024
017a428
add some more build.xml entity rewriting
Tcharl Jun 23, 2024
0d58e5b
Merge pull request #65 from OsgiliathEnterprise/embeddedid
Tcharl Jun 23, 2024
8a2599c
bump version
Tcharl Jun 23, 2024
62ae5ce
Merge pull request #66 from OsgiliathEnterprise/embeddedid
Tcharl Jun 24, 2024
3f9967c
[maven-release-plugin] prepare release 1.63
actions-user Jun 24, 2024
d6fad35
[maven-release-plugin] prepare for next development iteration
actions-user Jun 24, 2024
e829244
start of a remote engine
Tcharl Jun 24, 2024
4372ea9
bump version
Tcharl Jun 24, 2024
930657f
Merge pull request #67 from OsgiliathEnterprise/embeddedid
Tcharl Jun 24, 2024
58d6aae
[maven-release-plugin] prepare release 1.64
actions-user Jun 24, 2024
f7d406b
[maven-release-plugin] prepare for next development iteration
actions-user Jun 24, 2024
3079957
Bump org.apache.maven.plugins:maven-release-plugin from 2.5.3 to 3.1.1
dependabot[bot] Jul 15, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ target
src/main/java
docs
site
tmp/
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<parent>
<groupId>net.osgiliath.datamigrator</groupId>
<artifactId>data-migrator</artifactId>
<version>1.59-SNAPSHOT</version>
<version>1.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>data-migrator-bom</artifactId>
<packaging>pom</packaging>

<properties>
<camel.version>4.5.0</camel.version>
<camel.version>4.6.0</camel.version>
<log4j.version>2.22.0</log4j.version>
<testcontainers.version>1.19.8</testcontainers.version>
<jgrapht.version>1.5.2</jgrapht.version>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>net.osgiliath.datamigrator</groupId>
<artifactId>data-migrator</artifactId>
<version>1.59-SNAPSHOT</version>
<version>1.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>data-migrator-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
* #L%
*/

import java.io.Serializable;

/**
* A vertex in the metamodel graph.
*/
public interface MetamodelVertex {
public interface MetamodelVertex extends Serializable {


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
* #L%
*/

import net.osgiliath.migrator.core.api.metamodel.model.MetamodelVertex;

/**
* A vertex in the model graph.
*
* @param vertex the metamodel element.
* @param rawElement the underlying element.
*/
public record ModelElement(Object rawElement) {
public record ModelElement(MetamodelVertex vertex, Object rawElement) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public String columnName() {

@Override
public ModelElement evaluate(ModelElement toBeTransformed) {
Object rawValue = modelElementProcessor.getFieldRawValue(metamodel, columnName, toBeTransformed);
Object rawValue = modelElementProcessor.getFieldRawValue(toBeTransformed, columnName);
log.info("transforming Vertex of class {} with column {} and value {}", metamodel.getTypeName(), columnName, rawValue);
Object transformedValue = evaluateField((F) rawValue);
modelElementProcessor.setFieldRawValue(metamodel, columnName, toBeTransformed, transformedValue);
modelElementProcessor.setFieldRawValue(toBeTransformed, columnName, transformedValue);
return toBeTransformed;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package net.osgiliath.migrator.core.configuration;

/*-
* #%L
* data-migrator-core
* %%
* Copyright (C) 2024 Osgiliath Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/

import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableCaching
public class CacheConfiguration {


@Bean
public CacheManager cacheManager() {

return new ConcurrentMapCacheManager("metamodelEntitiesClass");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import net.osgiliath.migrator.core.api.metamodel.MetamodelScanner;
import net.osgiliath.migrator.core.configuration.beans.CustomHikariDatasource;
import net.osgiliath.migrator.core.graph.InGraphVertexResolver;
import net.osgiliath.migrator.core.graph.ModelElementFactory;
import net.osgiliath.migrator.core.graph.OffGraphVertexResolver;
import net.osgiliath.migrator.core.graph.VertexResolver;
import net.osgiliath.migrator.core.metamodel.impl.internal.jpa.JpaMetamodelVertexFactory;
import net.osgiliath.migrator.core.rawelement.RawElementProcessor;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -86,6 +94,18 @@ public HikariConfig sinkHikariConfigProperties() {
return new HikariConfig();
}

@Bean
@ConditionalOnProperty(prefix = "data-migrator.graph-datasource", name = "type", havingValue = "embedded")
public VertexResolver vertexResolverInGraph() {
return new InGraphVertexResolver();
}

@Bean
@ConditionalOnProperty(prefix = "data-migrator.graph-datasource", name = "type", havingValue = "remote")
public VertexResolver vertexResolverOffGraph(JpaMetamodelVertexFactory jpaMetamodelVertexFactory, MetamodelScanner metamodelScanner, ModelElementFactory modelElementFactory, RawElementProcessor rawElementProcessor) {
return new OffGraphVertexResolver(jpaMetamodelVertexFactory, metamodelScanner, modelElementFactory, rawElementProcessor);
}


@Bean(SOURCE_DATASOURCE)
public DataSource sourceDataSource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -22,12 +22,17 @@

import net.osgiliath.migrator.core.configuration.DataMigratorConfiguration;
import net.osgiliath.migrator.core.configuration.model.GraphDatasourceType;
import org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
import org.apache.tinkerpop.gremlin.structure.io.binary.TypeSerializerRegistry;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV3;
import org.springframework.stereotype.Component;

import static org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource.traversal;

/**
* Tinkerpop Graph traversal source provider.
*/
Expand All @@ -41,22 +46,42 @@ public class GraphTraversalSourceProvider {

/**
* Constructor.
*
* @param dataMigratorConfiguration the data migrator configuration.
*/
public GraphTraversalSourceProvider(DataMigratorConfiguration dataMigratorConfiguration) {
this.dataMigratorConfiguration = dataMigratorConfiguration;
}

/**
* Gets the graph traversal source (graph instance) in regards to configuration.
*
* @return the graph traversal source.
*/
public GraphTraversalSource getGraph() {
if (dataMigratorConfiguration.getGraphDatasource().getType() == GraphDatasourceType.EMBEDDED) {
if (dataMigratorConfiguration.getGraphDatasource().getType() == GraphDatasourceType.EMBEDDED) {
Graph graph = TinkerGraph.open();
return traversal().withEmbedded(graph);
} else if (dataMigratorConfiguration.getGraphDatasource().getType() == GraphDatasourceType.REMOTE) {
IoRegistry registry = TinkerIoRegistryV3.instance();
TypeSerializerRegistry typeSerializerRegistry = TypeSerializerRegistry.build().addRegistry(registry)
.create();

/* GraphSONMapper.Builder builder = GraphSONMapper.build().
typeInfo(TypeInfo.PARTIAL_TYPES)
// .addCustomModule(new JpaMetamodelSerializationModule())
.addCustomModule(GraphSONXModuleV3.build())
.version(GraphSONVersion.V3_0);
MessageSerializer serializer = new GraphSONMessageSerializerV3(builder); //typeSerializerRegistry);*/
/* Cluster cluster = Cluster.build(dataMigratorConfiguration.getGraphDatasource().getHost()).port(dataMigratorConfiguration.getGraphDatasource().getPort()).
serializer(new GraphBinaryMessageSerializerV1(typeSerializerRegistry)).
create();

Client client = cluster.connect();*/
return traversal().withRemote(DriverRemoteConnection.using(dataMigratorConfiguration.getGraphDatasource().getHost(), dataMigratorConfiguration.getGraphDatasource().getPort()));
} else {
throw new UnsupportedOperationException("Only embedded graph is supported for now");
}
else {
throw new UnsupportedOperationException("Only embedded graph is supported for now");
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package net.osgiliath.migrator.core.configuration.beans;

/*-
* #%L
* data-migrator-core
* %%
* Copyright (C) 2024 Osgiliath Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/

import net.osgiliath.migrator.core.api.metamodel.model.MetamodelVertex;
import net.osgiliath.migrator.core.metamodel.impl.internal.jpa.model.JpaMetamodelVertex;
import org.apache.tinkerpop.shaded.jackson.core.JacksonException;
import org.apache.tinkerpop.shaded.jackson.core.JsonParser;
import org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext;
import org.apache.tinkerpop.shaded.jackson.databind.JsonDeserializer;

import java.io.IOException;

public class MetamodelGraphDeserializer extends JsonDeserializer<MetamodelVertex> {
@Override
public MetamodelVertex deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JacksonException {
return deserializationContext.readValue(jsonParser, JpaMetamodelVertex.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -30,8 +30,13 @@ public class GraphDatasource {
*/
private GraphDatasourceType type;

private int port = 8182;

private String host = "127.0.0.1";

/**
* Constructor.
*
* @param graphDatasourceType the datasource type (embedded or remote).
*/
public GraphDatasource(GraphDatasourceType graphDatasourceType) {
Expand All @@ -40,6 +45,7 @@ public GraphDatasource(GraphDatasourceType graphDatasourceType) {

/**
* Gets the datasource type (embedded or remote).
*
* @return the datasource type (embedded or remote).
*/
public GraphDatasourceType getType() {
Expand All @@ -48,9 +54,26 @@ public GraphDatasourceType getType() {

/**
* Sets the datasource type (embedded or remote).
*
* @param type the datasource type (embedded or remote).
*/
public void setType(GraphDatasourceType type) {
this.type = type;
}

public int getPort() {
return port;
}

public void setPort(int port) {
this.port = port;
}

public String getHost() {
return host;
}

public void setHost(String host) {
this.host = host;
}
}
Loading
Loading