oasp / oasp4j

The Open Application Standard Platform for Java
Apache License 2.0
60 stars 303 forks source link

Reworked archetype/template #629

Closed hohwille closed 6 years ago

hohwille commented 6 years ago

I am reworking our maven archetype (project template):

This PR is now complete. Still we can discuss to remove BinaryObject but IMHO it is easier to keep this out here and if we want to do that simply create another PR afterwards. Please still see my open issues in the list on the first comment.

hohwille commented 6 years ago

To be honest: our archetype was/is kind of a mess (contains restaurant specific leftovers, code with smells and anti-patterns, etc.). I am still in the process of heavy rework. Contribution and feedback is most welcome.

MarcoRose commented 6 years ago

Please add the maven license plugin with some configuration-options. A user may then manually execute:

mvn license:aggregate-download-licenses 

and

mvn license:aggregate-add-third-party

The plugin can also be activated to run during build

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.14</version>

        <!-- configuration outside of execution-tags will be applied for all calls of license-maven-plugin -->
        <configuration>
          <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
          <sortArtifactByName>true</sortArtifactByName>
          <includeTransitiveDependencies>true</includeTransitiveDependencies>
          <!-- the "missing file" declares licenses for dependencies that could not be detected automatically -->
          <!-- find the "missing files" in all child-projects at the following location -->
          <!-- if the "missing files" are not yet existing in child-projects they will be created automatically-->
          <useMissingFile>true</useMissingFile>
          <failOnMissing>true</failOnMissing>
          <missingFile>src/license/THIRD-PARTY.properties</missingFile> 
          <overrideFile>src/license/override-THIRD-PARTY.properties</overrideFile>
          <!-- harmonize different ways of writing license names -->
          <licenseMerges>
            <licenseMerge>Apache Software License, Version 2.0|The Apache Software License, Version 2.0</licenseMerge>
            <licenseMerge>Apache Software License, Version 2.0|Apache 2.0</licenseMerge>
            <licenseMerge>Apache Software License, Version 2.0|Apache License, Version 2.0</licenseMerge>
          </licenseMerges>
          <encoding>utf-8</encoding>
        </configuration>

        <!-- 
          In case you want to create license information during regular builds, uncomment below executions, 
          then run mvn package. This will create the THIRD-PARTY.txt and will
          download license files into target folder and create a licenses.xml -->
        <!--
        <executions>
          <execution>
            <id>aggregate-add-third-party</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>aggregate-add-third-party</goal>
            </goals>
          </execution>

          <execution>
            <id>aggregate-download-licenses</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>aggregate-download-licenses</goal>
            </goals>
          </execution>          
        </executions> 
        -->
      </plugin>

Thank you.

The src/license/THIRD-PARTY.properties file contains additional license declarations for used dependencies that can not automatically get detected by maven license plugin. The content is of course project-specific. For mts-core the following content is correct: mtsj/core/src/license/THIRD-PARTY.properties

# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
# - ASF 2.0
# - Apache 2
# - Apache 2.0
# - Apache License 2.0
# - Apache License, Version 2.0
# - Apache License, version 2.0
# - Apache Software Licenese
# - Apache Software Licenses
# - BSD
# - BSD License
# - BSD style
# - BSD-like
# - CDDL + GPLv2 with classpath exception
# - CDDL 1.1
# - CDDL+GPL License
# - CDDL/GPLv2+CE
# - CPL
# - Common Development and Distribution License (CDDL) v1.0
# - Eclipse Distribution License (EDL), Version 1.0
# - Eclipse Public License (EPL), Version 1.0
# - Eclipse Public License - v 1.0
# - Eclipse Public License 1.0
# - Eclipse Public License v1.0
# - GNU Lesser General Public License
# - GPL2 w/ CPE
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - LGPL 2.1
# - MIT License
# - MPL 1.1
# - MPL 2.0 or EPL 1.0
# - New BSD License
# - Public Domain
# - The Apache Software License, Version 2.0
# - The BSD License
# - The JSON License
# - The MIT License
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
#Wed Feb 14 11:11:15 CET 2018

#https://github.com/dom4j/dom4j/blob/master/LICENSE
dom4j--dom4j--1.6.1=BSD 3-Clause

javax.servlet--jstl--1.2=CDDL

#https://github.com/codehaus/jettison/blob/master/src/main/resources/META-INF/LICENSE
org.codehaus.jettison--jettison--1.2=Apache License, Version 2.0
hohwille commented 6 years ago

We have a problem here:

I would love to get some support or hints on this. It seems that we have a strange but severe issue here. I debugged everything in detail:

I found the source of the actual problem:

