| Summary: | add maven archetype | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Christian Huelsmeier <eclipse> | ||||
| Component: | Core | Assignee: | Project Inbox <xtend-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | clay, dennis.huebner, moritz.eysholdt, sven.efftinge | ||||
| Version: | 2.3.1 | Keywords: | helpwanted | ||||
| Target Milestone: | M5 | Flags: | sven.efftinge:
kepler+
|
||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 390073 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Christian Huelsmeier
contributions are most welcome ;-) Sven, I know ;-). It's on my task list, but I decided to enter a bug mostly to not forget it and to make the issue visible to the Xtend team ;-). Perfect! Looking forward to your contributions! Created attachment 221215 [details]
prototype of xtend maven archetype
I tested the attached archetype implementation against my local repository, e.g. mvn archetype:generate -DarchetypeGroupId=org.eclipse.xtend -DarchetypeArtifactId=xtend-maven-archetype-quickstart -DarchetypeVersion=2.3.1 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=local -DinteractiveMode=false After executing this command a maven project with a HelloXtend.xtend file has been created. hi christian, not sure but i think you can omit the build-helper-maven-plugin since the xtend-compiler mojo already adds the 2 src/test-src folders to the project. can you confirm this? thank you! (In reply to comment #5) > I tested the attached archetype implementation against my local repository, > e.g. > > mvn archetype:generate -DarchetypeGroupId=org.eclipse.xtend > -DarchetypeArtifactId=xtend-maven-archetype-quickstart > -DarchetypeVersion=2.3.1 -DgroupId=com.mycompany -DartifactId=myproject > -DarchetypeRepository=local -DinteractiveMode=false > > After executing this command a maven project with a HelloXtend.xtend file > has been created. Hi Michael, you're right. It could be omitted. I added it to the pom, because it src/main/xtend-gen wasn't on the build path after importing the project as a maven project in Eclipse. If the build-helper-maven-plugin is in the pom, the xtend-gen folder is on the build path. I don't now whether this is a bug in m2e or in the xtend-plugin or the behaviour is correct. btw. I forgot the following lines in the pom-Template: <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> Christian (In reply to comment #6) > hi christian, not sure but i think you can omit the > build-helper-maven-plugin since the xtend-compiler mojo already adds the 2 > src/test-src folders to the project. can you confirm this? > > thank you! > > > (In reply to comment #5) > > I tested the attached archetype implementation against my local repository, > > e.g. > > > > mvn archetype:generate -DarchetypeGroupId=org.eclipse.xtend > > -DarchetypeArtifactId=xtend-maven-archetype-quickstart > > -DarchetypeVersion=2.3.1 -DgroupId=com.mycompany -DartifactId=myproject > > -DarchetypeRepository=local -DinteractiveMode=false > > > > After executing this command a maven project with a HelloXtend.xtend file > > has been created. it's a missing feature of the existing xtend m2e extension i.e. we have to extend the existing lifecycleMappingMetadata with an org.eclipse.m2e.jdt.AbstractJavaProjectConfigurator to automatically add the xtend-gen folders to the build path. the build-helper-maven-plugin is only a workaround to accomplish the same (In reply to comment #7) > Hi Michael, > > you're right. It could be omitted. I added it to the pom, because it > src/main/xtend-gen wasn't on the build path after importing the project as a > maven project in Eclipse. If the build-helper-maven-plugin is in the pom, > the xtend-gen folder is on the build path. > I don't now whether this is a bug in m2e or in the xtend-plugin or the > behaviour is correct. > > btw. I forgot the following lines in the pom-Template: > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.3.2</version> > <configuration> > <source>1.5</source> > <target>1.5</target> > </configuration> > </plugin> > > Christian > > > (In reply to comment #6) > > hi christian, not sure but i think you can omit the > > build-helper-maven-plugin since the xtend-compiler mojo already adds the 2 > > src/test-src folders to the project. can you confirm this? > > > > thank you! > > > > > > (In reply to comment #5) > > > I tested the attached archetype implementation against my local repository, > > > e.g. > > > > > > mvn archetype:generate -DarchetypeGroupId=org.eclipse.xtend > > > -DarchetypeArtifactId=xtend-maven-archetype-quickstart > > > -DarchetypeVersion=2.3.1 -DgroupId=com.mycompany -DartifactId=myproject > > > -DarchetypeRepository=local -DinteractiveMode=false > > > > > > After executing this command a maven project with a HelloXtend.xtend file > > > has been created. ok. so (basically) the build-helper-maven-plugin can be omitted, but the maven-compiler-plugin config needs to be provided. should I provide more artefacts to successfully make the archetype available in the xtend maven repo? ;-) (In reply to comment #9) > should I provide more artefacts to successfully make the archetype available > in the xtend maven repo? ;-) We need your avatar as png or jpeg, which can be published within the xtend maven repository metadata. As this is a public repo please only licensed or self made photos. http://www.huelsmeier.info/profilfoto_christianhuelsmeier.jpg (In reply to comment #10) > (In reply to comment #9) > > should I provide more artefacts to successfully make the archetype available > > in the xtend maven repo? ;-) > We need your avatar as png or jpeg, which can be published within the xtend > maven repository metadata. As this is a public repo please only licensed or > self made photos. @Michael Could you please review the whole thing? So I can push and try it out in our maven build job. sure (In reply to comment #12) > @Michael > Could you please review the whole thing? So I can push and try it out in our > maven build job. Tried attached archetype with Juno SR1 right now, works very well! Thanks for contribution Christian! contribution applied in 'master': http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=7598225404ffc0f73b30a76e26525a88517af5de Thank you, Christian! Archetype catalog was published to build.eclipse.org. Add new remote catalog with eclipse m2e: URL: http://build.eclipse.org/common/xtend/maven/ Descr.: Xtend archetypes Start new m2e project wizard, select "Xtend archetypes" from the Catalog drop-down, activate "Include snapshot archetypes", select xtend-archetype, have fun. Requested via bug 522520. -M. |