Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you looked for j2ee6 archetypes you might ran into a problem with the structure that does not fit yours. The thing is ee6 simplified packing of the application by making it possible to put EJBs to .WAR files directly. The structure of your application is basically more like ee5. You may have many good reasons to keep it that way though. For instance you may want to deploy EJBs on a separate sever at some point. Anyway you may want to take a look at archetype that generates a j2ee5 project like the following. </p> <pre><code>mvn archetype:generate -DarchetypeCatalog=http://javaee5-maven-archetype.googlecode.com/svn/repository/archetype-catalog.xml </code></pre> <p>Below is the output</p> <pre><code>mvn archetype:generate -DarchetypeCatalog=http://javaee5-maven-archetype.googlecode.com/svn/repository/archetype-catalog.xml [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 Interactive mode [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0) Choose archetype: 1: http://javaee5-maven-archetype.googlecode.com/svn/repository/archetype-catalog.xml -&gt; pl.piotrsorobka.maven:javaee5-maven-archetype (Archetype - javaee5-maven-archetype) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): :**1** Define value for property 'groupId': : com.test.ee6 Define value for property 'artifactId': : test-ee6-app Define value for property 'version': 1.0-SNAPSHOT: Define value for property 'package': com.test.ee6: Confirm properties configuration: groupId: com.test.ee6 artifactId: test-ee6-app version: 1.0-SNAPSHOT package: com.test.ee6 Y:y </code></pre> <p>That is going to create a project structure for you which you can import into your IDE. The way of importing depends on the version of the IDEA. If I remember correctly since version 12.x you have to use menu "import" for importing maven projects in particular, but if you have an earlier version of Intellij Idea you have to go with create a new project and then choose an option something like "from existing source" and choose maven. Then you would need to create a new run/debug configuration. This part of the work also depends on the version of your IDE, but the main idea is the same: you would want to run "package" goal of your main pom.xml(which is in the root of the project) and choose an artifact for deployment. In your case it is the .EAR file. </p> <p>After you make this project run in your IDE, you may replace sources with the ones from your project that you want to convert into the maven project and add all necessary dependencies to the appropriate pom.xml files.</p> <p>This is one way to achieve what you need. Hope that helps</p> <p><strong>Note:</strong> Here I assumed your maven version is 2.2.x. Maven3 would require a slightly different procedure</p> <p><strong>Another note:</strong> If you have multiple versions of Maven installed on your developer machine, make sure Idea is using the correct one in File->Settings...->Maven. You have to check Maven home directory there.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload