开发者

ear-javaee6 archetype doesn't allow Java files

开发者 https://www.devze.com 2023-04-10 14:56 出处:网络
I created a new Maven Project and selec开发者_运维问答ted the org.codehaus.mojo.arhcetypes ear-javaee6 archetype.When I try to add a Java class to the project I get \"Source folder is not a java proje

I created a new Maven Project and selec开发者_运维问答ted the org.codehaus.mojo.arhcetypes ear-javaee6 archetype. When I try to add a Java class to the project I get "Source folder is not a java project".

So we are not supposed to add Java classes to out .ear files now. What are these guys thinking when they create a project for a .ear but don't allow for Java classes?

What archetype should I use for creating Java EE 6 .ear files?


From Wikipedia, EAR (file format):

EAR (Enterprise Archive) is a file format used by Java EE for packaging one or more modules into a single archive [...]

Create an EJB (ejb-javaee6 archetype) or WAR project (webapp-javaee6 archetype for example) for your java codes and refer to it from the Ear plugin configuration (and add as dependency too).

0

精彩评论

暂无评论...
验证码 换一张
取 消