簡體   English   中英

無法在Eclipse Neo中創建Maven項目

[英]Not able to create Maven project in eclipse neo

嗨,我的系統中有eclipse neo和java1.8。 我已經在Eclipse中添加了drools 6.5 jar,但無法創建Maven項目。

有人可以讓我知道創建Maven項目的完整過程嗎,還是忘了一些事情?

確保在您的IDE中安裝了Maven Integration for Eclipse插件(默認情況下應在Eclipse Neon安裝它)。 為了驗證這一點,請導航至“窗口”->“首選項”,並確保在左首選項列表中列出了Maven 如果未安裝maven,請使用Eclipse Marketplace安裝。 如果是這樣,只需通過導航到File-> New-> Other-> Maven-> Maven Project來創建一個新的Maven項目。

您也可以從命令行創建項目

mvn archetype:generate

然后將其作為Maven項目導入eclipse中


下面的示例命令輸出

$ 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]
[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: http://cocoon.apache.org -> cocoon-22-archetype-block-plain (Creates an empty Cocoon block; useful if you want to add another block to a Cocoon application)
2: http://cocoon.apache.org -> cocoon-22-archetype-block (Creates a Cocoon block containing some small samples)
3: http://cocoon.apache.org -> cocoon-22-archetype-webapp (Creates a web application configured to host Cocoon blocks. Just add the block dependencies)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 1
Downloading: http://localhost:8081/nexus/content/groups/mac/org/apache/cocoon/cocoon-22-archetype-block-plain/1.0.0/cocoon-22-archetype-block-plain-1.0.0.jar
13K downloaded
Define value for groupId: : com.company
Define value for artifactId: : example
Define value for version:  1.0-SNAPSHOT: :
Define value for package:  com.company: : com.company.example
Confirm properties configuration:
groupId: com.company
artifactId: example
version: 1.0-SNAPSHOT
package: com.company.example
 Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype: cocoon-22-archetype-block-plain:1.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.company
[INFO] Parameter: packageName, Value: com.company.example
[INFO] Parameter: package, Value: com.company.example
[INFO] Parameter: artifactId, Value: example
[INFO] Parameter: basedir, Value: /private/tmp/archetype
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 20,column 6] : $Id is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml [line 20,column 6] : $Id is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/resources/META-INF/cocoon/spring/block-application-context.xml [line 18,column 6] : $Id is not a valid reference.
[INFO] OldArchetype created in dir: /private/tmp/archetype/example
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 20 seconds
[INFO] Finished at: Tue Sep 09 19:10:51 CEST 2008
[INFO] Final Memory: 8M/15M
[INFO] ------------------------------------------------------------------------

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM