Failed to Read Artifact Descriptor for Org.hibernate:hibernate-validator:jar
2.iii.1. Configure the JBoss EAP Maven vi Repository
Overview
At that place are ii approaches to straight Maven to use the JBoss EAP 6 Maven Repository in your project:
-
Yous can configure the repositories in the Maven global or user settings.
-
Y'all can configure the repositories in the project'south POM file.
Procedure 2.five. Configure Maven Settings to Use the JBoss EAP six Maven Repository
-
Configure the Maven repository using Maven settings
This is the recommended arroyo. Maven settings used with a repository director or repository on a shared server provide improve control and manageability of projects. Settings also provide the ability to use an alternative mirror to redirect all lookup requests for a specific repository to your repository managing director without irresolute the project files. For more than data about mirrors, come across http://maven.apache.org/guides/mini/guide-mirror-settings.html.
This method of configuration applies across all Maven projects, as long as the project POM file does not contain repository configuration.
-
Configure the Maven repository using the projection POM
This method of configuration is generally non recommended. If you decide to configure repositories in your project POM file, plan advisedly and be aware that it can dull down your build and yous may fifty-fifty end up with artifacts that are not from the expected repository.
In an Enterprise environment, where a repository manager is usually used, Maven should query all artifacts for all projects using this managing director. Because Maven uses all declared repositories to find missing artifacts, if it can't find what it's looking for, it will endeavor and look for it in the repository central (divers in the built-in parent POM). To override this central location, you lot tin can add a definition with
cardinal
and then that the default repository central is now your repository manager likewise. This works well for established projects, but for clean or 'new' projects information technology causes a problem as information technology creates a circadian dependency.Transitively included POMs are as well an consequence with this type of configuration. Maven has to query these external repositories for missing artifacts. This not only slows downward your build, it too causes you to lose control over where your artifacts are coming from and likely to cause broken builds.
This method of configuration overrides the global and user Maven settings for the configured project.
2.three.ii. Configure the JBoss EAP 6 Maven Repository Using the Maven Settings
There are two approaches to direct Maven to use the JBoss EAP 6 Maven Repository in your project:
-
You tin modify the Maven settings. This directs Maven to utilize the configuration across all projects.
-
Y'all can configure the project's POM file. This limits the configuration to the specific project.
This topic shows y'all how to direct Maven to utilize the JBoss EAP 6 Maven Repository across all projects using the Maven settings. This is the recommended approach.
You lot can configure Maven to utilise either the online or a locally installed JBoss EAP 6 repository. If you choose to employ the online repository, you can use a preconfigured settings file or add together the JBoss EAP 6 Maven profiles to the existing settings file. To apply a local repository, you lot must download the repository and configure the settings to point to your locally installed repository. The following procedures describe how to configure Maven for JBoss EAP half-dozen.
The URL of the repository will depend on where the repository is located; on the filesystem, or web server. For information on how to install the repository, see Section two.2.2, "Install the JBoss EAP half-dozen Maven Repository". The following are examples for each of the installation options:
- File Arrangement
-
file:///path/to/repo/jboss-eap-6.x-maven-repository
- Apache Web Server
-
http://intranet.acme.com/jboss-eap-half-dozen.ten-maven-repository/
- Nexus Repository Manager
-
https://intranet.elevation.com/nexus/content/repositories/jboss-eap-half-dozen.x-maven-repository
Y'all tin configure Maven using either the Maven install global settings or the user install settings. These instructions configure the user install settings as this is the about common configuration.
Procedure 2.6. Configure Maven Using the Settings Shipped with the Quickstart Examples
The JBoss EAP half dozen Quickstarts ship with a settings.xml
file that is configured to apply the online JBoss EAP 6 Maven repository. This is the simplest approach.
-
This procedure overwrites the existing Maven settings file, so you must dorsum up the existing Maven
settings.xml
file.-
Locate the Maven install directory for your operating system. Information technology is normally installed in
USER_HOME/.m2/
directory.-
For Linux or Mac, this is:
~/.m2/
-
For Windows, this is:
\Documents and Settings\USER_NAME\.m2\
or\Users\USER_NAME\.m2\
-
-
If you have an existing
USER_HOME/.m2/settings.xml
file, rename it or make a backup copy so you can restore it later on.
-
-
Re-create the
QUICKSTART_HOME/settings.xml
file to theUSER_HOME/.m2/
directory.
Procedure two.seven. Manually Edit and Configure the Maven Settings To Utilize the Online JBoss EAP 6 Maven Repository
You can manually add the JBoss EAP vi profiles to an existing Maven settings file.
-
Locate the Maven install directory for your operating organization. It is unremarkably installed in
USER_HOME/.m2/
directory.-
For Linux or Mac, this is
~/.m2/
-
For Windows, this is
\Documents and Settings\USER_NAME\.m2\
or\Users\USER_NAME\.m2\
-
-
If y'all exercise not discover a
settings.xml
file, copy thesettings.xml
file from theUSER_HOME/.m2/conf/
directory into theUSER_HOME/.m2/
directory. -
Copy the following XML into the
<profiles>
chemical element of the file.<!-- Configure the JBoss GA Maven repository --> <profile> <id>jboss-ga-repository</id> <repositories> <repository> <id>jboss-ga-repository</id> <url>http://maven.repository.redhat.com/techpreview/all</url> <releases> <enabled>truthful</enabled> </releases> <snapshots> <enabled>imitation</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-ga-plugin-repository</id> <url>http://maven.repository.redhat.com/techpreview/all</url> <releases> <enabled>truthful</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> <!-- Configure the JBoss Early Admission Maven repository --> <profile> <id>jboss-earlyaccess-repository</id> <repositories> <repository> <id>jboss-earlyaccess-repository</id> <url>http://maven.repository.redhat.com/earlyaccess/all/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-earlyaccess-plugin-repository</id> <url>http://maven.repository.redhat.com/earlyaccess/all/</url> <releases> <enabled>truthful</enabled> </releases> <snapshots> <enabled>imitation</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile>
Re-create the post-obit XML into the
<activeProfiles>
element of thesettings.xml
file.<activeProfile>jboss-ga-repository</activeProfile> <activeProfile>jboss-earlyaccess-repository</activeProfile>
Procedure ii.8. Configure the Settings to Use a Locally Installed JBoss EAP Repository
You can modify the settings to apply the JBoss EAP 6 repository installed on the local file system.
-
Locate the Maven install directory for your operating system. It is commonly installed in
USER_HOME/.m2/
directory.-
For Linux or Mac, this is
~/.m2/
-
For Windows, this is
\Documents and Settings\USER_NAME\.m2\
or\Users\USER_NAME\.m2\
-
-
If you practise not observe a
settings.xml
file, copy thesettings.xml
file from theUSER_HOME/.m2/conf/
directory into theUSER_HOME/.m2/
directory. -
Copy the following XML into the
<profiles>
chemical element of thesettings.xml
file. Be sure to change the<url>
to the bodily repository location.<profile> <id>jboss-eap-repository</id> <repositories> <repository> <id>jboss-eap-repository</id> <proper noun>JBoss EAP Maven Repository</proper noun> <url>file:///path/to/repo/jboss-eap-six.x-maven-repository</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>simulated</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-eap-repository-grouping</id> <proper noun>JBoss EAP Maven Repository</proper noun> <url> file:///path/to/repo/jboss-eap-vi.x-maven-repository </url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> <updatePolicy>never</updatePolicy> </snapshots> </pluginRepository> </pluginRepositories> </profile>
Copy the following XML into the
<activeProfiles>
element of thesettings.xml
file.<activeProfile>jboss-eap-repository</activeProfile>
Procedure 2.ix. Refresh the Ruby Hat JBoss Developer Studio User Settings
If you lot change the settings.xml
file while Scarlet Hat JBoss Developer Studio is running, you lot must refresh the user settings.
-
From the bill of fare, cull → .
-
In the Preferences Window, aggrandize Maven and cull User Settings .
-
Click the
button to refresh the Maven user settings in Blood-red Hat JBoss Developer Studio.Effigy 2.1. Update Maven User Settings
If your Maven repository contains outdated artifacts, you may encounter 1 of the following Maven mistake messages when you build or deploy your projection:
-
Missing artifact ARTIFACT_NAME
-
[ERROR] Failed to execute goal on project PROJECT_NAME; Could non resolve dependencies for PROJECT_NAME
To resolve the issue, delete the cached version of your local repository to force a download of the latest Maven artifacts. The cached repository is located in your ~/.m2/repository/
subdirectory on Linux, or the %SystemDrive%\Users\USERNAME\.m2\repository\
subdirectory on Windows.
2.3.three. Configure Maven for Utilise with Reddish Hat JBoss Developer Studio
The artifacts and dependencies needed to build and deploy applications to Cerise Hat JBoss Enterprise Application Platform are hosted on a public repository. You lot must direct Maven to use this repository when you build your applications. This topic covers the steps to configure Maven if you program to build and deploy applications using Crimson Hat JBoss Programmer Studio.
Maven is distributed with Red Hat JBoss Programmer Studio, then it is non necessary to install information technology separately. However, you must configure Maven for use past the Coffee EE Web Project wizard for deployments to JBoss EAP. The procedure below demonstrates how to configure Maven for use with JBoss EAP by editing the Maven configuration file from within Ruby Hat JBoss Developer Studio.
Procedure 2.10. Configure Maven in Red Hat JBoss Developer Studio
-
Click →, aggrandize JBoss Tools and select JBoss Maven Integration .
Figure 2.2. JBoss Maven Integration Pane in the Preferences Window
-
Click
. -
Click
to configure the JBoss GA Tech Preview Maven repository. Complete theAdd together Maven Repository
dialog as follows:-
Gear up the Contour ID , Repository ID , and Repository Name values to
jboss-ga-repository
. -
Set the Repository URL value to
http://maven.repository.redhat.com/techpreview/all
. -
Click the
checkbox to enable the Maven repository. -
Click
Effigy ii.3. Add Maven Repository - JBoss Tech Preview
-
-
Click
to configure the JBoss Early Admission Maven repository. Complete theAdd Maven Repository
dialog equally follows:-
Set the Profile ID , Repository ID , and Repository Proper name values to
jboss-earlyaccess-repository
. -
Set the Repository URL value to
http://maven.repository.redhat.com/earlyaccess/all/
. -
Click the
checkbox to enable the Maven repository. -
Click
Figure two.4. Add Maven Repository - JBoss Early on Access
-
-
Review the repositories and click
.Figure 2.v. Review Maven Repositories
-
You are prompted with the bulletin "Are you lot sure you desire to update the file 'MAVEN_HOME/settings.xml'?". Click
to update the settings. Click to close the dialog.The JBoss EAP Maven repository is now configured for use with Crimson Hat JBoss Programmer Studio.
2.3.4. Configure the JBoss EAP vi Maven Repository Using the Projection POM
There are two approaches to direct Maven to employ the JBoss EAP 6 Maven Repository in your project:
-
Yous tin modify the Maven settings.
-
You can configure the project's POM file.
This chore shows you how to configure a specific project to use the JBoss EAP half dozen Maven Repository by calculation repository information to the projection pom.xml
. This configuration method supercedes and overrides the global and user settings configurations.
This method of configuration is more often than not non recommended. If y'all determine to configure repositories in your project POM file, plan carefully and be aware that it can wearisome downwardly your build and y'all may even end up with artifacts that are not from the expected repository.
In an Enterprise environs, where a repository manager is usually used, Maven should query all artifacts for all projects using this manager. Because Maven uses all declared repositories to find missing artifacts, if it tin can't find what it's looking for, information technology will endeavor and expect for it in the repository central (defined in the congenital-in parent POM). To override this central location, you can add together a definition with central
so that the default repository central is now your repository manager as well. This works well for established projects, simply for clean or 'new' projects it causes a problem as it creates a cyclic dependency.
Transitively included POMs are likewise an upshot with this type of configuration. Maven has to query these external repositories for missing artifacts. This not only slows downwardly your build, it also causes you to lose control over where your artifacts are coming from and likely to cause cleaved builds.
The URL of the repository will depend on where the repository is located; on the filesystem, or web server. For information on how to install the repository, run across: Section 2.2.2, "Install the JBoss EAP six Maven Repository". The following are examples for each of the installation options:
- File Arrangement
-
file:///path/to/repo/jboss-eap-half dozen.x-maven-repository
- Apache Web Server
-
http://intranet.meridian.com/jboss-eap-vi.10-maven-repository/
- Nexus Repository Managing director
-
https://intranet.tiptop.com/nexus/content/repositories/jboss-eap-six.10-maven-repository
-
Open your project'south
pom.xml
file in a text editor. -
Add the following repository configuration. If there is already a
<repositories>
configuration in the file, then add the<repository>
chemical element to information technology. Exist sure to modify the<url>
to the actual repository location.<repositories> <repository> <id>jboss-eap-repository-group</id> <name>JBoss EAP Maven Repository</name> <url>file:///path/to/repo/jboss-eap-6.x.0-maven-repository/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> </repositories>
-
Add the following plug-in repository configuration. If at that place is already a
<pluginRepositories>
configuration in the file, then add together the<pluginRepository>
chemical element to it.<pluginRepositories> <pluginRepository> <id>jboss-eap-repository-group</id> <name>JBoss EAP Maven Repository</name> <url>file:///path/to/repo/jboss-eap-6.x.0-maven-repository/</url> <releases> <enabled>truthful</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories>
2.iii.5. Manage Project Dependencies
This topic describes the usage of Bill of Materials (BOM) POMs for Cherry Hat JBoss Enterprise Application Platform 6.
A BOM is a Maven pom.xml
(POM) file that specifies the versions of all runtime dependencies for a given module. Version dependencies are listed in the dependency management section of the file.
A project uses a BOM by adding its groupId:artifactId:version
(GAV) to the dependency management section of the project pom.xml
file and specifying the <scope>import</telescopic>
and <type>pom</type>
element values.
In many cases, dependencies in project POM files use the provided
scope. This is because these classes are provided by the application server at runtime and it is non necessary to bundle them with the user application.
Supported Maven Artifacts
Every bit part of the product build process, all runtime components of JBoss EAP are built from source in a controlled environment. This helps to ensure that the binary artifacts do not contain any malicious code, and that they tin can exist supported for the life of the product. These artifacts can exist easily identified by the -redhat
version qualifier, for example 1.0.0-redhat-1
.
Adding a supported artifact to the build configuration pom.xml
file ensures that the build is using the correct binary artifact for local building and testing. Note that an artifact with a -redhat
version is not necessarily part of the supported public API, and may change in future revisions. For information near the public supported API, see the JavaDoc documentation included in the release.
For example, to use the supported version of hibernate, add together something similar to the following to your build configuration.
<dependency> <groupId>org.hide</groupId> <artifactId>hide-core</artifactId> <version>4.ii.16.Final-redhat-1</version> <telescopic>provided</scope> </dependency>
Discover that the above instance includes a value for the <version/>
field. Nonetheless, it is recommended to use Maven dependency management for configuring dependency versions.
Dependency Management
Maven includes a mechanism for managing the versions of direct and transitive dependencies throughout the build. For general data about using dependency direction, run across the Apache Maven Projection Introduction to the Dependency Machinery.
Using ane or more than supported JBoss dependencies straight in your build does not guarantee that all transitive dependencies of the build volition be fully supported JBoss artifacts. It is common for Maven builds to use a mix of artifact sources from the Maven cardinal repository, the JBoss.org Maven repository, and other Maven repositories.
Included with the JBoss EAP Maven repository is a dependency management BOM, which specifies all supported JBoss EAP binary artifacts. This BOM tin can be used in a build to ensure that Maven will prioritize supported JBoss EAP dependencies for all direct and transitive dependencies in the build. In other words, transitive dependencies will be managed to the right supported dependency version where applicable. The version of this BOM matches the version of the JBoss EAP release.
<dependencyManagement> <dependencies> ... <dependency> <groupId>org.jboss.bom</groupId> <artifactId>eap6-supported-artifacts</artifactId> <version>half dozen.4.0.GA</version> <blazon>pom</type> <telescopic>import</scope> </dependency> ... </dependencies> </dependencyManagement>
JBoss JavaEE Specs Bom
The jboss-javaee-half dozen.0
BOM contains the Java EE Specification API JARs used past JBoss EAP.
To use this BOM in a project, add a dependency for the GAV that contains the version of the JSP and Servlet API JARs needed to build and deploy the awarding.
The following example uses the 3.0.ii.Final-redhat-ten
version of the jboss-javaee-6.0
BOM.
<dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <version>iii.0.2.Final-redhat-x</version> <type>pom</type> <scope>import</scope> </dependency> ... </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.spec.javax.servlet</groupId> <artifactId>jboss-servlet-api_3.0_spec</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss.spec.javax.servlet.jsp</groupId> <artifactId>jboss-jsp-api_2.2_spec</artifactId> <scope>provided</scope> </dependency> ... </dependencies>
JBoss EAP BOMs and Quickstarts
The quickstarts provide the chief use case examples for the Maven repository. The following tabular array lists the Maven BOMs used by the quickstarts.
Table two.1. JBoss BOMs Used by the Quickstarts
Maven artifactId | Clarification |
---|---|
jboss-javaee-six.0-with-hide | This BOM builds on the Java EE total profile BOM, adding Hibernate Community projects including Hide ORM, Hide Search and Hibernate Validator. It also provides tool projects such as Hibernate JPA Model Gen and Hibernate Validator Notation Processor. |
jboss-javaee-6.0-with-hibernate3 | This BOM builds on the Coffee EE full contour BOM, adding Hibernate Community projects including Hibernate 3 ORM, Hibernate Entity Manager (JPA 1.0) and Hibernate Validator. |
jboss-javaee-6.0-with-logging | This BOM builds on the Java EE full profile BOM, adding the JBoss Logging Tools and Log4j framework. |
jboss-javaee-6.0-with-osgi | This BOM builds on the Java EE full profile BOM, adding OSGI. |
jboss-javaee-6.0-with-resteasy | This BOM builds on the Coffee EE full profile BOM, adding RESTEasy |
jboss-javaee-six.0-with-security | This BOM builds on the Coffee EE full contour BOM, adding Picketlink. |
jboss-javaee-6.0-with-tools | This BOM builds on the Java EE total profile BOM, adding Arquillian to the mix. Information technology also provides a version of JUnit and TestNG recommended for utilise with Arquillian. |
jboss-javaee-half-dozen.0-with-transactions | This BOM includes a world class transaction managing director. Use the JBossTS APIs to access its full capabilities. |
The post-obit instance uses the vi.four.0.GA
version of the jboss-javaee-6.0-with-hibernate
BOM.
<dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.bom.eap</groupId> <artifactId>jboss-javaee-6.0-with-hibernate</artifactId> <version>6.four.0.GA</version> <type>pom</blazon> <scope>import</scope> </dependency> ... </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <telescopic>provided</telescopic> </dependency> ... </dependencies>
JBoss Client BOMs
The JBoss EAP server build includes two client BOMs: jboss-as-ejb-customer-bom
and jboss-equally-jms-client-bom
.
The customer BOMs exercise non create a dependency management section or ascertain dependencies. Instead, they are an aggregate of other BOMs and are used to package the set of dependencies necessary for a remote client use case.
The following example uses the 7.4.0.Concluding-redhat-x
version of the jboss-as-ejb-client-bom
client BOM.
<dependencies> <dependency> <groupId>org.jboss.as</groupId> <artifactId>jboss-equally-ejb-client-bom</artifactId> <version>7.5.0.Final-redhat-x</version> <blazon>pom</type> </dependency> ...l </dependencies>
This case uses the 7.4.0.Final-redhat-x
version of the jboss-equally-jms-client-bom
client BOM.
<dependencies> <dependency> <groupId>org.jboss.every bit</groupId> <artifactId>jboss-equally-jms-customer-bom</artifactId> <version>seven.4.0.Final-redhat-ten</version> <blazon>pom</blazon> </dependency> ... </dependencies>
Source: https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/6.4/html/development_guide/sect-use_the_maven_repository
0 Response to "Failed to Read Artifact Descriptor for Org.hibernate:hibernate-validator:jar"
Postar um comentário