hohwille commented 6 years ago

Build broke because spring boot plugin already requires java8. This is actually not so great. Should I upgrade travis.yml or do we need to get stuck with old plugins because of Java7 support?

This is the failing class: https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java

So this is because of spring-boot-maven-plugin. However, IMHO I did not update this one.

UPDATE: I tied the version of this plugin via pluginManagement and now travis is green. However the bug was not reproducible locally even with JDK1.7. Seems that maven on travis behaves different than locally - strange. However, this way I was not forced to upgrade travis.yml to Java8 (we have to do that soon anyhow but then we will loose the assurance that our code will still work with Java7 as it may [accidentally] use new JDK1.8 types).

hohwille commented 6 years ago

@MarcoRose I have integrated license-maven-plugin. To be honest I can not see a real benefit of this plugin over the already integrated Project Dependency Management. What is the real added value of this? Maybe I am missing some features... It does not seem to judge on used licenses even the normalizing of the licenses is not properly honored. I will check if I messed this by reading the docs (http://www.mojohaus.org/license-maven-plugin/aggregate-third-party-report-mojo.html#licenseMerges) and trying to simplify your given config.

hohwille commented 6 years ago

Both

        <configuration>
          <licenseMerges>
            <licenseMerge>Apache Software License, Version 2.0|The Apache Software License, Version 2.0</licenseMerge>
            <licenseMerge>Apache Software License, Version 2.0|Apache 2.0</licenseMerge>
            <licenseMerge>Apache Software License, Version 2.0|Apache License, Version 2.0</licenseMerge>
          </licenseMerges>
        </configuration>

as well as

            <licenseMerges>
              <licenseMerge>Apache Software License, Version 2.0|The Apache Software License, Version 2.0|Apache 2.0|Apache License, Version 2.0</licenseMerge>
            </licenseMerges>

Does not have any effect on the report. No matter if I put this into <configuration> of <pluginManagement> or <reporting> for the license-maven-plugin. In any case I get the original licenses listed without normalization. IMHO this plugin is not so much of a benefit but correct me if I am missing some features...

hohwille commented 6 years ago

Really time-consuming tasks here...

maven succeeded locally but travis is again causing an error: https://api.travis-ci.org/v3/job/349352877/log.txt

[INFO] [ERROR] Errors: [INFO] [ERROR] SecurityRestServiceImplTest.testGetCurrentUser:75 » ServiceInvocationFailed Wh...

Seems to be caused by this one:

[INFO] Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://localhost:52051/services/rest/security/v1/currentuser/: Read timed out

Very interesting is that the same worked before with basic archetype test:

[INFO] [INFO] basic .............................................. SUCCESS [ 1.434 s] [INFO] [INFO] basic-api .......................................... SUCCESS [ 3.807 s] [INFO] [INFO] basic-core ......................................... SUCCESS [ 36.420 s] [INFO] [INFO] basic-server ....................................... SUCCESS [ 4.661 s] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] BUILD SUCCESS

hohwille commented 6 years ago

So the last thing to finally complete this would be to add DDL SQLs for further DBs:

hana is not yet supported. Should be added with hana PR separately.

vapadwal commented 6 years ago

While testing project creation via project template using eclipse found below issues:

  1. While creating project via eclipse, its giving below error

Required property "dbType" is not set.

Here we have to manually put the value then only its working. it should take the default value i.e h2 in this case.

  1. Project creation was successfull with dbTyoe put as h2, but when run SpringBootApp class(main class) to start server got below exception:

Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'security' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public?

In BaseWebSecurityConfig.java @Value("#[[$]]#{security.cors.enabled}") Updated it with below : @Value("${security.cors.enabled}")

With this it was able to pick the value from application.properties, and was able to run the server.

hohwille commented 6 years ago

@vapadwal Thanks for your valuable feedback. Seems I still missed some things out. Actually I left no default for dbType as in my case I was then prompted for it, while otherwise you are not even aware that such a property even exists. However, I am also fine to add h2 as simple default and instead add some additional docu and maybe also something to devcon later.

For the wrong velocity expression I have to fix asap. I guess I will have to scan all templates for such expressions to verify there is nothing else I missed. This is definitely a stupid bug I missed out. Great that you found it. Thanks :+1: I will update my fork and this PR very soon.

hohwille commented 6 years ago

I have fixed most of the issues locally (sorry for the delay - too busy with other projects). I was struggling with velocity messing up with javadoc link syntax as it tries to parse #link as a marco and then fails on subsequent syntax.

So we can now use the unparsed content syntax to avoid issues with javadoc links and therefore get rid of #set( $symbol_pound = '#' ) and ${symbol_pound} what was kind of ugly.

