Next JHipster version

176 views
Skip to first unread message

Julien Dubois

unread,
Oct 16, 2015, 11:10:57 AM10/16/15
to JHipster dev team
Hi guys,

There's a lot, lot of work that has been done recently.

I haven't tested everything, but at the moment I don't have much issues left.

-> is there anything blocker on your side?

I expect to merge https://github.com/jhipster/generator-jhipster/pull/2152 , improve some Liquibase code and then be ready for a new version, if that's all fine with you!

I will have time next week for this.

Cheers,

--
Julien Dubois

Thibaut Mottet

unread,
Oct 17, 2015, 6:31:01 AM10/17/15
to JHipster dev team
Good for me! 

Julien Dubois

unread,
Oct 17, 2015, 7:33:40 AM10/17/15
to Thibaut Mottet, JHipster dev team
And now I also have to add:

https://github.com/jhipster/generator-jhipster/pull/2152 -> new UI tests, that was really missing!
https://github.com/jhipster/generator-jhipster/pull/2155 -> social login, everybody wants this

So this is really a lot, lot of work!

I will merge those once I have reviewed them (help welcome!), do my Liquibase ideas, and then let's do a code freeze anyway, we have so much we need to do a release now!!

This is probably going to be our biggest release since 2.0!!

BTW, if you have time, have a look at the hot reload features:

- BrowserSync works really much better than it used to do. It's really perfect for me.
- Spring Boot devtools is incredible. I even have it working with Liquibase, it's really, really great. Exactly the idea we had at the beginning with Jérôme Mirc, with Spring Loaded, but now it's working perfectly!!

Have a nice week-end,

Julien

--
You received this message because you are subscribed to the Google Groups "JHipster dev team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev...@googlegroups.com.
To post to this group, send email to jhipst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jhipster-dev/d818d56d-76d4-4190-b86c-ea053821d892%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Raible

unread,
Oct 17, 2015, 12:40:52 PM10/17/15
to Julien Dubois, Thibaut Mottet, JHipster dev team
If it's the biggest release since 2.0, should we bump the release to 2.5?

I was going to upgrade my two JHipster apps to the latest release today. I'd be happy to try using master if you think it's close enough.

Last time I upgraded, I overwrote all the files, then used IntelliJ to diff each file to see what changed. This allowed me to see what changes the new release had. It also allowed me to keep my customized changes. Is there an easier way to upgrade?

Thanks,

Matt

Julien Dubois

unread,
Oct 17, 2015, 12:51:27 PM10/17/15
to Matt Raible, Thibaut Mottet, JHipster dev team
Hi Matt,

Well, we are already at 2.22, so 2.5 was long ago :-)

I'm trying to follow http://semver.org/ so technically speaking this shouldn't be a new major release, we don't really break a lot of things (excepted removing Java 7, but I don't consider this is worthy of a major release).

Then, of course, we improve lots of things, and in the end maybe we should do a new major release? 3.0 anyone?

Back to your other question: yes, the way I work is that I commit everything before upgrading the generator, then I overwrite everything and use SourceTree (or any Git tool) to go through all the changes. It can be quite a lot of work, then if you didn't have the generator you would also want to update your project from time to time, and it would be a lot more difficult to do it alone!!

Julien

Anders Steiner

unread,
Oct 17, 2015, 12:59:06 PM10/17/15
to Matt Raible, Julien Dubois, Thibaut Mottet, JHipster dev team

I do a git rebase and regenerate the project on the commit where it was generated. And then just git rebase --continue and then solve the conflicts that may occur if any commit of yours after the generation is not applyable.
Works well if you only work on one branch and all other developers are aware that they will need to reset their master branch after this.


Matt Raible

unread,
Oct 19, 2015, 1:35:34 AM10/19/15
to Julien Dubois, JHipster dev team, Thibaut Mottet
I think it's best to change to a major version when there's a breaking change. In hindsight, low evading table names is somewhat of a breaking change.

I upgraded one of my apps to 2.22 tonight and I found I had to revert all my table names back to uppercase. Otherwise, Liquibase would fail in production. I'm using PostgreSQL.

I was hoping to upgrade to the latest with Spring Boot 1.3. I tried following the guideline here:

