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

1494 wip template set plugin loader #1692

Draft
wants to merge 240 commits into
base: master
Choose a base branch
from

Conversation

jan-vcapgemini
Copy link
Collaborator

Adresses/Fixes #.

Implements

@devonfw/cobigen

jan-vcapgemini and others added 30 commits March 10, 2022 12:31
…nfw#1498)

* devonfw#1452 changed dynamic groupId in master-pom.xml to fixed
separated all templates sets into deployables
moved util tests into templates-devon4j-utils plug-in
renamed devon4j-templates to devon4j-templates-tests

* Update  crud-java-server-app-complex/pom.xml

delete relative Path

* devonfw#1452 reformatted pom.xml codes

Co-authored-by: LarsReinken <lars.reinken93@googlemail.com>
…evonfw#1499)

* devonfw#1452 changed dynamic groupId in master-pom.xml to fixed
separated all templates sets into deployables
moved util tests into templates-devon4j-utils plug-in
renamed devon4j-templates to devon4j-templates-tests

* Update  crud-java-server-app-complex/pom.xml

delete relative Path

* devonfw#1452 reformatted pom.xml codes

* devonfw#1452 added test resources for new TemplateSetTest

* devonfw#1452 split ContextConfigurationReader into AbstractConfigurationReader and ContextConfigurationSetReader
added new ContextConfigurationAnalyzer
implemented rough template type detection

* devonfw#1452 adapted core extract templates process and find templates methods to new template sets configuration
ensured backwards compatibility in ConfigurationFinder and ExtractTemplatesUtil
fixed some typos in ConfigurationFinder
refactored CobiGenPaths class
added getTemplateSetsFolderPath and createFolder methods to CobiGenPaths
added new constants for downloaded, adapted and template-sets to ConfigurationConstants
added processJars method to ExtractTemplatesUtil
set processJar and getJarFile methods deprecated
adjusted info messages in ExtractTemplatesUtil
added first TemplateProcessingTest class + resources
adjusted CobiGenFactory extractTemplate method

* devonfw#1452 fixed resolve of doubled CobiGen_Templates directory

* devonfw#1452 fixed ConfigurationUtilTest

* devonfw#1452 implemented requested changes
combined 3rd and 4th check into one in ConfigurationFinder
fixed old templates folder detection in ExtractTemplatesUtil
adjusted javadoc of processJars method in ExtractTemplatesUtil
adjusted return of getTemplateSetsFolderPath

* devonfw#1452 renamed variable name as requested

Co-authored-by: LarsReinken <lars.reinken93@googlemail.com>
…evonfw#1504)

* Adjust documentation (devonfw#1491)

* fixed some types and links and corrected some parts of the documentation

* adjust angular client guide

* fixed typo

* fixed requested changes

* implemented new template set configuration reader

* added new tests to check if the ContextConfigurationSetReader is able to find all context configurations properly

* added new tests to check if the ContextConfigurationSetReader is able to find all context configurations properly

* adapted cli and template tests for correct use of template sets

* implemented requested changes

* implemented requested changes

* Loading of util classes from devon4j-template

* implemented loading of util classes from template-sets. Fixed template and cli tests

* added Javadoc

* fix compilation error in tempalte test

* fixed that the templates folder always was created

* fix TemplateProcessingTest

* implemented requested changes

* implemented requested changes

* adapted getJarFile to use Path instead of File

* ignore Eclipse AdapteTemplatesTest

* changed downloadJar

* changed getJarFile from file to path in eclipse project
* Adjust documentation (devonfw#1491)

* fixed some types and links and corrected some parts of the documentation

* adjust angular client guide

* fixed typo

* fixed requested changes

* implemented new template set configuration reader

* added new tests to check if the ContextConfigurationSetReader is able to find all context configurations properly

* added new tests to check if the ContextConfigurationSetReader is able to find all context configurations properly

* adapted cli and template tests for correct use of template sets

* implemented requested changes

* implemented requested changes

* Loading of util classes from devon4j-template

* implemented loading of util classes from template-sets. Fixed template and cli tests

* added Javadoc

* fix compilation error in tempalte test

* fixed that the templates folder always was created

* fix TemplateProcessingTest

* seperation of util classes

* implemented requested changes

* implemented requested changes

* changed template test

* changed abstractclitest

* adapted getJarFile to use Path instead of File

* ignore Eclipse AdapteTemplatesTest

* changed downloadJar

* changed getJarFile from file to path in eclipse project

* updated jackson-databind version
* update mockito and Hamcrest

* adapt TemplatedProcessingTest to work as expected

* devonfw#1452 fixed eclipse build.properties and .classpath

* devonfw#1452 implemented requested changes
changed cobigenHome from File to Path

* devonfw#1452 implemented requested changes

* devonfw#1452 removed unnecessary lambda because of more effective mockito

* Revert "devonfw#1452 removed unnecessary lambda because of more effective mockito"

This reverts commit e85dde5.

* test without mockito partial mock

* devonfw#1452 re-introduced mockito changes with latest changes from template-set-deployables
renamed findTemplateSetJarsWithBackwardsCompatibilityTest to findTemplateSetsDownloadedFolderTest
fixed logic of findTemplateSetsDownloadedFolderTest

Co-authored-by: LarsReinken <lars.reinken@capgemini.com>
…vonfw#1500)

* devonfw#1403 changed pciture and added text to make it very clear what plugins should be installed

* Adjust documentation (devonfw#1491)

* fixed some types and links and corrected some parts of the documentation

* adjust angular client guide

* fixed typo

* fixed requested changes

* devonfw#1463 added options for tags, detailed descriptions and links to xsd

* devonfw#1463 added new version to constants and generation to pom

* devonfw#1463 updated version, rearranged newly added xsd elements, updated method getTrigger in configurationReader

* devonfw#1463 adpated xsd to not have a weird method, made config version non-backwards compatible, changed config reader to read single trigger

* devonfw#1463 schema version upgraded from 2.x to 2.3 in templates.xml and context.xml
added new explanation attribute to the first Increment in templates.xml
added links attribute to context.xml

* devonfw#1463 spell correction of some explanation attributes

* devonfw#1463 modified from v4.0 to v2.3 in pom.xml
explanation correction for crud_java_server_app templates.xml
link added to crud_java_server_app context.xml

* devonfw#1463 changed versions of configs

* devonfw#1463 changed config versions

* devonfw#1463 removed core changes for now

* added back linebreaks at file endings

* devonfw#1463 removed trigger node from xsd

* devonfw#1463 changed version attributes in xsds and added templateengine node from v4.0 to v5.0

* devonfw#1463 changed xsd to get a list of triggers for now, added new schema versions with upgrades

* devonfw#1500 fixed failing tests, adressed requested changes, removed some tests for now

* devonfw#1463 re-added accidently deleted v2.2 schema, changed versions of config files to latest versions

* devonfw#1463 re-removed 2.2 schema, added missing version to upgrader

* deleted unnecessary files

* removed unnecessary changes

* added new xsd version back to pom

* readded template version 5.0 to version enum

* fixed pom error

* fix compilation errors

* fix syntax error in context.xml

* changed contextconfiguration 3.0 schema

* added ignore to tests

* fix whitespaces in templates.xml


Co-authored-by: GuentherJulian <69513769+GuentherJulian@users.noreply.github.com>
Co-authored-by: Mansour Dukhan <mansour.dukhan@capgemini.com>
Co-authored-by: Julian Günther <julian.guenther@capgemini.com>
* Adjust documentation (devonfw#1491)

* fixed some types and links and corrected some parts of the documentation

* adjust angular client guide

* fixed typo

* fixed requested changes

* implemented independent adaption of template sets

* fix adapt template cli test

* ignore AdaptTemplatesCommandTest and further implementations for TemplateAdapter

* added tests for the template adapter

* implemented requested changes

* changed TemplateAdapter
* devonfw#1511 added new method to read properties in ConfigurationFinder.java
new TemplateSetConfiguration Class to save properties
new test cases in ConfigurationFinderTest.java

* devonfw#1511 fixed logic in method readTemplateSetConfiguration in ConfigurationFinder
added hideTemplates variable in TemplateSetConfiguration
completed 2 out of 3 tests cases

* devonfw#1511 corrected CheckTemplateSetConfiguration logic in ConfigurationFinder.java
Test cases Correction for CheckTemplateSetConfiguration in ConfigurationFinderTest.java
New Constants for the new properties created in ConfigurationConstants.java
CheckTemplateSetConfiguration Called in load function in CobiGenPropertiesReader.java

* devonfw#1511 canceled the method call in load properties in CobiGenPropertiesReader.java

* devonfw#1511 written Documentation
Modified the properties function to read properties
corrected tests

* devonfw#1511 documentation correction

* devonfw#1511 Documentation correction

* devonfw#1511 Documentation Correction

* devonfw#1511 requested changes

* devonfw#1511 requested changes devonfw#2

* devonfw#1511 requested changes 2

* devonfw#1511 requested changes

* devonfw#1511 fix defaultGroupId logic
* devonfw#1511 added new method to read properties in ConfigurationFinder.java
new TemplateSetConfiguration Class to save properties
new test cases in ConfigurationFinderTest.java

* devonfw#1511 fixed logic in method readTemplateSetConfiguration in ConfigurationFinder
added hideTemplates variable in TemplateSetConfiguration
completed 2 out of 3 tests cases

* devonfw#1511 corrected CheckTemplateSetConfiguration logic in ConfigurationFinder.java
Test cases Correction for CheckTemplateSetConfiguration in ConfigurationFinderTest.java
New Constants for the new properties created in ConfigurationConstants.java
CheckTemplateSetConfiguration Called in load function in CobiGenPropertiesReader.java

* devonfw#1511 canceled the method call in load properties in CobiGenPropertiesReader.java

* devonfw#1511 written Documentation
Modified the properties function to read properties
corrected tests

* devonfw#1511 documentation correction

* devonfw#1511 Documentation correction

* devonfw#1511 Documentation Correction

* devonfw#1511 requested changes

* devonfw#1511 requested changes devonfw#2

* devonfw#1511 requested changes 2

* devonfw#1511 requested changes

* devonfw#1511 fix defaultGroupId logic

* devonfw#1511 corrected hide annotation

* devonfw#1511 requested changes
* devonfw#1509 Ignore extractTemplatesWithOldCinfiguration
Fixed CLI adaptTemplatesTest
Fixed Eclipse testAdaptTemplates
Deleted generation from Eclipse Test

* removed exception that was used to differenciate between test and production and added an argument instead.

* devonfw#1509 Enabled extractTemplatesWithOldConfiguration

* devonfw#1509 Implemented requested changes

* devonfw#1509 Implemented requested changes

Co-authored-by: LarsReinken <lars.reinken@capgemini.com>
* devonfw#1519 added possible Log warning places for CLI

* devonfw#1519 Implemented requested changes

* devonfw#1519 Deleted unneeded warn messages

* devonfw#1519 Clear Tests

* devonfw#1519 Fixed Eclipse Plugin Issues

* Revert "devonfw#1519 Fixed Eclipse Plugin Issues"

This reverts commit 9d4ca8b.

* devonfw#1519 Fix Ignore Tag (changed Order)

* devonfw#1519 Fix Import Ignore

* devonfw#1519 throw DeprecatedMonolithicTemplatesException
in custom templates, if old templates found.
Ignore CLI custom templates Test

* remove duplicate DeprecatedMonolithicTemplatesException and allow creation with a force parameter which allows the createn of Cobigen with the old folder structure

* remove unnecessary throw

* adapt tests(ignore cli and eclipse since these tests should be adapted subsequently, force everything else)

* devonfw#1519 Force Old templates in GenerateMojo to run maven-systemtest
Fixed ConfigurationHolder Logger mismatch name

Co-authored-by: LarsReinken <lars.reinken@capgemini.com>
)

* Adjust documentation (devonfw#1491)

* fixed some types and links and corrected some parts of the documentation

* adjust angular client guide

* fixed typo

* fixed requested changes

* changed eclipse repository to https

* devonfw#1291 changed nestserver version from 1.1.7 to 1.1.9 (devonfw#1523)

added new testMergingOverridesExportConst test and resources

* 1496 fix wrong thread in ExceptionHandler (devonfw#1527)

* devonfw#1496 replaced Runnable with lambda

* devonfw#1496 passed activeShell to openInvalidConfigurationErrorDialog

* devonfw#1496 created a new thread for Exceptions handled by the ExceptionHandler (getActiveShell returned a wrong thread)

* devonfw#1496 re-enabled and fixed testConflictConfiguration test
made sure to check old context.xml case properly (context.xml in template project root)
added new checkForConflict method to ContextConfigurationReader
added processCobiGenWithExpectedError methods to EclipseCobiGenUtils
added new ExceptionHandlingTest

* devonfw#1496 added waitUntils of 10 seconds to ExceptionHandlingTest and processCobiGenWithExpectedError
added screenshot to processCobiGenWithExpectedError
added exception message to cleanWorkspace log
replaced Files.exist with Files.isDirectory in ContextConfigurationReader

* devonfw#1496 fixed project import and optimized shell handling
added missing .project file
removed waitUntils
removed extra placeholder in debug message
moved syncExec to openInvalidConfigurationErrorDialog method
removed activeShell param from openInvalidConfigurationErrorDialog

* devonfw#1496 added new Eclipse test troubleshoot issue

* devonfw#1496 removed unnecessary/unused rule

* use annotations of the patchfile, if javamerge_override is set. (devonfw#1490)

* devonfw#430 use annotations of the patchfile, if javamerge_override is set.

* implement merge method and use it to merge class annotation

* merge implementation of fields and methods, and tests

* Update JavaMerger.java

Co-authored-by: Malte Brunnlieb <maybeec@users.noreply.github.com>

* devonfw#1532 fixed HealthCheck not being able to handle a conflict with the old and new configuration (devonfw#1533)

* devonfw#1532 fixed HealthCheck not being able to handle a conflict with the old and new configuration
added new ConfigurationConflictException
replaced InvalidConfigurationException with ConfigurationConflictException in checkForConflict method
replaced InvalidConfigurationException with ConfigurationConflictException in testConflictConfiguration test
added new case for conflicted configurations to ExceptionHandler handle method
added catch of ConfigurationConflictException with adjusted message to healthCheckDialog execute

* devonfw#1532 replaced File with Path

* devonfw#1532 implemented requested changes
moved log message from eclipse to core

* added missing test files

* added missing comment

Co-authored-by: GuentherJulian <69513769+GuentherJulian@users.noreply.github.com>
Co-authored-by: Malte Brunnlieb <maybeec@users.noreply.github.com>
Co-authored-by: LarsReinken <lars.reinken93@googlemail.com>
* devonfw#1465 Adjusted documentation
added CobiGen Home title
updated template folder structure
added template sets folder structure
added separate CobiGen configuration file documentation

* devonfw#1465 Adjusted documentation
moved 'Custom template-set groupIds for lookup' into the CobiGen configuration file topic
renamed 'Custom template-set groupIds for lookup' to 'Template set attributes'

* devonfw#1465 Implemented requested changes
replaced tab stops with white spaces
removed non existing feature
* Adjust documentation (devonfw#1491)

* fixed some types and links and corrected some parts of the documentation

* adjust angular client guide

* fixed typo

* fixed requested changes

* changed eclipse repository to https

* implemented draft for template set upgrader

* trigger getting converted to xml

* context will be splitted, pom generation in progress

* removed useless fields

* removed some comments

* implemented some test

* upgrader implemented

* added backup folder for old templates

* added ignore to templatesetupgradetests

* added ignore to templatesetupgradetests

* chaanged upgrading process and changed the tests of the upgrade

* test for sucessful backup

* changed test to use multiple context files

* devonfw#1502 changed context version of reader test files to lates compatible

* changed context version in the jars from the test files

* reworked upgrade step to work with the upgrade prozess to 3.0

* devonfw#1502 fixed latest context version in javaplugin integration test

* devonfw#1502 fixed some more context versions in tests

* moved template upgrade process out of the abstract class

* implemented requested changes

* removed some files

* the requested changes have been added

* changed use of validate process for the readers

* removed log

* removed import

* devonfw#1502 added tags to template sets

* used correct formatting for few files

* devonfw#1502 addressed requested changes

* devonfw#1502 replaced generic exceptions with CobigenRuntimeExceptions

* devonfw#1502 applied proper code reformat

* devonfw#1502 fixed template set upgrader and tests
refactored context configuration validation into a new method validateContextConfigurationFile
set all template directories to proper path using ConfigurationConstants
added context configuration file exists and schema validation to testTemplateSetUpgradeCopyOfTemplates test

* devonfw#1502 fixed template set upgrader and tests
set all template directories to proper path using ConfigurationConstants

* devonfw#1502 fixed template set upgrader and tests
added exception to fail message

Co-authored-by: GuentherJulian <69513769+GuentherJulian@users.noreply.github.com>
Co-authored-by: Malte Brunnlieb <maybeec@users.noreply.github.com>
Co-authored-by: Julian Günther <julian.guenther@capgemini.com>
Co-authored-by: MikeSchumacher <mike.schumacher@capgemini.com>
Co-authored-by: jan-vcapgemini <jan-vincent.hoelzle@capgemini.com>
* devonfw#1531 Handle CLI Exception
Added 2 Test Cases for the Exception

* devonfw#1531 Implement Eclipse Handler logic
deleted unused CLI tests

* devonfw#1531 Handled Eclipse Exception
Enabled All Eclipse and CLI tests
Integrated Force into CLI tests
Integrated Bot to "Postpone" Exception in Tests

* devonfw#1531 Implemented requested changes
Integrated a handler in HealthCheck to handle MonolithicException

* devonfw#1531 implemented requested changes

* devonfw#1531 Deleted unnecessary comments

* devonfw#1531 Deleted redundant code
Added some comments

* devonfw#1511 requested changes
Added CLI Constants
Added Warning button instead of Error Button in Eclipse

* Added CLI Constants
Added Warning button instead of Error Button in Eclipse

* devonfw#1531 Adjusted and added missing JavaDocs

* devonfw#1531 Implemented requested changes

* devonfw#1531 requested Changes
* 1526 fixed infinite loop while generating from source code (devonfw#1547)

* devonfw#1526 added new Eclipse text input test
added a test which tests a simple generate from text input
added a new processCobiGenWithTextInput method to EclipseCobiGenUtils
refactored processCobiGen method
added new generateWithSelectedIncrements method to EclipseCobiGenUtils

* devonfw#1526 fixed infinite loop
wrapped getActiveWorkbenchWindow into asynchronous runnables
added workbenchWindow class variable
added extra check for FileEditorInput

* devonfw#1526 added missing files
added .classpath and .project files

* devonfw#1526 fixed Eclipse crash
changed asynchronous runnable to synchronized

* devonfw#1551 disabled GenerateFromTextInput test
* Documentation of upgrade steps + Link to wiki

* Fixing typos
* Attached Templsate-set plugin for deployment

* Artifact attached in parent pom

* Update pom.xml

* devonfw#1521 final Solution in templates-parent pom

* devonfw#1521 modified Plugin and classifer
Plugin now only in templates parent pom
Added Classifier so that the additional attached artifact has name alongside the maven co-ordinates

* devonfw#1521 Reformat templates-parent pom

* devonfw#1521 All template-set.xml empty files deleted
* initial commit

* template-sets will be installed at cobigen startup

* added tests

* removed old test

* removed comments

* added mavenCoordinates dataholder and reworked the functions

* added systemtest

* added creation of downloaded folder

* trying to fix cli tests

* removed unnessesary download of templates

* added check for downloaded folder

* revert changes to an old test

* added javadoc and adjusted documentation

* fixed wrong push

* devonfw#1510 implemented requested changes
changed test name and removed cobigen variable

* implemented requested changes

* initial implenetation of mocking the downloads

* added todo

* removed usage of Path

* removed initial try to mock downloads in tests

* chaged assertions to assertThat

* changed variables to correct camel case and used constants, Files and improved asserts

* fixed typo

* implemented requested changes

* fixed nullPointerbug with lates commit

* implemented requested changes

Co-authored-by: jan-vcapgemini <jan-vincent.hoelzle@capgemini.com>
… REST API (devonfw#1556)

* devonfw#1529 added first implementation of extensible artifact search REST API
added new getMavenArtifactsByGroupId to MavenUtils which takes a repository type (e.g. maven, nexus, jfrog) and a groupId to search for
added new SearchResponse tos to core-api utils
added new MavenUtilTest class (tests for proper json string parsing and REST API requests) and resources

* devonfw#1529 added missing dependencies

* devonfw#1529 implemented requested changes
added new RESTSearchResponseException
replaced IOException with RESTSearchResponseException

* devonfw#1529 fixed jFrog API

* devonfw#1529 implemented requested changes
changed repositoryType from String to MavenSearchRepositoryType enum
added new MavenSearchRepositoryType enum

* devonfw#1529 implemented requested changes
replaced fixed repository URLs with constants
added new MavenSearchRepositoryConstants

* devonfw#1529 implemented requested changes
converted MavenSearchResponseConstants to uppercase
added MAVEN, NEXUS and JFROG TARGET_LINK constants
added MAVEN_MAX_RESPONSE_ROWS constant
added javadoc to all models (moved main model to top)
renamed json response models

* devonfw#1529 adjusted nexus REST API
adjusted nexus REST API to v2.0
adjusted nexus REST API tests and resources to v2.0
refactored createDownloadLink method (moved to AbstractRESTSearchResponse)
added new constants for MAVEN_REPOSITORY_LINK, NEXUS_REPOSITORY_URL, NEXUS_REPOSITORY_URL, NEXUS_TARGET_LINK, NEXUS_DC_ID
added ec param to MavenSearchResponse

* devonfw#1529 disabled jfrog REST API test

* devonfw#1529 added optimizations + authentication
added bearer token authentication
added bearer token to jfrog
renamed nexus to nexus2 repository type
added nexus3 repository type
added more tests for code coverage

* devonfw#1529 applied factory pattern
added new SearchResponse interface
made all SearchResponse types inherit from SearchResponse
added new SearchResponseFactory
refactored getArtifactDownloadLinks method
added new getAvailableSearchInterfaces method (used to register new search interfaces)
added getRepositoryType to SearchResponse parent class (returns the type of repository as an enum)

* devonfw#1529 moved utility methods from factory class to util class
added new SearchResponseUtil class

* changed javadoc

* devonfw#1529 implemented requested changes
renamed RESTSearchResponse signature msg to message

* devonfw#1529 implemented requested changes
removed limitRows functionality
removed NEXUS2_DC_ID from target link
adjusted MavenSearchResponseConstants javadoc

* devonfw#1529 implemented requested changes
converted getAvailableSearchInterfaces method to final list of SearchResponses
adjusted javadoc

* devonfw#1529 added missing javadoc

* devonfw#1529 implemented requested changes
added more detailed javadoc

* devonfw#1529 implemented requested changes
converted RESTSearchResponseException name to PascalCase

* devonfw#1529 implemented requested changes
renamed getMavenArtifactsByGroupId to retrieveMavenArtifactsByGroupId

* devonfw#1529 implemented requested changes
renamed getArtifactDownloadLinks to searchArtifactDownloadLinks

* devonfw#1529 implemented requested changes
moved multi search response classes to separate packages

* devonfw#1529 implemented requested changes
improved javadoc readability

* devonfw#1529 implemented requested changes
converted SearchResponse to AbstractSearchResponse
refactored getJsonResponse
added new retrieveJsonResponseWithAuthentication method to AbstractSearchResponse
renamed getJsonResponse to retrieveJsonResponse

* devonfw#1529 implemented requested changes
refactored getDownloadURLs method
added new removeDuplicatedDownloadURLs method to AbstractSearchResponse
renamed getDownloadURLs to retrieveDownloadURLs

* devonfw#1529 implemented requested changes
refactored SearchResponseUtil methods
moved SearchResponseUtil methods to AbstractSearchResponse
removed SearchResponseUtil class

* devonfw#1529 implemented requested changes
removed throw CobiGenRuntimeExceptions to ensure that an error with the API won't stop CobiGen execution
replaced CobiGenRuntimeException in MavenUtil with error log and a return of null
converted testWrongRepositoryTypeThrowsException to testRetrieveMavenArtifactsWithInvalidLinkReturnsNull
replaced throw exception with error log message

* devonfw#1529 implemented requested changes
refactored getJsonResponseStringByTargetLink
replaced getJsonResponseStringByTargetLink with retrieveJsonResponseWithAuthenticationToken
added MavenSearchRepositoryType to retrieveJsonResponseWithAuthenticationToken

* devonfw#1529 implemented requested changes
replaced fixed ignored json properties with ignore unknown param

* devonfw#1529 added WireMock to tests
made ignored tests functional with WireMock
added WireMock stubs for each case
updated jersey from 3.0.5 to 3.0.7
added wiremock-standalone 2.27.2 (used older version because of conflicts with jackson)

* devonfw#1529 reduced WireMock logging
added logback-test.xml (sets WireMock to WARN log level)

* devonfw#1529 updated jackson
updated jackson-databind from 2.13.2.2 to 2.13.3

* devonfw#1529 fixed FileUtils issue
replaced readString with readAllBytes

* devonfw#1529 implemented requested changes
renamed baseURL to baseUrl
removed LOG concatenation

* devonfw#1529 implemented requested changes
removed ProcessingException from SearchResponseFactory

* devonfw#1529 implemented requested changes
added artifactory path to jfrog target link constant

* devonfw#1529 removed jersey dependencies
replaced jersey with OkHttpClient
restricted MavenUtilTests (added check of messages)
added jackson-databind to core-api dependencies
added okhttp to core-api dependencies

* devonfw#1529 updated okhttp
changed okhttp version from 4.9.1 to 4.10.0

* devonfw#1529 added okhttp version to root pom
added latest okhttp dependeny to root pom.xml
removed fixed okhttp versions from core-api and core-externalprocess-api

* devonfw#1529 added okio
added transitive okio dependency

* devonfw#1529 implemented requested changes
Changed enum values to uppercase

* devonfw#1529 implemented requested changes
moved status into not null if condition

Co-authored-by: EduardKrieger <eduard.krieger@capgemini.com>
* fix merge error

* changed restoreSystemProperties to withEnviromentVariable
…om a folder (devonfw#1553)

* devonfw#1518 Integrated the context upgrader into TemplatesAdapterImpl
and Into the CLI

* devonfw#1518 Reactivated Ignored tests
Refactored processCobiGenAndPostponeUpgrade

* devonfw#1518

* devonfw#1518 Integrated the upgrader into the CLI

* devonfw#1553 adjusted v5.0 template configuration file
removed optional param from valid 5.0 template configuration file as it is not required for an upgrade check because of backwards compatibility

* devonfw#1533 fixed upgrade tests
re-introduced version to version test (removed upgrade to latest version tests)
re-introduced schema version validation tests (removed validate against latest schema test)
refactored resolveLatestCompatibleSchemaVersion
added new maxVersion param for tests (limits the versions list to the provided maximum version)
added new limitVersions method (limits the versions list to provided maximum version)
added new isConfgurationFileCompatibleToSchemaVersion method (checks if the version is compatible to the configuration file)
added new testV2_1IsIncompatibleToV3_0Schema test to make sure that v3.0 is not backwards compatible to v2.1

* devonfw#1518 Implement the upgrader to be dynamic with custom templates
changed src/main/templates to src/main/resources in template-sets

* devonfw#1518 Implemented requested changes.
Implemented a class TimeStampUtil for the timestamp.
Implemented a starting point to check the 30 day postpone in CLI.

* devonfw#1518 Upgrader Test

* devonfw#1518 Upgrader Test 2

* devonfw#1518 Integrated Timestamp into Eclipse
Wrote CLI Upgrader Test
New Implementation of isTemplateSet based on versioning the context.xml
Collectors methods in FileSystem to collect paths of context.xml and templates.xml
New TimeStampUtilTest
New CLI option to upgrade the configuration in one command
New FileSystemUtilTest
Restored monolithic context.xmls to their original versions in tests
Added a small monolithic templates project in CLI to test the upgrader
Implemented a new structure for Eclipse to recognize the template-sets after the upgrade (still needs to be tested).
Ignore testFindTemplateslocation (for some reason the test cannot recognize the specified user.home)
Adjusted Findtemplates to prefer template-set instead of the old configuration if both folders are found in Home.

* devonfw#1518 Test Correction

* devonfw#1518 Test Correction

* devonfw#1518 Test Correction

* devonfw#1518 Test Correction

* devonfw#1518
Deleted MavenXpp classes from the upgrader, now only copy the pom and replace with regex
Implemented the upgrader into Eclipse
After the upgrade now, Eclipse should be able to read the new template-set structure and generate from them
Implemented new upgrader test for Eclipse

* devonfw#1518 Test correction

* devonfw#1518 Test Correction

* devonfw#1518 Eclipse tests correction

* devonfw#1518 Eclipse test correction

* devonfw#1518 Implemented requested changes

* devonfw#1518 implemented requested changes

* devonfw#1518 Implemented requested changes

* devonfw#1518 Implemented requested changes

* devonfw#1518 Implemented requested changes

* devonfw#1518 Implemented requested changes

* devonfw#1518 Fixed Eclipse small Issue not identifying the template-set folder structure

* devonfw#1566 Implemented requested changes

* devonfw#1518 Implemented requested changes

* devonfw#1518 Implemented requested changes

* devonfw#1518 Implemented requested changes
Deleted all public static fields in eclipse, to be solved in a new Issue

* devonfw#1518 fixed null check

* devonfw#1518 Implemented requested changes
Modified the upgrade process to upgrade inside the original templates folder using the rename method

* devonfw#1518 Core-Tests correction

* devonfw#1518 reworked renaming process

* devonfw#1518 Reworked renaming process 2

* devonfw#1518 rename of templates folder working for some cases

* devonfw#1518 reworked templateUpgraderTests

* devonfw#1518 Added Jacoco check On Cli and Maven projects

* devonfw#1518 Implemented requested changes

* devonfw#1518 added test of backup files

* devonfw#1518 Fixed getPomLocation from Homepath

* devonfw#1518 Fixed bug of arraylist and refactored some methods

* devonfw#1518 Implemented requested changes

* devonfw#1518 Fixed Eclipse upgrade test

Co-authored-by: jan-vcapgemini <jan-vincent.hoelzle@capgemini.com>
Co-authored-by: EduardKrieger <eduard.krieger@capgemini.com>
* fixed mistakes in the POC tutorial

Co-authored-by: Felix felix.berger@capgemini.com

* Shortened and edited the tutorial + updated screenshots

* a few layout and spelling/phrasing corrections
* First implementation of settings.xml mapping

* Completed mapping of the needed components, refactoring, added JavaDocs, added log output

* Added test class, removed unnecessary code

* devonfw#1530 added maven settings password decryption
added org.codehaus.plexus sec-dispatcher dependency
added org.codehaus.plexus cipher dependency
added MavenSettingsUtil
added MavenSettingsUtilTest and resources

* devonfw#1530 adjusted test method name

* Added tests, did refactoring

* Added missing JavaDocs, tests are now using asserThat(), more improvements addressing change requests on the pull requests

* devonfw#1530 added basic authentication type
replaced authToken with password
added basic username and password authentication

* devonfw#1530 renamed REST search API constants

* devonfw#1530 handle template-set.xml
made sure that only template-set.xml files get returned as download links
added new template-set.xml to ConfigurationConstants
added a valid template-set.xml example to test resource files
removed extra outputs (non template-set.xml) from test assertions
added classifier to Nexus2Response
renamed retrieveDownloadUrls to retrieveTemplateSetXmlDownloadURLs

* devonfw#1530 added some fixes
fixed credentials not being used
fixed too many httpclient calls being used
added new test for a failed basic authentication
added new test for a failed token authentication
enabled bad url test

* devonfw#1530 cleaned up exceptions
removed JsonMappingException because it is already being handled by JsonProcessingException

* Switched from javax to jakarta, resolved comments from the pull request

* Tidied up code

* Changed path generation

* Added unmarshalling for mirrors, added loading of active profiles, added preperation of settings.xml

* added function, which returns repositories of all active profiles

* devonfw#1530 improved log messages
adjusted log messages (converted to debug, made factory process messages more transparent)
converted RestSearchResponseException status code from string to integer

* Added utils to operate with mirrors specified in maven's settings.xml

* Optimized MavenSettingsUtilTest, added first code of MavenMirrorUtilTest

* Fixed bugs, added tests for matchPattern

* Completed MavenMirrorUtil class, completed tests

* determined active profiles, added method to determine repositories of active profiles and inject mirrors in repository urls

* Minor optimisations

* Added collection of servers private key and passphrase

* Refactoring of classes in a new maven module

* devonfw#1530 added exception messages to constants

* devonfw#1530 adjusted exception handling
replaced exception strings with constants
added retrieveRestSearchApiTargetLink method
adjusted SearchResponseException with dynamic message
adjusted tests to check for exception types and message content

* Fixed merge bugs

* devonfw#1517 Refactoring
Refactored changes from devonfw#1530 into devonfw#1517
Moved devonfw#1530 files into MavenSearch package

* devonfw#1517 Added proxy to http client

* devonfw#1517 added eclipse project files

* Removed MavenSettingsUtil

* devonfw#1517 changed the process of getting active profiles
added artifact retriever
removed unsecessary code

* devonfw#1517 added multiple tests

* devonfw#1517 improved WireMock log messages
moved logback-test.xml from core-api to core-artifact-retriever

* devonfw#1517 introduced server credentials
moved all server credentials into new object
added new MavenSearchArtifactRetriever class
added new ServerCredentials class
adjusted tests to utilize server credentials
deleted MavenArtifactsUtil

* devonfw#1517 Added proxy util and tests

* devonfw#1517 removed exceptions
replaced exceptions with debug log messages
adjusted tests

* devonfw#1517 Reworked MavenProxyUtil, updated tests

* devonfw#1517 replaced more exceptions with log messages
removed obsolete retrieveMavenArtifactsByGroupId method

* devonfw#1517 implemented requested changes
converted null returns to empty lists
added new debug message to indicate that the search is proceeding
converted MavenSearchArtifactRetriever to static class
added more tests
adjusted test descriptions

* devonfw#1517 Combined ArtifactRetriever with MavenSearch
added artifactRetriever logic
prepared artifactRetriever tests

* devonfw#1517 ArtifactRetriever test preperation

* devonfw#1517 added first ArtifactRetriever tests
added example template-set.xml
added example json response for WireMock
added WireMock tests for proxy and non proxy connections as well as basic authentication
added more log messages for proxy usage and basic authentication usage
fixed NPE in MavenSettingsUtil and ArtifactRetriever

* devonfw#1517 added proxy server authentication
added basic authentication to proxy connection
added tests for proxy authentication
added proxyUsername and proxyPassword to ServerCredentials

* devonfw#1517 split test classes
split test classes of maven search

* devonfw#1517 re-organized test resources
simplified json test resource files for MavenSearchResponse tests

* devonfw#1517 fixed ArtifactRetriever proxy test
added 2nd WireMock server
adjusted settings.xml to use proxy properly

* devonfw#1517 Added ArtivactRetrieverReader

Co-authored-by: Leonie leonie-heidi.schuessler@capgemini.com

* Removed unused test

* devonfw#1517 removed util package from mavensearch

* devonfw#1517 optimizations
fixed typo
moved file reader from test to generateMavenTemplateSetConfiguration method
adjusted javadocs
added more debug information

* devonfw#1517 renamed reader models

* devonfw#1517 removed util package from mavensearch

* devonfw#1517 added template set version and tests
added retrieveTemplateSetData method (converts a list of template set files to TemplateSetArtifactReader)
added more tests and test resources
converted TemplateSetArtifactReader to stateful class
added simple template set version retrieval
adjusted tests
removed tag names and increment descriptions from TemplateSetArtifactReader
removed setupClass method from TemplateSetArtifactReaderTest (moved initialization to each test)

* devonfw#1517 renamed MavenReaderTest resource folder
renamed MavenReaderTest resource folder to TemplateSetArtifactReaderTest

* devonfw#1517 set java version to 11

* devonfw#1517 Removed java 11 dependency

* devonfw#1517 removed java 11 dependencies

* devonfw#1517 replaced List.of with simple List

* devonfw#1517 implemented requested changes
renamed get... methods
adjusted/added javadocs

* devonfw#1517 implemented requested changes
removed .classpath and .project files
moved timeout values to constants
converted SEARCH_RESPONSES from Object to AbstractSearchResponse
moved regex version number detection to constant

* devonfw#1517 implemented requested changes
saved the return of Systemutils.getUserHome() and determineMvnPath in a static variable to avoid multiple calls of the method

* devonfw#1517 implemented requested changes
added javadoc descriptions

* devonfw#1517 adjusted javadocs and class name
fixed type of Nexus2SearchResponseArtifactLinks

* devonfw#1517 Removed exceptions from tests, added javaDocs

* devonfw#1517 implemented requested changes
removed unnecessary returns

* devonfw#1517 adjusted artifact reader
adjusted artifact reader to latest TemplateSetConfiguration
added ContextConfiguration and TemplatesConfiguration entities
adjusted tests

* devonfw#1517 introduced new TemplateSet entity
replaced TemplateSetArtifactReader constructor with new retrieve method
adjusted tests

* devonfw#1517 implemented requested changes
removed unnecessary caching of user home and maven paths

* devonfw#1517 implemented requested changes
added zeroturnaround zt-exec 1.12 to the root pom as a managed dependency

* devonfw#1517 implemented requested changes
removed unnecessary build of test-jar

* devonfw#1517 devonfw#1517 implemented requested changes
adjusted debug log message
made sure that missing files won't break the retrieval process
added new testRetrieveTemplateSetArtifactWithMissingFile test

* devonfw#1517 implemented requested changes
changed wiremock dependency to wiremock-jre8 2.35.0

* devonfw#1517 implemented requested changes
changed java version to 11

Co-authored-by: jan-vcapgemini <jan-vincent.hoelzle@capgemini.com>
jan-vcapgemini and others added 27 commits April 6, 2023 22:38
# Conflicts:
#	cobigen-cli/cli/src/main/resources/pom.xml
#	cobigen-eclipse/cobigen-eclipse-test/src/main/resources/UpgradeMonolithicTemplatesTest/templates/CobiGen_Templates/src/main/templates/crud_openapi_angular_service_based_app/templates.xml
#	cobigen-maven/cobigen-maven-systemtest/src/test/resources/testdata/systemtest/Devon4JTemplateTest/TestTemplatesProjectForPom/src/main/templates/context.xml
#	cobigen-maven/cobigen-maven-systemtest/src/test/resources/testdata/systemtest/Devon4JTemplateTest/TestTemplatesProjectForPom/src/main/templates/crud_java_server_app/templates.xml
#	cobigen-templates/templates-devon4j/src/main/templates/kafka_documentation/templates.xml
@github-actions github-actions bot added app:maven Team_CobiGen_Templates These issues will be handeled by the team CobiGen_Templates labels Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:maven Team_CobiGen_Templates These issues will be handeled by the team CobiGen_Templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.