After downloading the GAE SDK (1.7.1) I have a massive amount of JARs under my ${GAE_HOME}/lib/ directory:
I am in the process of setting up a build for my GAE web app on my local machine but also plan on setting up a QA machine. I'm also using an Ivy repository hosted on a 3rd server for resolving all of my web app's dependencies.
I need to know which GAE JARs I will need to package under my web app's WEB-INF/lib directory, and which ones are available to my web app at runtime on both the dev appserver as well as my live/production GAE servers.
So I ask: does the production environment of GAE make all these JARs available at runtime, or do I need to package them in my WAR? And do production GAE servers make the same dependencies available as the dev appserver, or do I need to have different dependency configurations for dev and production environments? Thanks in advance!
Please note: I am using the Google-Eclipse plugin for a few features, but not building or uploading/deployment. I'm setting up an external Ant build that calls Ivy and other tasks that I am running from a terminal. So I'm not interested in any build-related features of the plugin!
Related
I have a Java application that can be deployed to a Tomcat 8 App Service from Eclipse using the Azure extensions.
I created a Build pipeline that creates artifacts with the .war file.
I then created a Release pipeline and set up a "Deploy WAR to Azure App Service". The pipeline deploys the war file and expands it, but some other configuration is not right because the app is not available on the Tomcat server.
Has anyone used this task to successfully deploy to a Tomcat 8 App Service?
If so, what else needs to be done to get the app to deploy successfully?
P.S. I have very little experience with Java or Tomcat so it's likely something I've missed.
Well, seems you deployed the WAR to Azure App Service (Azure Website) but not the Tomcat server.
You just need to deploy the WAR to Tomcat server instead of Azure Website.
Build the Java project first, please refer to Working with Azure
DevOps and Java and Build your code with Maven for details.
Install the extension Apache Tomcat Deployment
Deploy applications to a Tomcat server using the Deploy to Apache Tomcat task.
Reference below articles to do that:
Continuous Integration and Deployment of Java web apps to Azure with
VSTS
https://github.com/Microsoft/vsts-tomcat/blob/master/src/tomcat.md
The Answer by Andy is most of the solution but there was one additional piece required to get the deployment working. I found this response to some additional errors I was getting after switching to the Apache Tomcat Deployment.
I also added a bash script to rename my app to ROOT cp my-war-file-name.war ROOT.war so that the app was the default application.
I've created a Spring MVC project that can be deployed to my GAE instance very nicely. Now I'm trying to make it so that I can deploy it to the flex environment with IntelliJ with no luck.
My project structure is as follows:
\src
\main
\appengine
app.yaml
\java
normal java project files
\resources
property files
When, in IntelliJ, I create a new Run Configuration of "Google App Engine Deployment" the setting / environment is always "App Engine Standard Environment." I can't seem to make this be part of the flexible environment.
My current app.yaml:
runtime: java
env: flex
handlers:
- url: /.*
script: this field is required, but ignored
runtime_config: # Optional
jdk: openjdk8
server: jetty9
manual_scaling:
instances: 1
I've tried copying all of the setting I can find from example project on github
Here's a screenshot of my deployment
Do you also happen to have an appengine-web.xml configuration file in your project? If so, this will supersede any flex configuration and the plugin will assume an App Engine standard deployment.
If so, try removing it (or renaming it) and then recreate the deployment run configuration. At this point it should be marked as targeting the App Engine flexible environment.
If you don't have this config file (or if renaming it doesn't help, or if your list of deployment sources does not include any war/jar artifacts), then its possible that you have a native IntelliJ project (not built with Maven / Gradle etc.) and that your Artifact settings are insufficient.
For your target artifact to be deployable to App Engine flexible you need to ensure that you have a non exploded artifact set up (either a war, or a jar if your project has an embedded server):
Open Module Settings: right click on the root of your project -> Module Settings
Click on 'Artifacts' on the left
Check what artifact types you have listed.
If its only an exploded war then try creating a new war (non-exploded) artifact - select Web Application archive, then choose your module
Save this and then recheck your deployment run configuration
I'm sure you've done this already, but perhaps you just missed something simple: the flexible environment requires a special IntelliJ plugin, Cloud Tools for IntelliJ (installation quickstart instructions).
I am writing a Java application using Maven. I have to deploy the application on a remote powerful server to run experiments. The simplest way I figured out to do this was to build a jar-with-dependencies using Maven shading plugin and then copy the uber-jar to the remote server. However the jar is big, 100+ MB, and it takes some time to send it through our network. This is redundant because most of the jar consist of heavy dependencies (Scala, Spark, Jetty) and only a tiny portion of it changes when we change our code.
Can I use Maven to install the dependencies on the remote server and then only send the much smaller jar with no dependencies to the server?
I have SSH connection to the server and I can use the SCP plugin.
You mention Jetty in your question so I am assuming your application server is Jetty. I would try and upload the common library jars to the server and then including them in the jetty class path. This will be a one time task. Maybe this will help: How do I place jars in jetty/lib on the jetty classpath?.
After this you can use maven to built a "thin" war/jar which you can upload and deploy.
I'm new to web apps, the play framework, heroku and dependency management.
I've created a new Heroku Play framework based Java web app and I'm trying to install the dependencies for auth0 (https://addons.heroku.com/auth0#dev).
The auth0 documentation (https://docs.auth0.com/#!/web/java) only documents how to add a dependency with Maven.
There is no "pom.xml" file within the Heroku app files as I think is normally the case with Maven in a Java app. What really confuses me, is that in some areas on the Heroku documentation, it states that Maven is used by default for Java web apps, in other areas SBT, then within the project files there is a dependencies.yml file (under the conf directory).
I'm really confused as to how dependencies in Heroku Play Java web apps are managed (if its Maven by default then where's the pom.xml file?) and how I add the dependencies for auth0 and some other .Jar files (like JSOUP). There is very little documentation or examples on the dependencies.yml file, whether it's supposed to replace/supplement something like Maven or SBT, or how to add to it.
Does anyone know what the deal is with dependency management in Heroku?
I am trying to recreate an existing project with Maven (any IDE is ok, but mainly Netbeans), and I'm a bit confused about the best way to do this, so any help is greatly appreciated.
Currently I have an Enterprise application with the following components:
Web application (some jsps, servlets).
Ejb project
Client project (Swing application / applet)
Common project (Contains common files used by the applet and the Web app).
The problem is the packaging and dependencies, currently the Client (Applet) jar is packaged within the Web application, so that when the web app is deployed, the users can access the applet via their browser.
Is there any similar existing archetype for this, or does it require heavy customization ?
Oh, and I am using Glassfish 3.1
Thanks in advance.
So first of all, for me it looks like you need multi module maven project. In that case there will be no single archetype that will fulfill your needs.
When it comes to "the Client (Applet) jar is packaged within the Web application" you can use maven-dependency-plugin (http://maven.apache.org/plugins/maven-dependency-plugin/) and its goal:
dependency:copy - takes a list of artifacts defined in the plugin configuration section and copies them to a specified location, renaming them or stripping the version if desired. This goal can resolve the artifacts from remote repositories if they don't exist in local.