https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md

1. Fork project
2. Run "npm link" in your forked project.
3. Run "yo jhipster" in the project you want to upgrade.

This doesn't seem to give me the latest code. Am I missing something?

Julien Dubois

unread,
Oct 19, 2015, 4:21:25 AM10/19/15
to Matt Raible, JHipster dev team, Thibaut Mottet
Matt, you also need to do a "npm install" on your forked project, to grab the latest dependencies.

Matt Raible

unread,
Oct 19, 2015, 11:06:03 AM10/19/15
to Julien Dubois, JHipster dev team, Thibaut Mottet
I've done this and I'm still getting an older version that has Spring Boot 1.2.6.
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.2.6.RELEASE</version>
<relativePath/>
</parent>
To fix it, I tried the following steps in the project I want to upgrade:
rm -rf node_modules src/main/webapp/bower_components/
Confirmed that package.json has "generator-jhipster": "2.22.0"
npm install
yo jhipster
I'm still getting the same results of my pom.xml having spring-boot 1.2.6.RELEASE.
Another attempt I made was to delete my forked project and clone generator-jhipster directly. After doing so, I ran "npm install && npm link" in the cloned project.
Then I ran the same steps listed above on the project I wanted to upgrade. Again, "yo jhipster" doesn't upgrade my pom.xml. Here's some snippets from "npm install".
y...@1.4.8 node_modules/yo
├── titl...@1.0.0
├── array...@1.0.2
├── fig...@1.4.0
├── as...@1.4.2
├── o...@3.0.2 (object...@3.0.0)
├── yeoman-c...@1.0.1 (support...@1.3.1)
├── string...@1.0.1 (strip...@3.0.0)
├── user...@2.0.0 (os-ho...@1.0.1)
├── ch...@1.1.1 (support...@2.0.0, ansi-...@2.1.0, escape-str...@1.0.3, has-...@2.0.0, strip...@3.0.0)
├── humaniz...@1.0.1 (decam...@1.0.0)
├── sor...@1.2.2 (arr...@1.0.0, dot-...@2.2.0)
├── fin...@0.1.5 (comm...@2.1.0, col...@0.6.2)
├── repe...@1.1.3 (is-f...@1.0.1)
├── root-...@1.0.0 (sudo-...@1.2.0, downgra...@1.1.0)
├── yo...@1.0.5 (ansi-...@2.1.0, ansi-...@1.1.1, word...@1.1.0, pad-co...@0.0.1, strip...@2.0.1, take...@1.0.0, mini...@1.2.0, string...@1.0.1)
├── confi...@1.2.1 (os-t...@1.0.1, object...@3.0.0, grace...@4.1.2, xdg-b...@2.0.0, uu...@2.0.1, os...@0.1.3, write-fi...@1.1.3, mkd...@0.5.1)
├── update-...@0.5.0 (is-...@1.0.0, latest-...@1.0.1, semve...@2.0.0)
├── g...@4.2.0 (lowerca...@1.0.0, time...@2.0.0, is-s...@1.0.1, is-re...@1.0.0, is-pla...@1.0.0, prepen...@1.0.3, unzip-r...@1.0.0, object...@3.0.0, node-sta...@1.0.0, create-er...@2.0.1, pinkie-...@1.0.0, parse...@2.2.0, read-al...@3.0.1, dupl...@3.4.2)
├── full...@1.1.1 (npm...@2.1.2)
├── packag...@1.2.0 (regist...@3.0.3, g...@3.3.1)
├── npm-k...@1.2.0 (regist...@3.0.3, g...@3.3.1)
├── cross...@0.4.1 (lru-...@2.7.0, spawn...@1.0.13)
├── inqu...@0.9.0 (strip...@3.0.0, ansi-...@2.0.0, cli-...@1.1.0, thr...@2.3.8, run-...@0.1.0, read...@0.1.1, rx-...@2.5.2)
├── me...@3.4.2 (loud-re...@1.0.0, object...@4.0.1, trim-n...@1.0.0, mini...@1.2.0, camelca...@1.0.0, red...@1.0.0, read-...@1.0.1, normalize-p...@2.3.4)
├── yeoman...@1.4.0 (log-s...@1.0.2, object...@1.0.0, user...@1.1.1, each-...@1.1.1, sem...@4.3.6, bin-vers...@2.1.0, tw...@0.8.2)
├── ins...@0.6.0 (object...@2.1.1, lodash....@3.1.1, as...@0.9.2, os-...@1.0.3, tough-...@1.2.0, req...@2.65.0, inqu...@0.8.5)
└── yeoman-en...@1.2.7 (escape-str...@1.0.3, log-s...@1.0.2, di...@1.4.0, text-...@0.2.0, unti...@2.1.0, de...@2.2.0, mem...@1.1.0, glo...@2.1.0, groupe...@0.3.0, inqu...@0.8.5)

