plugin-info.html not being generated for Maven site - maven-3

I have a custom Maven plugin for which I want to generate a site. The sole purpose of this site is to automatically document the plugin's available goals. However, when I execute mvn clean site, the plugin-info.html file is never generated.
Given that the packaging for this module is maven-plugin, I assumed that this would automatically be created by the site plugin. I looked at the site plugin's goals to see if this had to explicitly be "turn on", but did find anything. Is there something I am missing that will force the plugin-info.html to be created?
I am using:
Maven 3.0.3
maven-site-plugin 3.0

After some debugging I made a jira issue at http://jira.codehaus.org/browse/MPLUGIN-191. The description contains the workaround I found to fix this problem.

Related

Unable to generate cucumber reports in jenkins. net.masterthought.cucumber.ValidationException: None report file was added

I am using jenkins to run jobs that uses maven with cucumber . my jobs are running succesfully. I have also managed the plugin Cucumber report in jenkins. But when i view the report i am getting the message as shown in below picture.
I have tried to install various plugins like Jenkins plugin, standalone but with no joy. These are shown as options in the bottom right of the report.
Any clue is helpful. I have tried to check this error in stackover flow also. I didnt get any clue
I could see the reports file in xml which is created by surefire plugin. Any way i can achive reporting part in my project
I managed to get reports in jenkins now.
Previously Jenkins is unable to find the json file in my project.
I have set the path of json file as target and i could able to see the reports.
This might help for those who are looking for answer.
#CucumberOptions(
features= "C:\\Users\\dd pc\\workspace\\PracticeCucumber\\src\\main\\java\\com\\qa\\feature\\Test.feature",
glue= {"com\\qa\\stepDefinition"},
format= {"pretty","html:test-output_1",
"json:target/cucumber-reports/CucumberTestReport.json"},
plugin = ("json:target/cucumber-reports/CucumberTestReport.json"),
monochrome= true,
dryRun= false
)
I am able to solve by providing **/*.json
under Post-build Actions/Cucumber Report/JSON Report Location/ File Include Pattern = **/*.json
First of all in runner file we need to provide following plugin as follows: plugin= {"json:target/cucumber.json" }
Now in Jenkins job, in "post build" section during configuration, add cucumber reports, click on advanced option and provide 'target' text in "JSON Reports Path" text field. Save the job, it will run and will work fine.
Note: target text is the name of folder which we have provided in runner file for generating reports in Json, also cucumber report plugin works on json so need to generate report in json.
I my case the problem was in two jobs over the same test repository (one for Chrome one for Firefox), where one deletes report files after the job while second job was already running and vice versa.

Including Liferay .jars in groovy for portlet development

