After environment variable setup for ANT Home and Liferay SDK property file settings portlet creation is sucessful but getting IVY settings issue when starting deployment. I am using command line for creation and deployment of portlet.
Check below for more details:
Related
Other than installing the plugin in the new Jenkins instance and configuring with the same options, is there another method of migrating/importing plugin configurations?
I figured it out:
After you save Jenkins Settings (in the GUI) once, it will generate xml files for the plugin configurations in $JENKINSHOME.
Should have known I was working with docker jenkins.
After creating a tar of the build from jenkins, I am trying to move the tar to the main server using uDeploy. But i get the following error even after using the proper application name, environment and process name. I am unable to debug any further.
Please find the uDeploy settings and the log in the images.
uDeploy Jenkins setup:
error in console:
This is a known issue, have you done this workaround
Open jenkins.war and navigate to META-INF
Delete JENKINS.SF and JENKINS.RSA
Open MANIFEST.MF and delete all of the lines that start with SHA1-Digest
Place the new Log4j with version greater or equal to 1.2.12 (e.g. Log4J 1.2.17) jar in WEB-INF/lib
Update MANIFEST.MF to point to the new version
I have grails app that uses plugins to modularize app. Structure of app is as follows:
pluginA
pluginB
pluginMain
On one of those plugins (say pluginA) I have controller that uses Spring Webflow (using Spring Webflow 2.0.8.1).
Plugins are resolved locally in BuildConfig.groovy of pluginMain (grails.plugin.location.'pluginA' = "../pluginA"
grails.plugin.location.'pluginB' = "../pluginB").
When running app with run-app views used by webflow are resloved OK.
But, when I run app with run-war controller from pluginA tries to resolve view from location pluginMain/WEB-INF/grails-app/views/controllerName/flowName/nameOfView.jsp instead from pluginA
so I am getting HTTP 404 not found error.
I am using grails 2.3.7 and java jdk 1.7.
Please help!
The location that it is looking for in the run-war situation is the standard location for resolving page and flow views. You are likely getting into trouble by attempting to create a war file using inline plugins (the grails.plugin.location).
The inline plugin support is really nice when developing plugin functionality, but it has its quirks, particularly when you get multiple dependent plugins in play. At some point you have to break down and start publishing your plugins.
Try publishing the plugin to your local Maven repository using the "maven-install" command. Then change your BuildConfig.groovy file to reference the installed version of the plugin.
My normal workflow is something like this:
Develop the new plugin functionality using an inline plugin definition in BuildConfig.groovy, testing with run-app and run-test until I'm happy.
Publish a SNAPSHOT version of the plugin (ie. 1.0.1-SNAPSHOT) and update BuildConfig.groovy to point to the snapshot and test using run-app and run-war eg:
compile (":ark-kpi:1.0.1-SNAPSHOT")
Publish your plugin in release form either to your local maven repository (maven-install) or a public repository like a locally running Artifactory if you want to share with colleagues (publish-plugin).
You should read the guide section on plugins and configuration for details on setting up repositories.
I'm working with Liferay and generating portlets with a Apache Ant-based build.
I want to generate a portlet project only without compiling it's codes.
How can I do it? What arguments must be passed to the ant command?
Just simply use the create.sh script that is in the portlets directory under the Plugins SDK to create a new portlet plugin project.
Install Plugins SDK
Go into portlets subdirectory on command line
Run the create.sh/create.bat and pass two arguments, one for name of portlet project and other for the display name.
All of this is fully documented here along with how to perform the same task using Liferay IDE (Eclipse plugin for Liferay development).
There are 2 files in the myProject-xmlportletfactory folder under the XmlPortletFactory folder: build.xml and myProject.xml.
When I run the ant in this path, it runs the build.xml.
In the buil.xml file, under the <target> tag there are to <ant> tags, the first builds services and classes for the project and the second compiles and deploys the project. if I delete the second tag and run the ant, it will build the project only and dont compile it.
I've created a private plugin for domain objects that are shared between two grails applications. I'm able to use the plugin successfully in my local environment as I've set the path to it via the BuildConfig file. For example, I have the following directories:
appOne/
myPlugin/grails-my-plugin-0.1.zip (myPlugin is a grails plugin project dir)
In: appOne/grails-app/conf/BuildConfig.groovy:
grails.plugin.location.compileMyPlugin = "../myPlugin"
My question is, what is the proper/best way to handle "packaging" this plugin with my app release so I can deploy it to a cloud service where it won't be available for download? I imagine there is a way to have grails do this for you but I'm unsure. (I'm very new to grails)
When you create you .war file for deployment, grails simply includes your plugin. So you have nothing special to do.
If your project is build in the cloud, you might try to specify a file path as local repository:
repositories {
grailsCentral()
localRepo "../myPlugin"
}
Just drop your zipped plugin in this folder and grails will find it.
I ended up doing the following to resolve this in Grails 2.1.0:
1) In the Grails Plugin Project:
grails package-plugin Produces the grails-myplugin-0.1.zip file
2) Copy plugin to my application's lib directory (appOne/lib/grails-myplugin-0.1.zip)
3) In BuildConfig.groovy
Remove: grails.plugin.location.compilemyPlugin = "../myPlugin"
This was/is used during development to prevent the rebuild-reinstall process
when updating files included in the plugin.
Add:
plugins {..... compile ':grails-myPlugin:0.1' }
4) Test by cleaning appOne and re-run which will install/re-install the plugin via the lib directory
5) Commit all changes and add the plugin zip file to appOne and push. The cloud provider,
Heroku in this case, can then resolve the dependency.
Your build script should first package the plugin, then install the plugin into your Grails application. At least, that is how I have to do it. If you try and have both your plugin specified in the BuildConfig dependencies and as an inline plugin, Grails tends to complain about that.