We are trying to automate the process of deploying the generated war files via Jenkins to web server. I was able to achieve the same for normal war files using Deploy plugin over tomcat server.
For Liferay portlet war files, I can't use the same plugin as we put war files into deploy folder in liferay and then it gets copied over to tomcat webapps folder.
Another approach I see is to add the deploy path in pom.xml <properties>
<liferay.auto.deploy.dir>${deployPath}</liferay.auto.deploy.dir>
<liferay.version>6.1.0</liferay.version>
</properties> and then run the maven command mvn package liferay:deploy to copy to deploy directory.
Do you have any other option or thoughts, Thanks!
If you want to deploy the wars using Jenkins then alternative would be using Liferay Plugin SDK provided Ant task that provides "ant deploy" command.
For maven projects the mvn liferay:deploy IS the correct and proper way of doing it!
Here's a link to the latest dev. guide on that subject:
https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/creating-a-portlet-project-liferay-portal-6-2-dev-guide-03-en
Related
I have a plain text java project in intellij, the project contains some java modules, one of the module is web application module, it will be generated a war file finally. All the modules build is manven.
After the maven build, the war file will be generated under /module/target/application-1.0.0.SNAPSHOT.war
Now what I have
1.Intellij community edition 2021.3.2
2.Smart tomcat 4.3.7
3.Tomcat 9.0.68
4.Maven 3.8.6
The target is
1.Add tomcat run/debug configuration which can include the War file
2.Before each launch of the war application, all modules should be built firstly
3.After the application startup, I can debug
Is this doable? if yes may I know how to configure this in intellij?
I have custom dependency jars files in our local maven repo folder like com.org.* to build a Mule application.
I have installed these jars files using mvn install command so that it will get published to maven local repo and again pulled by pom.xml.
Now, I have to replicate the same thing inside azure DevOps under the maven tab.
I have been struggling a lot to find a solutions. Azure DevOps experts could you please guide me here. Any help would be highly appreciated.
Thanks
Install custom jars azure devops maven artifact
You could create your custom maven feed on the Azure DevOps, then publish those custom dependency jars files into this custom maven feed, and use mvn install command with Maven task.
For the details info, please check following documents:
Set up Azure Pipelines and Maven
Get started with Maven packages in Azure DevOps Services and TFS
Configure Azure DevOps Services for Maven package management
Hope this helps.
To install Lombok on one of my spring boot project on STS 4 in Windows 10 OS, I did the following steps:
Added the lombok gradle dependency to build.gradle:
compile 'org.projectlombok:lombok'
Then to install the jar retrieved from building the above dependancy got a lombok-1.16.16.jar.
To compile the jar did a right click on the jar -> Run as Java application.
Lombok Installer appeared, but couldn't detect the IDE from the drives. So manually tried searching for the .exe file of STS4 (which I couldn't find)
So kindly help me find the .exe file of STS, so as to complete the installation
The Spring Tool Suite 4 by default has a name as SpringToolSuite4 which is the executable file. This file doesn't get detected in the Lombok installer.
After googling it for quite a long time, all I could see were results of how to install the same of Mac or Linux.
Finally, had to experiment a little. Following is the solution:
Rename the SpringToolSuite4 (Application(.exe)) file and (Configuration settings (.ini)) to sts and now it is detectable in the Lombok installer.
Complete the installation and restart STS and rebuild-clean your project and it works just fine.
You have to add the Lombok JAR file reference to the ini file. The inif file is in the STS installation directory:
-javaagent:<your-path-to-lobmok>lombok-1.16.16.jar
If you are using Spring Tool Suite4, the name of the app is no longer STS.app on MacOS, however, the installer still uses the old name, which on macOS is part of the path. So if you use the installer, check the path in the .ini file to ensure that the name of the app used in the path is correct.
After following the suggested lombok installation on the page
https://projectlombok.org/setup/eclipse
and if it doesn't work
go to C:\User\.m2\repository\org\projectlombok\lombok folder
and remove all versions of lombok contained in the folder
(do not worry maven will redo the files needed for lombok to work)
if using spring boot put in pom.xml:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
and maven update with the force update option
I'am using
Spring Tool Suite
Version: 3.9.4.RELEASE
Build Id: 201804120943
Platform: Eclipse Neon.3 (4.6.3)
I had setup broadleaf commerce project with mysql database with successive MAVEN install. When i am going to run ant task for tomcat it gives errors like this
The archive: /home/yogesh/Downloads/.eclipse%20(3)/plugins
/org.eclipse.swt.gtk.linux.x86_64_3.104.0.v20150528-0211.jar
which is referenced by the classpath, does not exist.`
Try redownloading and re-installing Eclipse. Also make sure that you are using the latest release version, which is Eclipse Mars.
I have created a dynamic web project in eclipse and published it via red5-eclipse plugin in Windows.
I need to publish the same application in red 5 server installed in Linux machine.
In case of Windows just copying the application folder under webapps and restarting the red5 server works.
But when i try the same in Linux its not working.
Any inputs would be greatly appreciated.
Even on windows you shouldn't be doing the work of copy/paste into the webapps folder.
Thats the very reason to use the Red5 plugin in eclipse, i.e to make your life easier.
I assume you are using the JAVA EE version of eclipse. Just follow this old tutorial, which is still very much valid:
http://trac.red5.org/wiki/Red5Plugin
Once configured properly, you will see the Red5 Server in the bottom panel under the "Servers" tab. There you can directly publish your app to the server, debug, start/stop etc.
For your Linux specific issue, in most probability, you have to set the correct permissions for the Red5 webapps directory in order to put new projects in there. There is no reason otherwise for it to work differently than Windows.
Solution Using Netbeans and Glassfish Server:
Red5 can be installed as stand alone server or as a war deployment.
The procedure is to create war deployment of red5 version 0.8(old version). (Lengthy, please bear with me).
Download and install jdk1.6, glassfish2.1 and netbeans 6.5 on linux.
Download "Red5War_0.8.0.war".
I am sharing in the hope that the following may help the community to create a deployable war red5 version 0.8 on glassfish2.1 by following the steps using in Netbeans 6.5:
Step 1: Un-zip the Red5War_0.8.0.war
Step 2: Create a web project named "red5" in Netbeans
Step 3: Copy the content of "/WEB-INF/classes" of inflated war folder and paste it in "Source Packages" of Netbeans Project.
Step 4: Right Click "Libraries", add "JAR/Folder", navigate to "/WEB-INF/lib" of inflated war folder, select all the dependency jars and Click On "Open" of Netbeans Project.
Step 5: Delete WEB-INF of Netbeans Project (Note : Ignore Warning/Error).
Step 6: Delete META-INF of the inflated folder.
Step 7: Copy the remaining content ("/WEB-INF/classes" and "/WEB-INF/lib") of the inflated folder to "Web Pages" of Netbeans Project.
Step 8: Open the following ports in the firewall TCP/843,TCP/1935,TCP/5229,TCP/5080
Step 9: Run the project
Step 10: Deployable war file "red.war" is created in the Netbeans Project Folder(../NetBeansProjects/red5/dist/)
Please share your findings in creating new version(1.0, 1.0.1, 1.02) war deployments using new version netbeans, jdk on new version glassfish server(3.x).
Best wishes!
Arumugam A.V