Tuesday, August 23, 2016

POM Tags Description



The <project> element is the root of the descriptor. The following table lists all of the important child elements.

Element Type      Description
modelVersion String Declares to which version of project descriptor this POM conforms.
parent Parent The <parent> element contains the information required to locate the parent project from which this project will inherit from
groupId String A universally unique identifier for a project. It is normal to use a fully-qualified package name to distinguish it from other projects with a similar name (eg.org.apache.maven).
artifactId String The identifier for this artifact that is unique within the group given by the group ID. An artifact is something that is either produced or used by a project. Examples of artifacts produced by Maven for a project include: JARs, source and binary distributions, and WARs.
version String The current version of the artifact produced by this project.
packaging String The type of artifact this project produces, for example jar war ear pom. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.
Default value is: jar.
name String The full name of the project.
url String The URL to the project's homepage.
Default value is: parent value [+ path adjustment] + artifactId
organization Organization This element describes various attributes of the organization to which the project belongs. These attributes are utilised when documentation is created (for copyright notices and links).
scm Scm(Software Configuration management) Specification for the SCM used by the project, such as CVS, Subversion, etc.
issueManagement IssueManagement The project's issue management system information.
ciManagement CiManagement The project's continuous integration information.
distributionManagement Distribution
Management
Distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.
properties/
key=value*
Properties (Many) Properties that can be used throughout the POM as a substitution, and are used as filters in resources if enabled. The format is <name>value</name>.
dependencyManagement Dependency
Management
Default dependency information for projects that inherit from this one. The dependencies in this section are not immediately resolved. Instead, when a POM derived from this one declares a dependency described by a matching groupId and artifactId, the version and other values from this section are used for that dependency if they were not already specified.
dependencies/
dependency*
List<Dependency> (Many) This element describes all of the dependencies associated with a project. These dependencies are used to construct a classpath for your project during the build process. They are automatically downloaded from the repositories defined in this project.
repositories/
repository*
List<Repository>  (Many) The lists of the remote repositories for     discovering dependencies and extensions.
pluginRepositories/
pluginRepository*
List<Repository> (Many) The lists of the remote repositories for discovering plugins for builds and reports.
build Build Information required to build the project.
reporting Reporting This element includes the specification of report plugins to use to generate the reports on the Maven-generated site. These reports will be run when a user executes mvn site. All of the reports will be included in the navigation bar for browsing.
profiles/profile* List<Profile> (Many) A listing of project-local build profiles which will modify the build process when activated.
  

Tuesday, August 9, 2016

Clear Dispatcher Cache Manually


There are many ways to clear the Dispatcher Cache few of them are as follow.

By Using Curl Command:

curl -u admin:admin -X POST -H  "CQ-Action: Activate"  -H  "CQ-Handle: pagepath " -H  "CQ-Path: pagepath "   -H "Content-Length: 0"  -H  "Content-Type: application/octetstream" 
http://DispatcherServerHost:DispatcherServerPort/dispatcher/invalidate.cache


By Using Rest Client:

http://DispatcherServerHost:DispatcherServerPort/dispatcher/invalidate.cache
CQ-Action: Activate
CQ-Handle: pagepath 
CQ-Path:    pagepath 
Content-Length: 0

Content-Type: application/octet-stream











Note: Suppose we have to delete  /content/geometrixx/en/products.html then
          pagepath = /content/geometrixx/en/products










Monday, August 8, 2016

Debug AEM with Eclipse

For debugging the AEM server with Eclipse we have to follow the following steps.

1.Start the AEM instance/server in debug mode.
2. Debug the configuration in Eclipse.


Start the AEM in debug mode:

Edit the start.bat file present inside crx-quickstart/bin folder and add the line
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=30303,suspend=n  after Djava.awt.headless=true
As shown in below image.






After changing the start.bat file save it and start the server by double clicking it.


Debug Configuration in Eclipse:

Open the Eclipse and go to the Run --> Debug Configuration and after that double click on the Remote Java Application give the Name choose the project on which we want to apply debugger and provide the host (localhost) and port (30303) as shown in below image.

















After providing all the details click on debug button.
Now just apply the breakpoint on the java file which you want to debug and enjoy the debugging.








Uninstall AEM Bundle Manually

Uninstall the Bundle manually using CURL command.

curl -u username:password -daction=uninstall http://hostname:4502/system/console/bundles/bundle-name


Runmode of AEM



Check the Runmode of AEM (cq5) 

Go to the URL  http://hostname:port/system/console/status-slingsettings and check the run modes of the AEM server.











In the above mention way, we verify the run mode directly through browser no need to access the server crx-quickstart folder directly.