generator...@2.22.0 node_modules/generator-jhipster
├── html-...@1.1.0
├── word...@1.0.0
├── mkd...@0.5.1 (mini...@0.0.8)
├── she...@0.5.0
├── ch...@1.0.0 (escape-str...@1.0.3, ansi-...@2.1.0, support...@1.3.1, strip...@2.0.1, has-...@1.0.3)
├── e...@2.3.4
├── undersco...@3.2.0
├── che...@0.19.0 (enti...@1.1.1, dom-ser...@0.1.0, css-s...@1.0.0, htmlp...@3.8.3)
├── lod...@3.10.0
├── ins...@0.6.0 (object...@2.1.1, lodash....@3.1.1, as...@0.9.2, confi...@1.2.1, os-...@1.0.3, tough-...@1.2.0, req...@2.65.0, inqu...@0.8.5)
├── yeoman-g...@0.20.3 (read-...@1.0.1, path-...@1.0.0, path-is-...@1.0.0, detect-...@1.0.0, yeoman-...@1.0.1, yeoman...@2.1.0, rim...@2.4.3, as...@1.4.2, text-...@0.2.0, mi...@1.3.4, xdg-b...@2.0.0, user...@2.0.0, da...@4.0.1, class-...@0.1.2, de...@2.2.0, no...@3.0.4, istexto...@1.0.2, run-...@0.1.0, thro...@2.0.0, cli-...@0.3.1, gl...@5.0.15, di...@2.1.3, findu...@0.2.1, mem-fs...@2.0.4, cross...@2.0.0, datef...@1.0.11, pretty...@2.0.1, github-...@2.0.0, down...@4.3.1, yeoman-en...@1.2.7, gruntfil...@1.0.0, si...@1.17.1, inqu...@0.8.5)
└── y...@1.4.6 (titl...@1.0.0, array...@1.0.2, fig...@1.4.0, user...@1.1.1, o...@1.0.2, humaniz...@1.0.1, as...@0.9.2, yeoman-c...@1.0.1, sor...@1.2.2, string...@1.0.1, cross...@0.2.9, fin...@0.1.5, root-...@1.0.0, yo...@1.0.5, update-...@0.3.2, g...@2.9.2, npm-k...@1.2.0, packag...@1.2.0, me...@3.4.2, full...@1.1.1, confi...@0.3.2, ins...@0.5.3, yeoman-en...@1.2.7, yeoman...@1.4.0, inqu...@0.8.5)
I confirmed that both projects use the same npm.
$ which npm
/usr/local/opt/nvm/versions/node/v0.12.4/bin/npm

Julien Dubois

unread,
Oct 19, 2015, 11:55:18 AM10/19/15
to Matt Raible, JHipster dev team, Thibaut Mottet
Normally a "npm linked" in the cloned generator-jhipster project should do the trick -> maybe you shouldn't do "npm install" before? I'm not doing this

Matt Raible

unread,
Oct 19, 2015, 12:52:31 PM10/19/15
to Julien Dubois, JHipster dev team, Thibaut Mottet
I figured it out thanks to this guide: http://justjs.com/posts/npm-link-developing-your-own-npm-modules-without-tears

I had to run "npm link generator-jhipster" in the project I wanted to upgrade. I've created an issue and I'll submit a PR for it.

Matt Raible

unread,
Oct 19, 2015, 6:38:21 PM10/19/15
to Julien Dubois, JHipster dev team, Thibaut Mottet
After upgrading my project and re-generating one of my entities, I'm having issues with Elasticsearch and dates. I was previously using Joda Time.