We are developing liferay portlets in groovy using the portlets and liferay portlets plugins. We wanted to find the user ID of the current user logged in. In order to do that, using the com.liferay.model.user class was suggested (from searching on other S.O. questions).
Unfortunately, when we try to import com.liferay.* (or com.liferay.model.user etc.) the grails complier cannot resolve the 'user' class. This makes sense, since the com.liferay folder is not in the grails/lib folder. However, I am unable to find out where to acquire these .jar files to add them to the lib folder in grails.
Am I approaching this wrong?
(Note: I am using Liferay 5.2.3, not the newest version of liferay)
Or, in 5.2.X is there an easier way to get the ID or name of the currently logged in user?
[UPDATED]
mvnrepository.com isn't a repository itself, it's a search engine for Maven artifacts.
By looking at the "Download jar hyperlink", I see that the liferay jars are available in Maven Central http://repo1.maven.org/maven2/com/liferay/portal/.
In the repositories section of your BuildConfig.groovy, make sure that the following line is there
mavenCentral()
I think the portal-impl artifact contains com.liferay.model.user.* related classes which are what you're looking for.
In that case you would have the following dependency in your BuildConfig.groovy
compile 'com.liferay.portal:portal-impl:5.2.3'
If you require additional liferay classes, assuming you have liferay running somewhere, you could search the jars for a specific class name (http://java.net/projects/jarscan). Once you know the jar name, you can search it on mvnrepository.com and add the relevant dependency to your BuildConfig.groovy.
Hope it helps.
You can reference liferay dependencies in your BuildConfig.groovy. You would need to confirm the repository URL and then it should be fine.
http://mvnrepository.com/artifact/com.liferay.portal
You could exclude those dependencies from packaging.

Create a Glassfish 3 domain as part of ant build?

I have a JEE6 project based on Glassfish 3.1.1 that is moving beyond the "one developer prototype" stage to being developed by a team.
Each member of the team will have their own local glassfish server. I don't want each of them to have to go through all the manual steps of setting up the JDBC connection pool, JMS services, jdbc security realm, etc via the admin console, as I did when first developing the prototype. It is error prone, and plus if I want to change something I have to tell everyone what to do. I want it to be done as part of the ant build, so that it is a one-clicker, and then if I have to change something I can just tell them to do a clean to blow away the domain and then run it again. So there would be an ant task to "config-glassfish" that would somehow configure the domain for them.
Despite extensive searching, I can't seem to find any step-by-step guide of how best to accomplish this. Anyone have a link?
Would it be best to attempt to capture the fully configured domain and store that in our src repository?
Or should I instead have ant issue "asadmin" commands to create and configure the domain?
You can do all of this with the sun-appserv-admin ant task. You can find more information here: http://docs.oracle.com/cd/E19316-01/820-4336/beaev/index.html
We struggle with this kind of thing at my work too, but only with a few developers. One thing I really like is that Glassfish has the concept of a resources.xml which will cover a lot of the config. I use this to pass around connection pool configs and JMS queues and it works really well, but it might not cover all your config needs. The contents of the file are pretty much snippets from the domain.xml, and I haven't figured out everything it can do yet. http://docs.oracle.com/cd/E19798-01/821-1751/ggoeh/index.html http://javahowto.blogspot.com/2011/02/sample-glassfish-resourcesxml.html
I haven't tried other ideas since the resources.xml solves my major pain points, but you could take your domain.xml and work through any issues brought up by copying it to another developer's domain, then do variable replacement on the part of the file that need it. That way you could have ant create the domain, then overwrite the domain.xml with the newly filled out one.
Maybe there is a way you could use asadmin backup-domain
One other idea would be Chef. http://wiki.opscode.com/display/chef/Home
I ended up just putting the domain.xml into the src repository, making an ant task to copy it over to the glassfish directory, and instructing other developers that when running that ant task, they should make sure glassfish is not running.
This worked for my case...

Teamcity custom reports tab

I am trying to create a custom tab in my Build reports. I followed this link given under teamcity manual. But the tab simply does not appear for me. What am I doing wrong?
I see an entry being created in the config/main-config.xml like this. But still this does not help me showing the specific tab.
<report-tab title="Koverage" basePath="/usr/braga/helloworld" startPage="braga.html" />
By the way, I am trying to integrate the .html generated for rcov code coverage gme within my Rails project.
I finally found out what I was doing wrong. Actually, I have to first create artifacts and have them saved in the artifact directory. Then, I will have to include those artifacts in the build I choose. The base path has be "." (meaning current directory) and the filename can be index.html. Here is a screenshot after I configured it.

Specifying order of plugins in Grails

My grails application depends on several grails plugins that append and entries to web.xml
The problem is I need to control the order the plugins are executed. There is a particular plugin which is used for some security purposes which adds a filter in web.xml. This filter needs to be the first executed filter in web.xml Thus I would like this filter to be executed last so that I can ensure that this plugin will be appending the configurations in the first position.
I know there is a dependsOn property on the plugin class to ensure it gets executed last, but that only works if I know which plugins are going to be used in combination with this plugin. I would like this plugin to be general enough so that anyone in my company can use this plugin and know for sure that this gets executed last.
Is there any way I can ensure a particular plugin gets executed last? Either in the grails-plugin project (ie a property of the plugin class) or configuration of the grails application project.
Thanks,
Does the grails application install plugins using the install-plugin command? If so, try declaring them in BuildConfig.groovy instead.
plugins {
runtime ':weceem:0.8'
runtime ':hibernate:latest.release'
}
It's possible that plugins declared here are loaded in the same order they're listed, though I haven't tested this theory.
It might be easier to find a way to make your plugin append it's filters differently to ensure they get appended to the position you want them in. I would have to see the code for the plugin if I was going to try to help solve this in that way though.

Resources