hohwille commented 6 years ago

So I am done with this and resolved all outstanding remarks and problems. Still I see further room for improvement but as that depends on other PRs (e.g. https://github.com/oasp/oasp4j/pull/631) I want to keep that out of this PR. What I also dislike is the duplication of TestUtil but the only alternative I see would be to create a test module only for this single class what seems kind of odd (esp. if you are not using batch what is the default then the current state makes much more sense).

vapadwal commented 6 years ago

While testing templates below are some more issues that are encountered

  1. while testing with different databases, below code in application.properties(/oasp4j-template-server/src/main/resources/archetype-resources/core/src/main/resources/application.properties) always creates db/type/mysql for all the databases.

if ($dbType != 'mariadb')

flyway.locations=classpath:db/migration,classpath:db/type/mysql

else

flyway.locations=classpath:db/migration,classpath:db/type/${dbType}

end

When tested it with $dbType == 'mariadb' it gives correct classpath for all the databases

  1. while testing it for oracle database, had to put size and data in quotes. Also the value for data need to be shorten as oracle was not allowing to insert more than 4000 character string in a column. File Name : V0004__Add_blob_data.sql INSERT INTO BinaryObject( ID,MODIFICATIONCOUNTER,"size","data",MIMETYPE) VALUES (10, 0,72861, '..........','image/png');

  2. After all the above issue , got the below exception. It was not able to validate the schema. but with other database like mysql and postgre the schema validation did not threw this error. (Getting this error incase of oracle) Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [data] in table [BinaryObject] at org.hibernate.tool.schema.internal.SchemaValidatorImpl.validateTable(SchemaValidatorImpl.java:85) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

worked when commented spring.jpa.hibernate.ddl-auto=validate (Need to find out why it is happening)

hohwille commented 6 years ago

if ($dbType != 'mariadb')

Can you first double check that you reviewed the correct state? I guess you did not properly pull.

This is the state in my fork that was basis of this PR after my corrections that you reviewed: https://github.com/hohwille/oasp4j/blob/feature-template/templates/server/src/main/resources/archetype-resources/core/src/main/resources/application.properties#L17

I committed a fix to what you cited already on Mar 19, 2018 what was before your first review: https://github.com/oasp/oasp4j/pull/629/commits/514824d20e9416d5fcf9caee45c49ab81768ec3a

In case I am still missing something can you please point a link to the exact location with that bug as URL?

For 2.: Also the quotes are present for data and size: https://github.com/hohwille/oasp4j/blob/feature-template/templates/server/src/main/resources/archetype-resources/core/src/main/resources/db/type/oracle/V0003__Create_BinaryObject.sql#L5

vapadwal commented 6 years ago

This is the exact link for issue - if ($dbType != 'mariadb') https://github.com/hohwille/oasp4j/blob/feature-template/templates/server/src/main/resources/archetype-resources/core/src/main/resources/application.properties#L61

Also below is the link for the issue- For 2.: Also the quotes are present for data and size: https://github.com/hohwille/oasp4j/blob/feature-template/templates/server/src/main/resources/archetype-resources/core/src/main/resources/db/migration/1.0/V0004__Add_blob_data.sql

hohwille commented 6 years ago

@vapadwal thanks for pointing this out. Shame on me - really obvious. I was blind (mainly too busy with other projects) but somehow also my search seems not to work as I searched for $dbType != 'mariadb' with no hits. Maybe some regex interference - whatever. You are completely right. These are stupid mistakes and I will fix them asap.

After that I will try to test this with local oracle XE and see if I can reproduce and maybe also fix the strange exception. Otherwise I would propose to file an issue for that and get this merged anyhow. It was worse before and neither working with Oracle without PR so we still only improve quality here.

hohwille commented 6 years ago

Okay. It gets even more messy. While Oracle seems to require quotes in the column names other DBs like h2 do not even support quoting column names as they treat the quote as part of the column name and not as a kind of escape. Actually from https://github.com/oasp/oasp4j/issues/535 we should have learned to never use reserved keywords for names of tables or columns. Unfortunately with a broad community where people come and go such learning is hard.

hohwille commented 6 years ago

Okay. If further improved the oracle config according to: https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides (see also https://github.com/oasp/my-thai-star/pull/71).

hohwille commented 6 years ago

I can instantiate and run the archetype with oracle but booting the spring boot app leads to the same error that @vapadwal was stating. Oracle is simply too limited to insert the BLOB this way: https://stackoverflow.com/questions/13945710/error-ora-01704-string-literal-too-long

The workarounds would maybe fix this for oracle but again break it for other DBs. The easiest fix for now would be to simply put only a small BLOB (picture) in our masterdata SQL. Or as an alternative and as questioned from the start remove the entire BLOB stuff including all its code from the archetype. I guess a regular user expects to get an empty application rather than a little demo how to manage BLOBs via REST API. For the moment and to finalize this PR (it has really a very long and bloody history) I would prefer to simply replace the BLOB value with something small that works in oracle and then finally complete this PR first by merging it. Then we are free for another PR or issue about removing the BLOB stuff from archetype once more.

hohwille commented 6 years ago

I was able to replace the BLOB with something smaller that is now working with oracle. However, next I get this error from oracle:

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [timestamp] in table [RevInfo]
    at org.hibernate.tool.schema.internal.SchemaValidatorImpl.validateTable(SchemaValidatorImpl.java:85) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.schema.internal.SchemaValidatorImpl.doValidation(SchemaValidatorImpl.java:50) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:91) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:475) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
    ... 22 common frames omitted