Error
------
Tests run: 10, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 23.118 sec <<< FAILURE! - in org.jhipster.book.web.rest.EntryResourceTest
updateEntry(org.jhipster.book.web.rest.EntryResourceTest)  Time elapsed: 0.074 sec  <<< ERROR!
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.elasticsearch.index.mapper.MapperParsingException: failed to parse [date]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:651)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at org.springframework.test.web.servlet.TestDispatcherServlet.service(TestDispatcherServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.springframework.mock.web.MockFilterChain$ServletFilterProxy.doFilter(MockFilterChain.java:167)
at org.springframework.mock.web.MockFilterChain.doFilter(MockFilterChain.java:134)
at org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:156)
at org.jhipster.book.web.rest.EntryResourceTest.updateEntry(EntryResourceTest.java:248)
Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to parse [date]
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:409)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:554)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:487)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:544)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:493)
at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:480)
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:192)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:515)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:422)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: unknown property [offset]
at org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:533)
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:236)
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:399)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:554)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:487)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:544)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:493)
at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:480)
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:192)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:515)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:422)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)

Test
------
    private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Z"));

    private static final String DEFAULT_TITLE = "AAAAA";
    private static final String UPDATED_TITLE = "BBBBB";
    private static final String DEFAULT_CONTENT = "AAAAA";
    private static final String UPDATED_CONTENT = "BBBBB";

    private static final ZonedDateTime DEFAULT_DATE = ZonedDateTime.ofInstant(Instant.ofEpochMilli(0L), ZoneId.systemDefault());
    private static final ZonedDateTime UPDATED_DATE = ZonedDateTime.now(ZoneId.systemDefault()).withNano(0);
    private static final String DEFAULT_DATE_STR = dateTimeFormatter.format(DEFAULT_DATE);

    @Test
    @Transactional
    public void updateEntry() throws Exception {
        // Initialize the database
        entryRepository.saveAndFlush(entry);

int databaseSizeBeforeUpdate = entryRepository.findAll().size();

        // Update the entry
        entry.setTitle(UPDATED_TITLE);
        entry.setContent(UPDATED_CONTENT);
        entry.setDate(UPDATED_DATE);
        restEntryMockMvc.perform(put("/api/entrys")
                .contentType(TestUtil.APPLICATION_JSON_UTF8)
                .content(TestUtil.convertObjectToJsonBytes(entry)))
                .andExpect(status().isOk());

        // Validate the Entry in the database
        List<Entry> entrys = entryRepository.findAll();
        assertThat(entrys).hasSize(databaseSizeBeforeUpdate);
        Entry testEntry = entrys.get(entrys.size() - 1);
        assertThat(testEntry.getTitle()).isEqualTo(UPDATED_TITLE);
        assertThat(testEntry.getContent()).isEqualTo(UPDATED_CONTENT);
        assertThat(testEntry.getDate()).isEqualTo(UPDATED_DATE);
    }

The debug line in my EntryResource.java shows that Spring MVC is able to parse the date OK.

[DEBUG] org.jhipster.book.web.rest.EntryResource - REST request to update Entry : Entry{id=3, title='BBBBB', content='BBBBB', date='2015-10-19T22:34:58Z[GMT]'}

Matt Raible

unread,
Oct 19, 2015, 11:45:25 PM10/19/15
to Julien Dubois, JHipster dev team, Thibaut Mottet
Nevermind. I tried my upgraded branch on a different machine tonight and all tests passed. I also verified that adding Elasticsearch to jhipster-sample-app doesn't cause anything to break. Since it's Operation.java entity has a date, I ran "yo jhipster:entity" on all its entities (after doing npm link in the generator-jhipster project). Then I ran "mvn test" to confirm all tests passed.

Tests run: 48, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- jacoco-maven-plugin:0.7.4.201502262128:report (post-unit-test) @ sample-application ---
[INFO] Analyzed bundle 'sampleApplication' with 107 classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.636 s
[INFO] Finished at: 2015-10-19T21:29:58-06:00
[INFO] Final Memory: 52M/539M
[INFO] ------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages