javaee-samples / javaee7-samples

Java EE 7 Samples
https://travis-ci.org/javaee-samples/javaee7-samples
Other
2.51k stars 1.66k forks source link

Importing in Eclipse occur 2 error #248

Closed huguangju closed 9 years ago

huguangju commented 10 years ago

1.After import project in eclipse, project's maven structure will in a mess, like this: image

2.In sub module pom.xml, like in dynamicproxy/pom.xml, occur maven error: image

How can i resolve it?

bartoszmajsak commented 10 years ago

Mismatch in the package names are due to incorrect import to Eclipse. You somehow made "main" folder as the root package of the project, which should not be the case. How did you imported this project to Eclipse?

Second problem is definitely not an error -> it only means that you are missing m2e connector (you can find it using "Discover .." option suggested as quick fix. Well... that's the main problem with Eclipse/Maven integration...

huguangju commented 10 years ago

Thank you for your patience Reply. First problem: I use this method to import project: File->import->import->Maven->Existing Maven Projects->select javaee7-samples/concurrency directory->Finish;then in Markers panel it show many maven dependency problem, Mainly for these:

ArtifactDescriptorException: Failed to read artifact descriptor for org.wildfly:wildfly-arquillian-container-remote:jar:8.0.0.Final: UnresolvableModelException: Failure to transfer 

ArtifactTransferException ... ... 

Missing artifact ... ...

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile)

No marketplace entries found to handle maven-compiler-plugin:3.1:compile in Eclipse.  Please see Help for more information.

etc.

I use Eclipse luna 4.4.0, maven 3.0.5

huguangju commented 10 years ago

I forgot the first step, convert source to Eclipse project:

mvn eclipse:eclipse

But still wrong

bartoszmajsak commented 10 years ago

Thanks, I will take a look.

maxandersen commented 10 years ago

we are looking into this - the groovy compiler messes up the import unless you have groovy jdt installed which in my opinion should NOT be a requirement to try out these examples.

I've started a fork at https://github.com/maxandersen/javaee7-samples/tree/reduce_groovy_impact to fix it - still not there yet.

maxandersen commented 10 years ago

btw. mvn eclipse:eclipse will never work for this. you need to use m2e import.

bartoszmajsak commented 10 years ago

I thought #244 fixed this problem. Thanks @maxandersen for stepping in!

I agree it shouldn't be the requirement, especially considering the fact the we are still not using Spock for testing that heavily ;)

maxandersen commented 10 years ago

sorry got stuck in doing release - #244 kinda just made it worse since now its fully required.

good to hear spock is not currently priority - i got a prototype locally i'll try get cleaned up that removes all this required for all projects groovy funkyness.