Actually the column timestamp is present in RevInfo but there is again some reserved keyword issue that we are facing here. Never ending story though...

hohwille commented 6 years ago

Okay. Works with oracle if we put the column name in quotes: @Column("\"timestamp\") I hope this does not break the mapping for other DB types.

hohwille commented 6 years ago

So now I am completed. I could not quickly test that it is still working with MS SQL-Server or postgres but it works with h2, hsqldb and oracle (tested with XE) so I guess it should also work for the others if it used to work before.

hohwille commented 6 years ago

Build and tests worked locally with maven. No idea why it fails with travis now. This PR is really driving me nuts.

vapadwal commented 6 years ago

I have test with the new changes again and below are some more issues found

Issue 1:

Getting below exception when executed mvn install against oasp4j

apableBeanFactory.java:1624) ... 90 common frames omitted Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [timestamp] in table [RevInfo] at org.hibernate.tool.schema.internal.SchemaValidatorImpl.validateTable(SchemaValidatorImpl.java:85) at ... 96 common frames omitted [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.498 s - in io.oasp.gastronomy.restaurant.tablemanagement.service.impl.rest.TablemanagementRestServiceTest [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] SecurityRestServiceImplTest.testGetCsrfToken » IllegalState Failed to load App... [ERROR] SecurityRestServiceImplTest.testGetCurrentUser » IllegalState Failed to load A... [ERROR] SecurityRestServiceImplTest.testLogin » IllegalState Failed to load Applicatio... [ERROR] TablemanagementWebServiceTest.testWebService » IllegalState Failed to load App... [INFO] [ERROR] Tests run: 43, Failures: 0, Errors: 4, Skipped: 1 [INFO]

I think we need timestamp in quotes. refer to below file

https://github.com/hohwille/oasp4j/blob/feature-template/samples/core/src/test/resources/db/tablemanagement/V0001__R001_Create_schema.sql#L134

Issue 2:

Created a project in h2 and oracle got the below error both in h2 and oracle

Caused by: org.hibernate.DuplicateMappingException: Table [RevInfo] contains logical column name [timestamp] referring to multiple physical column names: ["timestamp"], [timestamp] at org.hibernate.boot.internal.InFlightMetadataCollectorImpl$TableColumnNameBinding.bindLogicalToPhysical(InFlightMetadataCollectorImpl.java:902) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

Because of the above issue I am not able to test further.

Issue 3 :

The project get created via console(using mvn -DarchetypeVersion=3.0.0-SNAPSHOT -...... command) but when tried it creating via eclipse got the below error

Unable to create project from archetype [io.oasp.java.templates:oasp4j-template-server:3.0.0-SNAPSHOT] org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 31, column 4. Encountered: after : ""

Might be because of velocity error below

https://github.com/hohwille/oasp4j/blob/feature-template/templates/server/src/main/resources/archetype-resources/__batch__/src/test/java/__packageInPathFormat__/general/common/base/test/TestUtil.java#L31 or https://github.com/hohwille/oasp4j/blob/feature-template/templates/server/src/main/resources/archetype-resources/core/src/test/java/__packageInPathFormat__/general/common/base/test/TestUtil.java#L31

hohwille commented 6 years ago

@vapadwal thanks for testing and your feedback. I fixed Issue 1. I already fixed the same issue in the template but did not hit it before with the sample. Further as you can verify the travis build of my change was also green so something is rather strange or evil here.

For issue 2 I have the opposite effect. It did not work without the quotes and therefore I did all the changes. I can test everything locally with OracleXE and it is working in my case. So maybe it works with my OralceXE version (11.2.0) but not with yours. In that case I rather have to give up for the moment. To repeat myself I just tried to pick up what @kiran-vadla once did here and it also worked perfectly for my local OracleXE. I am not sure how we should handle such cases in general but our problem somehow is that we have a buggy and crappy template currently but creating a PR to improve requires ultimate perfection and takes months or years. I guess most other contributors would have given up with their PR way before. So I guess I should also take the chance to open a community discussion outside this PR about how we want to work in such cases in the future. Maybe it is better to finally accept and merge PRs and rather open a follow up issue for further improvements than getting stuck so badly. Do not get me wrong here: Your feedback is valuable, perfect and helps to improve quality. Also I really messed up some things that you digged out and it is great that we fixed this before projects ran into the issue.

For issue 3 I am also a little bit puzzled but IMHO this is as following: I upgraded the archetype plugin so we now have a newer velocity engine under the hood for our archetype that provides features to better deal with nasty escaping, etc. However, when instantiating the archetype under some circumstances maven uses an older version of the archetype plugin with an older version of velocity that then can not parse our templates resulting in that error. This is good to know, but next we would need to understand under which circumstances this will happen:

So to make things clear: This error does not happen when I test it. My environment:

mvn -v
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)
Maven home: D:\Projekte\oasp\software\maven\bin\..
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: D:\Projekte\oasp\software\java\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

