How to add html content to maven site generated by the maven site plugin? - pom.xml

I am using the maven site plugin to generate a project site. This creates a default site and can be viewed under src/target/index.html. I need to add content to the index. How can this be done?
ON reading the maven documentation, I created an index.apt under the src/site folder. How do I get the content of this file to show up in the index.html page in the target folder?

I am using Maven 3.3.9
My solution was to add an index.html file under ${baseDir}/src/site/resources.
Then run:
mvn clean site
Your index.html file should replace the default one.

You just have to launch mvn clean site.

Related

Include files to build generated by angular-cli before build in asp.net mvc

I am struggling with a issue for files generated by nodejs needed to be included in build. It works well in local development but when i want to publish it then it won't include files fron dist folder to build and app will not have a dist folder. Can any one help on this?
Note:- files are created each time has different name so i cannot select and include them. I am using visual studio 2017. I hope i could explain the issue or let me know i can try better. Thanks in advance
You need to put your static files under the wwwroot folder to make them accessible on the production server.
To include those files for publishing, a simplest option would be to add them to wwwroot before a publishing starts, otherwise they will be ignored.
Another option would be to tell MSBuild to include the files explicitly.
You can find an example of how to customize the project file at <Target Name="NgBuildAndAddToPublishOutput" AfterTargets="ComputeFilesToPublish">.
You could build for production with Angular CLI with --output-hashing=none like so:
ng build --prod --output-hashing=none
And then include the generated js-files into your project-file (csproj). Then use a Script-bundle in BundleConfig.cs with BundleTable.EnableOptimizations = true; to generate the hashes for you by ASP.NET instead of Angular-cli.

where is gradle properties file located in gradle project?

Where does the gradle.properties file located in Grails/Gradle project?
I tried but not able to find it.
I have build the Gradle project using command line.
and what is the major purpose of that file.
There are 2 possible location for gradle.properties file:
project build dir
gradle user home
Note, gradle.properties file is not necessary located within your projects files. If it's absent, look for it in your gradle user home directory (as in users guide said: it's defined by the GRADLE_USER_HOME environment variable, which if not set defaults to USER_HOME/.gradle).
It's used to configure Java process, used to build your project.
You can read more about it in the Gradle official user guide

Grails 3 install-templates only creates a scaffolding directory - no artifacts directory

The main templates I want to modify are the artifacts ones. Anyone knows how to create the artifacts templates?
In addition, it only installed these three files in the scaffolding directory:
AsyncController.groovy, AsyncSpec.groovy, ScaffoldedController.groovy.
In fact, there is a problem with the install-template command. In Grails version 3.1 it doesn't create the artifact directory with the views pages (gsp) as expected.
You just have to create an artifact directory and put your customized view pages in it:
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/create.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/edit.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/index.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/show.gsp
Regards,
-- Sylvio

Jenkins could not generate HTML Report folder on slave-machine

I am trying to generate HTML reports(Protractor Test) through Jenkins but it says
"ERROR: Specified HTML directory 'x/y/z/Reports' does not exist". but when i run on the slave reports were generated.
What do i need to do on the Jenkins Configuration, please help on this.
*Path is correct but it could not generate "Reports" folder on the slave.
I am using- "protractor-html-screenshot-reporter"
You need specify the path like "\x\y\z\Reports\", and make sure those folders is existing on your slave-machine
This is the solution:
Click on Workspace Button and navigate until the HTML report folder appears.
Copy the full path (Even though it looks like it's before the project):
Paste the full path as is in the Publish HTML report plugin:
Remember! Location path / configuration on Bash script field (even running: cd /././. etc.) Does not affect the rest of the configuration settings on the Jenkins page.
This is why a full path is needed.

What's the correct way to install a grails plugin from a zip file?

In recent versions of Grails install-plugin command has been deprecated. What is now the recommended way of installing a plugin that is not available via some repository. Assume the plugin is only available locally as zip file, e.g. after running grails package-plugin?
I think the easiest approach is to place the zip file in the project's lib folder and then add an entry in the BuildConfig.groovy. For example:
1. 'grails-image-tools-1.0.5.zip' placed in lib.
2. runtime ":grails-image-tools:1.0.5" added to BuildConfig.groovy
Since the dependency manager looks inside the project's lib folder as well, I don't have to worry about setting any paths etc.
EDIT:
The latest Grails version that I worked on was 2.1.1. I'm unable to check but according to #Saurabh's comment below this isn't applicable for Grails 2.4.3
EDIT2:
But #Jay says that it works with 2.4.5
I don't know if it is the correct way but we get it working:
Download and unzip the plugin in a directory within your project
Change your BuildConfig.groovy file to point to the new plugin
Example: Download webflow.zip plugin and unzip it into a plugins directory within your project. Add this line at end of your BuildConfig file
grails.plugin.location."webflow" = "plugins/webflow"

Resources