Search Results

Search found 56 results on 3 pages for 'archetype'.

Page 1/3 | 1 2 3  | Next Page >

  • Maven struts2 modular archetype failing to generate !

    - by Xinus
    I am trying to generate struts 2 modular archetype using maven but always getting error as archetype not present here is a full output : C:\Users\Administrator>mvn archetype:generate [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:generate] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus .velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [archetype:generate {execution: default-cli}] [INFO] Generating project in Interactive mode [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven. archetypes:maven-archetype-quickstart:1.0) Choose archetype: 1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web applicati on with Hibernate, Spring and JSF) 2: internal -> appfuse-basic-spring (AppFuse archetype for creating a web applic ation with Hibernate, Spring and Spring MVC) 3: internal -> appfuse-basic-struts (AppFuse archetype for creating a web applic ation with Hibernate, Spring and Struts 2) 4: internal -> appfuse-basic-tapestry (AppFuse archetype for creating a web appl ication with Hibernate, Spring and Tapestry 4) 5: internal -> appfuse-core (AppFuse archetype for creating a jar application wi th Hibernate and Spring and XFire) 6: internal -> appfuse-modular-jsf (AppFuse archetype for creating a modular app lication with Hibernate, Spring and JSF) 7: internal -> appfuse-modular-spring (AppFuse archetype for creating a modular application with Hibernate, Spring and Spring MVC) 8: internal -> appfuse-modular-struts (AppFuse archetype for creating a modular application with Hibernate, Spring and Struts 2) 9: internal -> appfuse-modular-tapestry (AppFuse archetype for creating a modula r application with Hibernate, Spring and Tapestry 4) 10: internal -> maven-archetype-j2ee-simple (A simple J2EE Java application) 11: internal -> maven-archetype-marmalade-mojo (A Maven plugin development proje ct using marmalade) 12: internal -> maven-archetype-mojo (A Maven Java plugin development project) 13: internal -> maven-archetype-portlet (A simple portlet application) 14: internal -> maven-archetype-profiles () 15: internal -> maven-archetype-quickstart () 16: internal -> maven-archetype-site-simple (A simple site generation project) 17: internal -> maven-archetype-site (A more complex site project) 18: internal -> maven-archetype-webapp (A simple Java web application) 19: internal -> jini-service-archetype (Archetype for Jini service project creat ion) 20: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype) 21: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no persistence) Archetype) 22: internal -> softeu-archetype-jsf (JSF+Facelets Archetype) 23: internal -> jpa-maven-archetype (JPA application) 24: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype) 25: internal -> confluence-plugin-archetype (Atlassian Confluence plugin archety pe) 26: internal -> jira-plugin-archetype (Atlassian JIRA plugin archetype) 27: internal -> maven-archetype-har (Hibernate Archive) 28: internal -> maven-archetype-sar (JBoss Service Archive) 29: internal -> wicket-archetype-quickstart (A simple Apache Wicket project) 30: internal -> scala-archetype-simple (A simple scala project) 31: internal -> lift-archetype-blank (A blank/empty liftweb project) 32: internal -> lift-archetype-basic (The basic (liftweb) project) 33: internal -> cocoon-22-archetype-block-plain ([http://cocoon.apache.org/2.2/m aven-plugins/]) 34: internal -> cocoon-22-archetype-block ([http://cocoon.apache.org/2.2/maven-p lugins/]) 35: internal -> cocoon-22-archetype-webapp ([http://cocoon.apache.org/2.2/maven- plugins/]) 36: internal -> myfaces-archetype-helloworld (A simple archetype using MyFaces) 37: internal -> myfaces-archetype-helloworld-facelets (A simple archetype using MyFaces and facelets) 38: internal -> myfaces-archetype-trinidad (A simple archetype using Myfaces and Trinidad) 39: internal -> myfaces-archetype-jsfcomponents (A simple archetype for create c ustom JSF components using MyFaces) 40: internal -> gmaven-archetype-basic (Groovy basic archetype) 41: internal -> gmaven-archetype-mojo (Groovy mojo archetype) Choose a number: (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/2 4/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41) 15: : 8 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] The defined artifact is not an archetype [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Sat Mar 27 08:22:38 IST 2010 [INFO] Final Memory: 8M/21M [INFO] ------------------------------------------------------------------------ C:\Users\Administrator> What can be the problem ?

    Read the article

  • Missing archetype.xml in new archetype created from project.

    - by sdoca
    Hi, I am using Maven 2.2.1. and am new to Maven. I am trying to create an archetype based on an existing project. I have been using this blog post as a guide: http://blog.inflinx.com/category/m2eclipse/ Step 7 says "The next step is to verify that the generated archetype.xml (located under srcmainresourcesMETA-INFmaven (sic)) has all the files listed and they are located in the right directories." My generated archetype does not have an archetype.xml. It does have an archetype-metadata.xml file though. There aren't any errors in the output from calling archetype:create-from-project, just a couple of warnings about using platform encoding (Cp1252). Any thoughts on why this file wasn't generated? Thanks in advance!

    Read the article

  • while creating archetype getting following error

    - by munna
    D:\Training\workspace\vppsourcemvn archetype:generate -B -DarchetypeGroupId=org .appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts-archetype -Darc hetypeVersion=2.1.0-M1 -DgroupId=com.vmware -DartifactId=vpp [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:generate] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] [archetype:generate {execution: default-cli}] [INFO] Generating project in Batch mode [WARNING] Error reading archetype catalog http://repo1.maven.org/maven2 org.apache.maven.wagon.TransferFailedException: Error transferring file: Connect ion timed out: connect at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:143) at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:11 6) at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61) at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:97) at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D efaultArchetypeManager.java:195) at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D efaultArchetypeManager.java:184) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB yCatalog(DefaultArchetypeSelector.java:278) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp e(DefaultArchetypeSelector.java:69) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu te(CreateProjectFromArchetypeMojo.java:186) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC onnection.java:860) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne ction.java:801) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection .java:726) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:1049) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373 ) at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:115) ... 28 more [WARNING] No archetype found in Remote catalog. Defaulting to internal Catalog [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 46 seconds [INFO] Finished at: Wed Jun 09 16:11:07 IST 2010 [INFO] Final Memory: 11M/28M [INFO] ------------------------------------------------------------------------

    Read the article

  • Java & Maven generating -and using- my own archetype

    - by Random
    Hello again! I have been busy in my project creating a webapp (in struts) that manages maven, using maven-2.2.1-uber.jar link text. The problem comes when the boss says it has to use some archetypes the company has created (so no predefined archetypes for you naughty boy!). So ok, I use the -DarchetypeRepository option (with ServletWrapper I get my complete web direction, becouse the repository will be inside the app), and the log seems to find it, but then the build fails -miserably- with this little text 'Build Failure - The defined artifact is not an archetype' as simple as that. Of course I have a lot of INFO lines that say abslutily nothig related. I have read the maven definitive guide searching for some kind of help, but it has been disapointing at best. My thoughts are thatmaybe I am missing in somewhere of all the folders tree some xml that actually sais maven that my pom.xml is an archetype not a project. But I really, really, can't find anything on the net or in the manuals that explains easy-handed how the archetype:generate (with special parameters) works and where I have to put every folder and/or file. So just to say my thoughts aloud (and hopefully you understand what I am trying to ask): I have a template where I do some xml changes (variables, etc...), then I have to call maen and do an archetype:generate with a variable project. The problem seems to be that my actual confuguration doesn't like what I am doing. After the generation of the archetype, witch luckly will create some directory trees and leave me a POM.xml somewhere I still have to do some variable changes and more xml manage stuff, so it whould be very kind from maven to don't destroy anything in this process. Any ideas why this maven-thing is not happly-ever-after asuming that my archetype is defintly an archetype? Allthought I think the code is ok, it could be wrong, as I am using maven-ubber and I call the actual CSMavenCli.main(String[, ClassWorld), I don't think it is the case this time. Thanks and all! :) Random.

    Read the article

  • How to create empty folders with maven archetype?

    - by chrsk
    There is an existing issue for this approach, located on Codehaus JIRA #ARCHETYPE-57, but all instructions listed in this ticket failed for me. Also the blog post of marekdec How to get maven archetype to generate empty directories fails for me. The trick within the archetype.xml with the trailing / doesnt works for me: <resources> <resource>src/main/webapp/</resource> Unable to find resource 'archetype-resources/src/main/webapp/' Also the fileSet directory in archetype-metadata.xml does not work for me: <fileSet filtered="true" encoding="UTF-8"> <directory>src/main/webapp/</directory> </fileSet> Is there any other solution? Or did i miss something? Thanks

    Read the article

  • Howto create dynamic named folders with Maven2 Archetype?

    - by chrsk
    Hey, i try to build a structure like this +---src +---main +---webapp +---WEB-INF +---cfg ¦ +---log4j ¦ +---resources ¦ +---extensions ¦ +---${artifactIdKey}-business ¦ +---${artifactIdKey}-layout +---lib I added a required property to my archetype-metadata.xml to have an short-name for the project, which is used among other things for generating unique folders. <requiredProperties> <requiredProperty key="artifactIdKey" /> </requiredProperties> The property artifactIdKey i use in a fileSet: <fileSet> <directory>[..]/resources/extensions/${artifactIdKey}-business</directory> </fileSet> <fileSet> <directory>[..]/resources/extensions/${artifactIdKey}-layout</directory> </fileSet> The command to generate the archetype: mvn archetype:generate -B \ -DgroupId=com.stackoverflow \ -DartifactId=stackoverflow-question -DarchetypeGroupId=com.stackoverflow \ -DarchetypeArtifactId=stackoverflow-archetype -DarchetypeVersion=1.0 \ -DartifactIdKey=soq I assume to get the following folder structure, but i get the ${artifactIdKey} property as folder. Without beeing replaces. ..\ +---soq-business +---soq-layout ..\ +---${artifactIdKey}-business +---${artifactIdKey}-layout How can i achieve this? And how can i place files below soq-business? Without knowing the folder name at this time?

    Read the article

  • Maven archetype for basic spring hibernate struts2 application

    - by Shekhar
    Hello I am looking for a basic maven archetype which can help me create a spring hibernate struts2 application. I have tried using appfuse but it sucks. It took more than half an hour to download n number of dependencies and the project it created was having errors also. if you know anyother maven archetype please tell me. Thanks Shekhar

    Read the article

  • Maven archetype from project - how to preserve package names ?

    - by lisak
    Hey, I'm trying to grab my project and generate an Archetype from it via : archetype:create-from-project The thing is, that my project has src/main/java package structure com.sample.app, but the archetype must have it as I want (org.example.game) ... Ideally as user want when generating the project from archetype, but that is impossible I suppose. It would have to grab groupId and artifactId and generate archetype-resources/src/main/java based on this input. Anyway, that's why there is this argument I suppose : packageName mvn archetype:create-from-project -DpackageName=org.example.game But it doesn't work and there is still archetype-resources/src/main/java/org/sample/game ..

    Read the article

  • Edit source files with custom maven archetype

    - by Scobal
    I have created a customer maven archetype and have it setup with some custom requiredProperties: <requiredProperties> <requiredProperty key="classPrefix" /> </requiredProperties> I can use that property to name a file, like so: __classPrefix__Config.java My question is can I use that property inside the file. I've tried the following two variations but neither work: public class ${classPrefix}Config public class __classPrefix__Config

    Read the article

  • maven-archetype-webapp eclipse problem

    - by Bruce
    Hi all, I'm trying to create a very simple webapp with maven and eclipse, but I'm having no joy at all, in fact the reverse of joy. I go to File - New Project, select Maven Project, and select the maven-archetype-webapp. When I finish the wizard, a webapp structure gets generated but with no 'java' directory under main, just resources and webapp. So I right click on main and select new Class. The class gets created under resources (?!), and furthermore, there seems to be no compilation of it by java. I can make stupid errors and no syntax highlighting comes up. It's like java isn't recognizing it. Alternatively I have tried creating a new 'java' directory under main where it should be, but still with the same non-existent java symptoms. What gives? This is driving me insane.. Thanks all!

    Read the article

  • New project created with Flex Mojo's archetype throws Cannot Find Parent Project-Maven Exception

    - by ignorant
    This is probably a silly question but I just cant seem to figure out. I'm completely new to flex and maven. Maven 2.2.1: Maven 2.2.1 unzipped,M2_HOME set and repository altered to point to different drive location in settings.xml Flex 4.0: Installed Created a multi-modular webapp project using flexmojo: mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/flexgroup -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-modular-webapp -DarchetypeVersion=RELEASE with following options groupId=com.test artifactId=test version=1.0-snapshot package=com.tests * Creates * test |-- pom.xml |--swc -pom.xml |--swf -pom.xml `--war -pom.xml Parent pom has swc, swf, war as modules. Dependency is war-swf-swc. With parent artifactId of swf, swc, war set to swf, swc, test respectively. On executing mvn on test folder(for that matter clean or anything) I get this following error. G:\Projects\testmvn -e + Error stacktraces are turned on. [INFO] Scanning for projects... Downloading: http://repo1.maven.org/maven2/com/test/swc/1.0-snapshot/swc-1.0-snapshot.pom [INFO] Unable to find resource 'com.test:swc:pom:1.0-snapshot' in repository central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. GroupId: com.test ArtifactId: swc Version: 1.0-snapshot Reason: Unable to download the artifact from any repository com.test:swc:pom:1.0-snapshot from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.test:swc for project: com.test:swc-swc:swc:1.0-snapshot for project com.test:swc-swc:swc:1.0-snapshot at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.test:swc for project: com.test:swc-swc:swc:1.0-snapshot for project com.test:swc-swc:swc:1.0-snapshot at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396) at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391) ... 12 more Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.test:swc' not found in repository: Unable to download the artifact from any repository com.test:swc:pom:1.0-snapshot from the specified remote repositories: central (http://repo1.maven.org/maven2) for project com.test:swc at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605) at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392) ... 19 more Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository com.test:swc:pom:1.0-snapshot from the specified remote repositories: central (http://repo1.maven.org/maven2) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558) ... 20 more Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216) ... 22 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Tue Jun 15 19:22:15 GMT+02:00 2010 [INFO] Final Memory: 1M/2M [INFO] ------------------------------------------------------------------------ Looks like its trying to download the project from maven's central repository instead of building it. What am I missing?

    Read the article

  • Overwrite archetypes in Maven

    - by Random
    Hello again! I'm having some trouble using Maven for my archetypes and I will need to overwrite some. I launch an instruction that does an archetype:generate in an archetype already existing directory. Is there a parameter that let's me overwrite existing archetypes? I have search the maven definitve guide but it states that the only parameters accepted are: -DgroupId -DartifactId -Dversion -DpackageName -DarchetypeGroupId -DarchetypeArtifactId -DarchetypeVersion -DinteractiveMode I could just search the directory and delete the files, but this proccess is going to be done automatically (so no human involved, no brains involved) and I wouldn't like he machine deleting things around. Thanks for all! Edit: I almost forgot, here is some maven trace: [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:generate] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [archetype:generate {execution: default-cli}] [INFO] Generating project in Batch mode [INFO] Archetype defined by properties [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating OldArchetype: archetype-foo-lib:1.0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: foo.tecnologia [INFO] Parameter: packageName, Value: foo.tecnologia [INFO] Parameter: basedir, Value: C:\temp\Desarrollo [INFO] Parameter: package, Value: foo.tecnologia [INFO] Parameter: version, Value: 1.0 [INFO] Parameter: artifactId, Value: Foo-Lib-Test [ERROR] Directory Foo-Lib-Test already exists - please run from a clean directory org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Directory Foo-Lib-Test already exists - please run from a clean directory at org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(DefaultOldArchetype.java:242) at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processOldArchetype(DefaultArchetypeGenerator.java:253) at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:143) at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:286) at org.apache.maven.archetype.DefaultArchetype.generateProjectFromArchetype(DefaultArchetype.java:69) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:184) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at com.foo.model.CSMavenCli.main(CSMavenCli.java:391) at com.foo.model.MavenAdmin.generateArchetype(MavenAdmin.java:399) at com.foo.model.ValidarPom.validarPom(ValidarPom.java:167) at com.foo.prueba.GenerarPOM.execute(GenerarPOM.java:93) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] : org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Directory Foo-Lib-Test already exists - please run from a clean directory Directory Foo-Lib-Test already exists - please run from a clean directory [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Fri Apr 09 10:01:33 CEST 2010 [INFO] Final Memory: 15M/28M [INFO] ------------------------------------------------------------------------

    Read the article

  • How to generate an ear file from a maven-archetype-webapp artifact?

    - by Mike
    I currently have a project built with maven-archetype-webapp artifact. The default packaging for this project is war. Is it possible for me to insert the maven-ear-plugin in this webapp pom.xml generate an ear file that contains this project war? I tried that, but the war file doesn't get embedded in the generated ear file. It has everything except the war file. I read many Maven related articles, and perhaps I could use maven-archetype-j2ee-simple artifact. However, I'm reluctant to this use for 2 reasons:- This artifact handles ejbs and all the extra features that I don't use. It makes my project looks bloated. Second, it seems like it requires me to install the web module into the repository first before I can create the ear file. Is this the preferred way to create an ear file? How do I create an ear file that contains the war file using maven-ear-plugin from my webapp's pom.xml? If this way is not possible, what's the preferred way? I'm sorry if my questions sound a little novice, I realized I have whole lot more to learn about Maven. Thanks much.

    Read the article

  • Why does this Maven command produce a LifecycleExecutionException?

    - by ovr
    COMMAND: mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate \ -DarchetypeGroupId=org.beardedgeeks \ -DarchetypeArtifactId=gae-eclipse-maven-archetype \ -DarchetypeVersion=1.1.2 \ -DarchetypeRepository=http://beardedgeeks.googlecode.com/svn/repository/releases ERROR: + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Internal error in the plugin manager getting plugin 'org.apache.maven.plugins:maven-archetype-plugin': Plugin 'org.apache.maven .plugins:maven-archetype-plugin:2.0-alpha-4' has an invalid descriptor: 1) Plugin's descriptor contains the wrong group ID: net.kindleit 2) Plugin's descriptor contains the wrong artifact ID: maven-gae-plugin 3) Plugin's descriptor contains the wrong version: 0.5.9 [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager getting plugin 'org.apache.maven.plugins: maven-archetype-plugin': Plugin 'org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4' has an invalid descriptor: 1) Plugin's descriptor contains the wrong group ID: net.kindleit 2) Plugin's descriptor contains the wrong artifact ID: maven-gae-plugin 3) Plugin's descriptor contains the wrong version: 0.5.9 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1544) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.PluginManagerException: Plugin 'org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4' has an invalid descriptor: 1) Plugin's descriptor contains the wrong group ID: net.kindleit 2) Plugin's descriptor contains the wrong artifact ID: maven-gae-plugin 3) Plugin's descriptor contains the wrong version: 0.5.9 at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:330) at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:224) at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184) at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540) ... 15 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Wed Jun 09 19:45:30 CEST 2010 [INFO] Final Memory: 3M/15M [INFO] ------------------------------------------------------------------------

    Read the article

  • Ruby on Rails equivalent for Maven Archetypes

    - by Drew
    Maven Archetypes are handy ways to get a project up and going in no time flat. Rails is kinda like an archetype in and of itself. However, I'm curious to know if there are any Rails equivalents for Maven Archetypes. For example, I want to create an Archetype with full authentication already built in via Authlogic. With Maven Archetypes I would need to build a project with it already ready to go, create my archetype and start working back parameterizing things that should be parameterized. Then anyone can make a Rails project with Authlogic set up by filling out a few questions during the archetype generate command and boom! Fully functional Rails app with Authlogic built in. Is there a Rails Equivalent? Are Generators expected to do this? Is this just not Rails-y?

    Read the article

  • Does this Maven plugin really have an invalid descriptor?

    - by ovr
    COMMAND: mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.beardedgeeks -DarchetypeArtifactId =gae-eclipse-maven-archetype -DarchetypeVersion=1.1.2 -DarchetypeRepository=http://beardedgeeks.googlecode.com/svn/repository/release s OUTPUT: [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Internal error in the plugin manager getting plugin 'org.apache.maven.plugins:maven-archetype-plugin': Plugin 'org.apache.maven .plugins:maven-archetype-plugin:2.0-alpha-4' has an invalid descriptor: 1) Plugin's descriptor contains the wrong group ID: net.kindleit 2) Plugin's descriptor contains the wrong artifact ID: maven-gae-plugin 3) Plugin's descriptor contains the wrong version: 0.5.9 [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Wed Jun 09 20:48:35 CEST 2010 [INFO] Final Memory: 3M/15M [INFO] ------------------------------------------------------------------------ I have a hard time believing this Maven plugin has an invalid descriptor since other people seem to be using it with no problem. Am I doing something wrong?

    Read the article

  • Cloning just a particular directory with hg?

    - by leeand00
    I come from a Subversion background, but I am slowly migrating to Mercurial. When starting on many of my projects, I would setup a development environment that was configured to a particular starting point in developing an app/webapp/program (much like a Maven 2 archetype, but not necessarily Java/Maven). Later I would checkout this archetype/template project out of my svn repo by its particular path; and than export the working copy from version control by the repository; so that I could import the working copy back in to another repository without adding the changes that I made to the working copy to the base the template/archetype project. I've tried doing the same thing in Mercurial, and I've run into a wall since I can't check out, er..um..no, clone a specific path from the hg repository. If I want to achieve the same sort of functionality using Mecurial, what should I do? Use tagged branches? The archetypes/template projects are very different, but I'd like to keep them in the same repository.

    Read the article

  • Maven2 problem to access plugins repository !

    - by achraf
    Hi, i just come to install maven2, after configuring the settings.xml in ${user.home}/.m2 and fixing a proxy error. Now by executing the command : mvn -U archetype:create -DgroupId=maven-test -DartifactId=maven-test -DpackageName=net.ensode.maventest i get this error : [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri eved from repository: central due to an error: Authorization failed: Access deni ed to: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml [INFO] Repository 'central' will be blacklisted [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi st or no valid version could be found [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Thu Apr 29 16:05:40 CEST 2010 [INFO] Final Memory: 2M/247M [INFO] ------------------------------------------------------------------------ any idea of what could cause it ? thanks !

    Read the article

  • Problem with Eclipse and a Maven multi-module project

    - by earth
    I have created a Maven project with the following structure: + root-project pom.xml (pom) + sub-projectA (jar) + sub-projectB (jar) I have done the following steps: mvn archetype:create –DgroupId=my.group.id –DartifactId=root-project mvn archetype:create –DgroupId=my.group.id –DartifactId=sub-projectA mvn archetype:create –DgroupId=my.group.id –DartifactId=sub-projectB So I have, obviously, in the top-level pom.xml the following elements: <modules> <module>sub-projectA</module> <module>sub-projectB</module> </modules> The last step was: mvn eclipse:clean eclipse:eclipse Now if I import the root-project in Eclipse, it seems to look at my projects as resources and not like java projects. However if I import each of child projects sub-projectA and sub-projectB, it looks them like java projects. This is a big problem for me because I have a deeper hierarchy. Any help would be appreciated!

    Read the article

  • First impressions of Scala

    - by Scott Weinstein
    I have an idea that it may be possible to predict build success/failure based on commit data. Why Scala? It’s a JVM language, has lots of powerful type features, and it has a linear algebra library which I’ll need later. Project definition and build Neither maven or the scala build tool (sbt) are completely satisfactory. This maven **archetype** (what .Net folks would call a VS project template) mvn archetype:generate `-DarchetypeGroupId=org.scala-tools.archetypes `-DarchetypeArtifactId=scala-archetype-simple `-DremoteRepositories=http://scala-tools.org/repo-releases `-DgroupId=org.SW -DartifactId=BuildBreakPredictor gets you started right away with “hello world” code, unit tests demonstrating a number of different testing approaches, and even a ready made `.gitignore` file - nice! But the Scala version is behind at v2.8, and more seriously, compiling and testing was painfully slow. So much that a rapid edit – test – edit cycle was not practical. So Lab49 colleague Steve Levine tells me that I can either adjust my pom to use fsc – the fast scala compiler, or use sbt. Sbt has some nice features It’s fast – it uses fsc by default It has a continuous mode, so  `> ~test` will compile and run your unit test each time you save a file It’s can consume (and produce) Maven 2 dependencies the build definition file can be much shorter than the equivalent pom (about 1/5 the size, as repos and dependencies can be declared on a single line) And some real limitations Limited support for 3rd party integration – for instance out of the box, TeamCity doesn’t speak sbt, nor does IntelliJ IDEA Steeper learning curve for build steps outside the default Side note: If a language has a fast compiler, why keep the slow compiler around? Even worse, why make it the default? I choose sbt, for the faster development speed it offers. Syntax Scala APIs really like to use punctuation – sometimes this works well, as in the following map1 |+| map2 The `|+|` defines a merge operator which does addition on the `values` of the maps. It’s less useful here: http(baseUrl / url >- parseJson[BuildStatus] sure you can probably guess what `>-` does from the context, but how about `>~` or `>+`? Language features I’m still learning, so not much to say just yet. However case classes are quite usefull, implicits scare me, and type constructors have lots of power. Community A number of projects, such as https://github.com/scalala and https://github.com/scalaz/scalaz are split between github and google code – github for the src, and google code for the docs. Not sure I understand the motivation here.

    Read the article

  • Having a white space issue with scala, I think?

    - by Uruhara747
    I'm trying to write a script to make generating Lift projects quicker but I believe i'm running into a white space issue. val strLiftGen = "mvn archetype:generate -U-DarchetypeGroupId=net.liftweb\ -DarchetypeArtifactId=lift-archetype-blank\ -DarchetypeVersion=1.0\ -DremoteRepositories=http://scala-tools.org/repo-releases-DgroupId=" + args(0)"-DartifactId=" + args(1)"-Dversion=1.0-SNAPSHOT */" Anyone care to hit the newb with the stick of wisdom and tell me a smart way of handling a long string like this?

    Read the article

  • Why maven requires so many options to create a hello world project,can you recommend a more dedicate

    - by user198729
    Quoted from here: mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple \ -DartifactId=simple \ -DpackageName=org.sonatype.mavenbook \ -Dversion=1.0-SNAPSHOT And I also have to specify an archetype number... It seems that maven isn't satisfied to be just a Java build tool,but want to control all aspect of developing... Can someone recommend a really dedicated build tool for Java?

    Read the article

1 2 3  | Next Page >