My invocation to create the project was e.g.:

mvn archetype:generate -DarchetypeGroupId=io.oasp.java.templates -DarchetypeArtifactId=oasp4j-template-server -DarchetypeVersion=3.0.0-SNAPSHOT -DgroupId=com.company -DartifactId=demo -Dversion=1.0.0-SNAPSHOT -DdbType=oracle -Dbatch=batch

If we can not proceed here we can as alternative drop all these features and simply remove the javadoc links entirely reducing the quality a little but getting away from this velocity issues.

hohwille commented 6 years ago

IMHO the remaining question is if that trick/workaround/hack is actually evil: https://github.com/oasp/oasp4j/pull/629/commits/537740f528b0b173352762daaf4755f8847933f9

If yes - what is the alternative to make this work with all the different databases. SQL aims to be a standard but actually it is not and is rather a pain.

vapadwal commented 6 years ago

For issue 3, i.e. velocity issue: I am also able to create project successfully via mvn command line, but the issue is happening with me when trying to create project via eclipse wizard(File>New>Maven Project)

For timestamp Issue " what is the alternative to make this work with all the different databases " If its possible, I think its better to rename the timestamp column just the way we did it for "size".

hohwille commented 6 years ago

For timestamp Issue " what is the alternative to make this work with all the different databases " If its possible, I think its better to rename the timestamp column just the way we did it for "size".

I agree that we should not use reserved keywords. However, this big issue here is that projects are already actively using this code and would then be forced to update their DBs in production. I do not see this as a good option right now - IMHO we would make some of our users mad and they might go away from Devon/OASP then... WDYT?

vapadwal commented 6 years ago

I have uninstall my oraclexe and again reinstalled it , Now its running properly in oracle (Not sure what was the problem there)

There is still issue with timestamp column running for H2. This is because of the changes (@Column(name = "\"timestamp\"")) in AdvancedRevisionEntity.java https://github.com/hohwille/oasp4j/blob/feature-template/modules/jpa-envers/src/main/java/io/oasp/module/jpa/dataaccess/api/AdvancedRevisionEntity.java#L43

As we are escaping timestamp we need to put quotes for timestamp in below file. This is for H2 case

https://github.com/hohwille/oasp4j/blob/feature-template/templates/server/src/main/resources/archetype-resources/core/src/main/resources/db/type/h2/V0002__Create_RevInfo.sql#L4

Now with this changes all the timestamp issue will be fixed.

hohwille commented 6 years ago

@vapadwal thanks for your patience and continuous testing and reviewing this PR. It might have been tedious but I hope we now finally got it well!

I am also able to create project successfully via mvn command line, but the issue is happening with me when trying to create project via eclipse wizard(File>New>Maven Project)

I fixed this be stop using this advanced velocity feature and simply kick out the javadoc link that caused velocity to fail.

Now with this changes all the timestamp issue will be fixed.

I also fixed this last occurrence. I missed it because it is not used by the tests but "only" if you actually run the archetype project with h2 what I never properly tested in the hurry. Thanks for your excellent quality assurance!

hohwille commented 6 years ago

Fine now we have a technical travis issue:

Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find io.oasp.java:oasp4j-bom:pom:3.0.0-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-snapshots has elapsed or updates are forced
AbhayChandel commented 6 years ago

Tested the PR and works fine.