Error building a java app in Azure devOps - java

While implementing CI pipeline in VSTS(Azure DevOps) for building a java application i get the below error.
The tasks i have used in this are..
Its a java based project, but not mavenised. It does not have pom.xml
I am using Ant task/agent in the pipeline.

Related

Service to generate spring boot executable jar

I have a question regarding building and integrate my Java project. My source is located on BitBucket. Is there an online tool where I can build and install my Maven project? My goal is that the source on BitBucket is used and compiled. Afterwards it would be great to download the generated jar-file from the provider.
Thanks for your help,
Thomas
If your question is about online development
You can open your project in a Gitpod. It provides a full fledged editor and terminal wherein you can install dependencies and build your application. Has a bitbucket integration to directly port your code to the editor.
If your question is about continuous integration
You can add CI integration with BitBucket Pipelines or Circle CI to your application and write Jobs and Stages in a dedicated config file ( depending on your chosen CI tool ) to build, test and deploy your java application.

How can I create a Jenkins pipeline to run a Java Application on a schedule?

I'd like to create a Jenkins pipeline on an existing Jenkins environment that would run an application (hosted on an online SCM repository) on a schedule. The application to run would be a Java .jar file. Is my understanding correct that this would entail a Jenkins Job that would build an application on a server, then through a script (perhaps .sh?) of some sort run that application. Upon completion the build would be cleaned up and removed from the server. Is this correct? Am I missing any parts or steps in my understanding? How can I structure such a jenkins job?

Trigger selenium-java test scripts after TFS build

I have a maven project in Jenkins (which is a selenium- java project), web-Developers use TFS , I want to execute my selenium tests as soon as developers push their code change to TFS.
If you are using the TFS2015 or later, to execute Java Maven Project in TFS with vNext build system, you can refer to this link for detailed steps: Build your Java app with Maven.
If you want to build in Jenkins and just use TFS as the Version Control System, you can refer to this article to know How to integrate Selenium C# .NET test automation codes with Jenkins.
Below articles also for your reference:
Create and run a Maven build on Visual Studio Team Services
Getting Started with Selenium Testing in a Continuous Integration
Pipeline with Visual Studio

Heroku: Java/Maven build requires NodeJS

I've got a Java web application that builds with Maven. My project uses RequireJS. I use a maven plugin at build time to compress the JS artifacts (https://github.com/bringking/requirejs-maven-plugin). The plugin calls out to NodeJS (with the r.js compressor) to do the actual work.
Local builds work wonderfully.
On Heroku, however, NodeJS is not available using the Heroku Java buildpack (the default for Java/Maven applications).
For now, I run the requireJS maven plugin locally using an active Maven profile that isn't present on the Heroku server. This prevents the RequireJS plugin from running on the Heroku server. This is less than ideal because it requires me to run the plugin locally, then check in the resulting build artifact. It's far better to generate the compressed JS file at build time in the Heroku system.
I'm looking for a good solution. Thanks in advance.
The best solution is to use Heroku Multi Buildpack with the Node.js and Java buildpacks. This is described in an article using Grunt with Java and Maven but the same principles apply for Require.js.

Best practices creating Java service or daemon scripts

I'm looking for a tool to run java server processes as daemon services in Linux (and potentially on Windows and other OS's). I'm looking for the best practices when it comes to how to build production capable scripts and launch configuration.
I'm familiar with best practices when it comes to a project's build, using Apache Maven, or something like Apache ANT + Ivy to manage your build process and manage external dependencies and build artifacts and assemblies.
When it comes to creating a project's assembly containing configuration and launch scripts along with all the compiled code and dependencies I'm unclear what the best choice is. Is there a good open source project that I could look at as an example, that bundles a service wrapper and configuration scripts with their build process?
I've been able to use Maven with the Jetty Launch plugin to run my Web applications, Terracotta Maven plugin to test multiple JVM clustered server nodes and I've used Maven's exec:java to run my custom Java servers, but I'm not sure using Maven in that capacity is really "production" quality, also it means my production servers depend on building the servers from source and downloading dependencies from potentially unavailable servers.
Here are some potential things I'm looking for in a Java service launcher solution:
Should run as a Linux service or Windows service process
Can be built using a Maven plugin or Ant script and allow me to process configuration files and scripts
Should be able to include all my project's dependencies from Apache Ant
Should be able to pull in a full Java Web Application server (e.g. Jetty 7) and be configured with my custom Web application's war
Should be able to handle a standard Java daemon service (custom java server)
Some of the options I've been looking at are Java Service Wrapper, which is used in the Maven appassembler plugin.
Also using Maven's assembly plugin and custom assembly descriptors allows me to tailor the build output.
The Java Service Wrapper seems to be quite common. I've seen it used by a few people, most notably in nexus.
The preferred (aka "best practice") way to implement Linux services of all kinds is to create a shell script that can start, stop and restart the service and put it into /etc/init.d. Then add appropriately symlinks to it from the relevant "rc.*" directories. Refer to the Linux "man" entries for "init(8)", "chkconfig(8)" and so on.

Categories

Resources