1) Add the Plugin "Maven Archetype Catalogs" to Intelij
1.1) File -> Settings -> Plugins -> Browse repositories...
1.2) Search for "Maven archetype" and look for the "Maven Archetype Catalogs"
1.3) Click on Install button of that plugin. After finished click the restart intelij button
2) Create a New Project on Intelij based on Spring Boot Simple Archetype
2.1) File -> New -> Project
2.2) Check the option "Create from archetype" and click the Add Archetype button
2.3) Fill the fields with the archtetype information you want o use
GroupId: org.springframework.boot
ArtifactId: spring-boot-sample-simple-archetype
Version: 1.0.2.RELEASE
Repository: http://central.maven.org/maven2/
2.4) Click OK
This will tell the intelij to download the new archetype and create a new maven project based on this archetype you selected, in this case will generate a project using Spring Boot CommandLinner
Answer from brunocrt on Stack OverflowI want to create my custom maven-archetype in Intellij. Like maven-archetype-quickstart which create automatically a package with App.java and put in pom.xml dependency junit.
I want my custom archetype to create a specific tree with specific classes and in pom.xml to have some dependency and plugins. And every time when I create a maven-project with my custom archetype, to starts with that structure.
How can I do that?
If something is not clear please tell me and I will try to add more information.
How to use maven archetype in intellij idea, such as spring-mvc-quickstart-archetype? - Stack Overflow
IntelliJ new project - maven archetype list empty - Stack Overflow
java - maven quickstart in intellij idea - Stack Overflow
Maven Archetype change in intellij - Stack Overflow
Videos
1) Add the Plugin "Maven Archetype Catalogs" to Intelij
1.1) File -> Settings -> Plugins -> Browse repositories...
1.2) Search for "Maven archetype" and look for the "Maven Archetype Catalogs"
1.3) Click on Install button of that plugin. After finished click the restart intelij button
2) Create a New Project on Intelij based on Spring Boot Simple Archetype
2.1) File -> New -> Project
2.2) Check the option "Create from archetype" and click the Add Archetype button
2.3) Fill the fields with the archtetype information you want o use
GroupId: org.springframework.boot
ArtifactId: spring-boot-sample-simple-archetype
Version: 1.0.2.RELEASE
Repository: http://central.maven.org/maven2/
2.4) Click OK
This will tell the intelij to download the new archetype and create a new maven project based on this archetype you selected, in this case will generate a project using Spring Boot CommandLinner
What do you mean how to use it? Just import an existing maven project into your IDE after you've created it using the archetype.
http://wiki.jetbrains.net/intellij/Creating_and_importing_Maven_projects
Maven's JRE is running out of memory.
Under Build → Build Tools → Maven → Importing, set VM options for importer to -Xmx1024m (the default vaule -Xmx512m is too low).
Switch Java runtimes
I had the same problem. My solution was, change the JRE in Settings → Maven → Importing → JDK for Importer. Switch from "Internal JRE" to "External JRE".
[ 70091] ERROR - plication.impl.ApplicationImpl - java.lang.OutOfMemoryError: GC overhead limit exceeded
java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:134)
at com.intellij.execution.rmi.RemoteUtil.access$100(RemoteUtil.java:36)
at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:105)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:181)
at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:102)
at com.sun.proxy.$Proxy101.getArchetypes(Unknown Source)
at org.jetbrains.idea.maven.server.MavenIndexerWrapper$7.execute(MavenIndexerWrapper.java:168)
at org.jetbrains.idea.maven.server.MavenIndexerWrapper$7.execute(MavenIndexerWrapper.java:165)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
at org.jetbrains.idea.maven.server.MavenIndexerWrapper.getArchetypes(MavenIndexerWrapper.java:165)
at org.jetbrains.idea.maven.indices.MavenIndicesManager.getArchetypes(MavenIndicesManager.java:308)
at org.jetbrains.idea.maven.wizards.MavenArchetypesStep$6.run(MavenArchetypesStep.java:239)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3664)
at java.lang.String.<init>(String.java:201)
at org.apache.lucene.index.TermBuffer.toTerm(TermBuffer.java:122)
at org.apache.lucene.index.SegmentTermEnum.term(SegmentTermEnum.java:167)
at org.apache.lucene.index.SegmentMergeInfo.next(SegmentMergeInfo.java:66)
at org.apache.lucene.index.MultiSegmentReader$MultiTermEnum.next(MultiSegmentReader.java:494)
at org.apache.lucene.search.FieldCacheImpl$10.createValue(FieldCacheImpl.java:389)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldCacheImpl.getStringIndex(FieldCacheImpl.java:351)
at org.apache.lucene.search.FieldSortedHitQueue.comparatorString(FieldSortedHitQueue.java:415)
at org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQueue.java:206)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSortedHitQueue.java:167)
at org.apache.lucene.search.FieldSortedHitQueue.<init>(FieldSortedHitQueue.java:55)
at org.apache.lucene.search.TopFieldDocCollector.<init>(TopFieldDocCollector.java:43)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:121)
at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
at org.apache.lucene.search.Hits.<init>(Hits.java:90)
at org.apache.lucene.search.Searcher.search(Searcher.java:61)
at org.sonatype.nexus.index.DefaultSearchEngine.searchFlat(DefaultSearchEngine.java:179)
at org.sonatype.nexus.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:99)
at org.sonatype.nexus.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:77)
at org.sonatype.nexus.index.DefaultNexusIndexer.searchFlat(DefaultNexusIndexer.java:386)
at org.sonatype.nexus.index.archetype.NexusArchetypeDataSource.getArchetypeCatalog(NexusArchetypeDataSource.java:55)
at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.doCollectArchetypes(Maven3ServerIndexerImpl.java:324)
at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.getArchetypes(Maven3ServerIndexerImpl.java:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:178)
[ 70094] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 14.0.2 Build #IU-139.659.2
[ 70094] ERROR - plication.impl.ApplicationImpl - JDK: 1.8.0_25
[ 70094] ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) 64-Bit Server VM
[ 70094] ERROR - plication.impl.ApplicationImpl - Vendor: Oracle Corporation
[ 70094] ERROR - plication.impl.ApplicationImpl - OS: Linux
[ 70094] ERROR - plication.impl.ApplicationImpl - Last Action: CloseProject
^C
saschajostock@euerEhren:~/lib/Programme/idea-IU-139.225.3/bin$ ./idea.sh
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
DEBUG - [ORACLE-SQL] undefined element type: alter_external_table_clauses
DEBUG - [ORACLE-SQL] undefined element type: records_per_block_clause
DEBUG - [ORACLE-SQL] undefined element type: ref_attribute
DEBUG - [ORACLE-SQL] undefined element type: physical_properties
DEBUG - [ORACLE-SQL] undefined element type: redo_logfile_spec
DEBUG - [ORACLE-SQL] undefined element type: row_movement_clause
DEBUG - [ORACLE-SQL] undefined element type: hash_subpartition_quantity
DEBUG - [ORACLE-SQL] undefined element type: primary_operator
DEBUG - [ORACLE-SQL] undefined element type: xml_type_column_properties
DEBUG - [ORACLE-SQL] undefined element type: parameter_types
DEBUG - [ORACLE-SQL] undefined element type: partition_value
DEBUG - [ORACLE-SQL] undefined element type: lob_partition_storage
DEBUG - [ORACLE-SQL] undefined element type: create_cluster
DEBUG - [ORACLE-SQL] undefined element type: index_attributes
DEBUG - [ORACLE-SQL] undefined element type: parameter_type
DEBUG - [ORACLE-SQL] undefined element type: return_type
DEBUG - [ORACLE-SQL] undefined element type: scn_value
DEBUG - [ORACLE-SQL] undefined element type: move_table_clause
DEBUG - [ORACLE-SQL] undefined element type: data_item
DEBUG - [ORACLE-SQL] undefined element type: create_index_statement
[ 12601] WARN - org.jetbrains.io.BuiltInServer - Die Adresse wird bereits verwendet
java.net.BindException: Die Adresse wird bereits verwendet
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.Net.bind(Net.java:428)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:512)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1121)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeBindNow(ChannelHandlerInvokerUtil.java:108)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeBind(DefaultChannelHandlerInvoker.java:214)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:233)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:943)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:212)
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:340)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:343)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:356)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:834)
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:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
[ 13050] WARN - .ExternalResourceManagerExImpl - Cannot find standard resource. filename:/META-INF/tapestry_5_0_0.xsd class=class com.intellij.javaee.ResourceRegistrarImpl, classLoader:null
[ 135618] ERROR - plication.impl.ApplicationImpl - java.lang.OutOfMemoryError: Java heap space
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:134)
at com.intellij.execution.rmi.RemoteUtil.access$100(RemoteUtil.java:36)
at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:105)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:181)
at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:102)
at com.sun.proxy.$Proxy103.getArchetypes(Unknown Source)
at org.jetbrains.idea.maven.server.MavenIndexerWrapper$7.execute(MavenIndexerWrapper.java:168)
at org.jetbrains.idea.maven.server.MavenIndexerWrapper$7.execute(MavenIndexerWrapper.java:165)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
at org.jetbrains.idea.maven.server.MavenIndexerWrapper.getArchetypes(MavenIndexerWrapper.java:165)
at org.jetbrains.idea.maven.indices.MavenIndicesManager.getArchetypes(MavenIndicesManager.java:308)
at org.jetbrains.idea.maven.wizards.MavenArchetypesStep$6.run(MavenArchetypesStep.java:239)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.apache.lucene.search.FieldCacheImpl$10.createValue(FieldCacheImpl.java:402)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldCacheImpl.getStringIndex(FieldCacheImpl.java:351)
at org.apache.lucene.search.FieldSortedHitQueue.comparatorString(FieldSortedHitQueue.java:415)
at org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQueue.java:206)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSortedHitQueue.java:167)
at org.apache.lucene.search.FieldSortedHitQueue.<init>(FieldSortedHitQueue.java:55)
at org.apache.lucene.search.TopFieldDocCollector.<init>(TopFieldDocCollector.java:43)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:121)
at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
at org.apache.lucene.search.Hits.<init>(Hits.java:90)
at org.apache.lucene.search.Searcher.search(Searcher.java:61)
at org.sonatype.nexus.index.DefaultSearchEngine.searchFlat(DefaultSearchEngine.java:179)
at org.sonatype.nexus.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:99)
at org.sonatype.nexus.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:77)
at org.sonatype.nexus.index.DefaultNexusIndexer.searchFlat(DefaultNexusIndexer.java:386)
at org.sonatype.nexus.index.archetype.NexusArchetypeDataSource.getArchetypeCatalog(NexusArchetypeDataSource.java:55)
at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.doCollectArchetypes(Maven3ServerIndexerImpl.java:324)
at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.getArchetypes(Maven3ServerIndexerImpl.java:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:178)
at sun.rmi.transport.Transport$1.run(Transport.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:174)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:557)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:812)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:671)
[ 135620] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 14.0.2 Build #IU-139.659.2
[ 135620] ERROR - plication.impl.ApplicationImpl - JDK: 1.8.0_25
[ 135620] ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) 64-Bit Server VM
[ 135620] ERROR - plication.impl.ApplicationImpl - Vendor: Oracle Corporation
[ 135620] ERROR - plication.impl.ApplicationImpl - OS: Linux
[ 135620] ERROR - plication.impl.ApplicationImpl - Last Action: CloseProject
Unfortunately, IntelliJ IDEA doesn't support it at the moment, you can watch/vote the issue in YouTrack.
You can add the property manually during the creation using the wizard.
I am using IntelliJ IDEA 2019.1.3
Make sure the required property is indicated in the archetype-metadata.xml file
In the screen that lists the properties, you can hit the plus symbol to add a Maven Property, Match the name listed in the archetype-metadata.xml file and add the value of this property
Properties screen and add maven proerty popup
Clicking OK will add this property to the list and the project will build using the custom property as designed.
I hope this helps