Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

How to create this project in Eclipse #12

Open

Description

@clocksmith

This looks like an ear maven project. According to this documentation: https://cloud.google.com/appengine/docs/java/webtoolsplatform#enterprise_application_ear
this is not supported.
"Note: Currently, only Maven WAR projects are supported, not Maven EAR projects"

Also, the directory structure differs from the module overview documentation.
https://cloud.google.com/appengine/docs/java/modules/

Is this the suggested way to set up an app engine project using modules, or should we use the way in the documentation? How do we convert an old project in Eclipse?

Activity

  1. ludoch commented on Dec 1, 2014

    @ludoch
    Contributor

    Eclipse m2 WTP supports Maven project, including Maven EAR project I think.
    Import it in Eclipse via the import maven project.
    Old eclipse projects do not support EAR project.

    On Sun, Nov 30, 2014 at 2:02 PM, clocksmith notifications@github.com
    wrote:

    This looks like an ear maven project. According to this documentation:
    https://cloud.google.com/appengine/docs/java/webtoolsplatform#enterprise_application_ear
    this is not supported.
    "Note: Currently, only Maven WAR projects are supported, not Maven EAR
    projects"

    Also, the directory structure differs from the module overview
    documentation.
    https://cloud.google.com/appengine/docs/java/modules/

    Is this the suggested way to set up an app engine project using modules,
    or should we use the way in the documentation? How do we convert an old
    project in Eclipse?

    —
    Reply to this email directly or view it on GitHub
    #12
    .

  2. clocksmith commented on Dec 1, 2014

    @clocksmith
    Author

    Sorry for not being more clear. I already have an eclipse GAE using Maven WAR. I am wondering how to get it to a be a Maven EAR project so that I can use modules.

  3. ludoch commented on Dec 1, 2014

    @ludoch
    Contributor

    yes, by creating a Maven project (EAR) like
    https://github.com/GoogleCloudPlatform/appengine-modules-sample-java/blob/master/appengine-modules-ear/pom.xml
    and replace the 2 modules there with your module.

    On Sun, Nov 30, 2014 at 6:09 PM, clocksmith notifications@github.com
    wrote:

    Sorry for not being more clear. I already have an eclipse GAE using Maven
    WAR. I am wondering how to get it to a be a Maven EAR project so that I can
    use modules.

    —
    Reply to this email directly or view it on GitHub
    #12 (comment)
    .

  4. clocksmith commented on Dec 2, 2014

    @clocksmith
    Author

    I have the project able to deploy, but am still having trouble.

    Let me take a step back. I originally had a war project with multiple cloud endpoints running on an app engine frontend that I configured in the admin console. I needed to make another endpoint method, but I wanted it to use a different set of instances than my regular frontend, so I found app engine backends. I read that they were deprecated in favor in "modules" so I turned to the app engine modules.

    All I want is for different URLs to dispatch to different sets of instances (with different configurations) controlled with a dispatch.xml. I am finding it impossible to get the information I need out of the documentation to set this up. I found this sample project and made a new Enterprise Application Project based off of this sample, because the sparse documentation says that app engine modules need to be set up as an ear project.

    1. Where do I put my source code that is shared among modules? (I currently have it in ear/src/main/java/ but I cannot get Eclipse to recognize it as source. I also read that ear projects don't have source code so this is probably wrong)
    2. Where is the documentation for setting up cloud endpoints with modules?

    Thanks

  5. ludoch commented on Dec 2, 2014

    @ludoch
    Contributor

    Please send me the link for " sparse documentation says that app engine
    modules need to be set up as an ear project"...We need to address this.

    Regarding shared lib across web apps, you can create yet another jar type
    Maven project that contains the lib content, and create a maven dependency
    with the n war modules that rely on this shared lib.

    On Tue, Dec 2, 2014 at 1:50 PM, clocksmith notifications@github.com wrote:

    I have the project able to deploy, but am still having trouble.

    Let me take a step back. I originally had a war project with multiple
    cloud endpoints running on an app engine frontend that I configured in the
    admin console. I needed to make another endpoint method, but I wanted it to
    use a different set of instances than my regular frontend, so I found app
    engine backends. I read that they were deprecated in favor in "modules" so
    I turned to the app engine modules.

    All I want is for different URLs to dispatch to different sets of
    instances (with different configurations) controlled with a dispatch.xml. I
    am finding it impossible to get the information I need out of the
    documentation to set this up. I found this sample project and made a new
    Enterprise Application Project based off of this sample, because the sparse
    documentation says that app engine modules need to be set up as an ear
    project.

    1. Where do I put my source code that is shared among modules? (I
      currently have it in ear/src/main/java/ but I cannot get Eclipse to
      recognize it as source. I also read that ear projects don't have source
      code so this is probably wrong)
    2. Where is the documentation for setting up cloud endpoints with modules?

    Thanks

    —
    Reply to this email directly or view it on GitHub
    #12 (comment)
    .

  6. clocksmith commented on Dec 2, 2014

    @clocksmith
    Author

    Here is where I got the idea:
    (I could have misinterpreted it but this part of the documentation is very confusing to me)

    https://cloud.google.com/appengine/docs/java/modules/

    "An App Engine application that uses modules is organized as an unpacked Java Enterprise Archive (EAR) directory structure. The top-level EAR directory contains a single META-INF subdirectory, and a separate directory for each module in the app. These module directories are organized as unpacked Java Web Application Archives (WAR). Each WAR directory usually has the same name as the module it defines, but this is not required. Although Java EE supports WAR files, module configuration uses unpacked WAR directories only. App Engine's Java SDK includes an Apache Maven tool that can build a skeletal EAR structure for you."

    The very first sentence is confusing. It uses ear structure but is not an Enterprise Application Project? Or is it? The directory structure described here is not the same as the sample. Here is says the modules are in the top level ear directory, but in the sample they are separate top level directories. It also talks about how the "Apache Maven tool can build a skeletal EAR structure". I do not find this to be the case-- it builds regular single war projects. I have tried both the skeletal and sample versions.

  7. MobWiMetro commented on May 26, 2015

    @MobWiMetro

    I happened to the same problem as clocksmith did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions