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

Spring Boot 2 support #181

Closed
stephengibson83 opened this issue Aug 7, 2018 · 10 comments
Closed

Spring Boot 2 support #181

stephengibson83 opened this issue Aug 7, 2018 · 10 comments
Assignees
Milestone

Comments

@stephengibson83
Copy link

  • Framework version: 1.1.4
  • Implementations: Spring Boot

Is there a plan to support Spring Boot 2.0.x? If so, when will it be available?

The current maven archetype and sample are for Spring Boot 1.5.

@sapessi
Copy link
Collaborator

sapessi commented Aug 7, 2018

Hi @stephengibson83, Spring Boot 2 is not supported yet simply because we have not tested with it yet. When I was building the framework Spring Boot 2 was still in preview, there was no official RELEASE version. I do not know whether there are breaking changes. I'll take this as a feature request and work on it for release 1.3.

@sapessi sapessi self-assigned this Aug 7, 2018
@sapessi sapessi added this to the Release 1.3 milestone Aug 7, 2018
@sheltonn
Copy link

@sapessi Would you like some help? I was looking at the project and there are several changes that I am aware of.

@sapessi
Copy link
Collaborator

sapessi commented Aug 16, 2018

Hey @sheltonn - absolutely, always happy to accept pull requests. If the changes are breaking, we should consider breaking Spring Boot into a separate module. If you can type down a description of the changes here, we can work through a design together. I'm on the road for most of the day today but can take a look tonight.

@sheltonn
Copy link

Awesome. That is what I was thinking about the project. I may not be able to finish tonight, but I can definitely start.

@sapessi
Copy link
Collaborator

sapessi commented Aug 17, 2018

Oh I didn't mean finish. I just meant write down in this issue a description of what you plan to do and why so we can discuss together with other contributors @sheltonn

@sheltonn
Copy link

sheltonn commented Aug 17, 2018

I want to separate this module from the others, preferably in it's own project. I need to research the project code to determine how it really works to see if there are any improvements I can make. I would eat my own dog food by converting this project to be Spring Boot 2. I would rework all of the Junit tests to be more representative of what a Spring/Java would expect to see (Spring and MockMvc).

Also, the project didn't build for me from the parent or from the individual module.

Another option is to rework this project from the parent POM, then rework aws-serverless-java-container-core, etc until everything is updated.

What do you think?

@sapessi
Copy link
Collaborator

sapessi commented Aug 17, 2018

Implementing support for a new framework is relatively straightforward, take a look at #159 for Struts 2. If there are no breaking changes in how a Spring application is initialized in SpringBoot 2 compared to 1.x, then I'd rather keep it in the same spring module - this way customers won't have to learn a whole new thing.

Curious, what do you mean by converting this project to SpringBoot 2? Did you mean adding support for it? The project is intentionally independent from any framework and avoid reflection-based dependency injection to keep the cold start time under control.

What failed in the build? Are you using the master branch?

@sheltonn
Copy link

sheltonn commented Aug 17, 2018

Correct. I'm starting to get a grip on the project and how it works. The project should be using straight Java/EE, then adding the plumbing and the dependencies for the specific framework we are implementing.

I'm using master and having trouble just performing mvn clean on the parent module. I think the most value I can provide is to start with the top of the project and tweak the POMs.

UPDATE: I think the problem is caused by having the archetypes directory. They should be directly under the parent. Maybe add Archetype into the names of the modules?

/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/norris.shelton/IdeaProjects/aws/aws-serverless-java-container -Dmaven.home=/Applications/ideaIU-182.4129.26.app/Contents/plugins/maven/lib/maven3 -Dclassworlds.conf=/Applications/ideaIU-182.4129.26.app/Contents/plugins/maven/lib/maven3/bin/m2.conf -Didea.launcher.port=55581 -Didea.launcher.bin.path=/Applications/ideaIU-182.4129.26.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Applications/ideaIU-182.4129.26.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar:/Applications/ideaIU-182.4129.26.app/Contents/lib/idea_rt.jar com.intellij.rt.execution.application.AppMainV2 org.codehaus.classworlds.Launcher -Didea.version=2018.2.2 --errors --update-snapshots clean
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-jersey-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-spark-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-spring-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-springboot-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13
 @ 
[ERROR] The build could not read 4 projects -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-jersey-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-spark-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-spring-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13
[FATAL] Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-springboot-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13

	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
	...
[ERROR]   
[ERROR]   The project com.amazonaws.serverless.archetypes:aws-serverless-jersey-archetype:1.2-SNAPSHOT (/Users/norris.shelton/IdeaProjects/aws/aws-serverless-java-container/archetypes/jersey/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-jersey-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT
	at ...
[ERROR]   
[ERROR]   The project com.amazonaws.serverless.archetypes:aws-serverless-spark-archetype:1.2-SNAPSHOT (/Users/norris.shelton/IdeaProjects/aws/aws-serverless-java-container/archetypes/spark/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-spark-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT
	at ...
[ERROR]   
[ERROR]   The project com.amazonaws.serverless.archetypes:aws-serverless-spring-archetype:1.2-SNAPSHOT (/Users/norris.shelton/IdeaProjects/aws/aws-serverless-java-container/archetypes/spring/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-spring-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT
	at ...
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT
	at ...
[ERROR]   
[ERROR]   The project com.amazonaws.serverless.archetypes:aws-serverless-springboot-archetype:1.2-SNAPSHOT (/Users/norris.shelton/IdeaProjects/aws/aws-serverless-java-container/archetypes/springboot/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.amazonaws.serverless.archetypes:aws-serverless-springboot-archetype:1.2-SNAPSHOT: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT
	at ...
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.amazonaws.serverless:aws-serverless-java-container:pom:1.2-SNAPSHOT
	at ...
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Process finished with exit code 1

@sapessi
Copy link
Collaborator

sapessi commented Aug 17, 2018

Mh, this builds fine for me from the main pom. I suspect this is because it expects the 1.2-SNAPSHOT to be already available in your local maven cache as it builds the archetypes. What happens if you run mvn install without clean?

Let's take this to the Gitter room

@sapessi
Copy link
Collaborator

sapessi commented Dec 20, 2018

Hey @sheltonn, @stephengibson83 - I've added a springboot2 sample in the core branch of this repo. I will work on an archetype too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants