maven jboss artifact issue - jboss

Though http://maven.repository.redhat.com/techpreview/all/ seems to contain all the required JBOSS artifacts,
Maven build complains:
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/jboss/spec/jboss-javaee-6.0/3.0.2.Final-redhat-13/jboss-javaee-6.0-3.0.2.Final-redhat-13.pom
Downloading: http://repo.maven.apache.org/maven2/org/jboss/bom/eap/jboss-javaee-6.0-with-hibernate/6.3.0.GA/jboss-javaee-6.0-with-hibernate-6.3.0.GA.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project jbossEAP6Grp:jbossEAP6Art:1.0-SNAPSHOT (D:\personal\archetypes\jbossEAP6Art\pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.spec:jboss-javaee-6.0:pom:3.0.2.Final-redhat-13 in central (http://repo.maven.apache.org/maven2) # org.jboss.bom.eap:jboss-javaee-6.0-with-tools:[unknown-version], D:\unzipped\apache-maven-3.2.2\repository\org\jboss\bom\eap\jboss-javaee-6.0-with-tools\6.3.0.GA\jboss-javaee-6.0-with-tools-6.3.0.GA.pom, line 46, column 25 -> [Help 2]
[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom.eap:jboss-javaee-6.0-with-hibernate:pom:6.3.0.GA in central (http://repo.maven.apache.org/maven2) # line 105, column 25 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Snippet of Settings.xml
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<id>alwaysActiveProfile</id>
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
.....
<repository>
<name>jboss-ga-repository</name>
<id>jboss-products-ga-repo</id>
<url>http://maven.repository.redhat.com/techpreview/all/</url>
</repository>
<repository>
<id>jboss-earlyaccess-repository</id>
<name>jboss-earlyaccess-repository</name>
<url>http://maven.repository.redhat.com/earlyaccess/all/</url>
</repository>
<repository>
<id>ops4j</id>
<name>ops4j</name>
<url>http://repository.ops4j.org/maven2/</url>
</repository>
</repositories>
</profile>
Environment
D:\unzipped\apache-maven-3.2.2\repository>cd /d D:\personal\archetypes\jbossEAP6Art> mvn -v
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T19:21:42+05:30)
Maven home: D:\unzipped\apache-maven-3.2.2
Java version: 1.7.0_67, vendor: Oracle Corporation
Java home: D:\installed\Java\jdk1.7.0_67\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Do I need to add any other repositories or do I need to do something else?
Please advise

Related

How to install maven dependency from Github packages?

I have created a maven dependency in Github package. I am trying to install this dependency in my another mule project.
settings.xml:
<server>
<id>github</id>
<username><owner></username>
<password><Token></password>
</server>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/<owner>/<repo-name></url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
</profile>
</profiles>
Dependency from Github package:
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>hello-world-3</artifactId>
<version>1.0.11-SNAPSHOT</version>
</dependency>
I have created a hello world mule application and added the dependency in Pom.xml and ran mvn install on command prompt.
Getting this error:
D:\WorkSpace\test-package-dependency>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.mycompany:test-package-dependency >----------------
[INFO] Building test-package-dependency 1.0.0-SNAPSHOT
[INFO] --------------------------[ mule-application ]--------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.845 s
[INFO] Finished at: 2021-11-19T17:21:57+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project test-package-dependency: Could not resolve dependencies for project com.mycompany:test-package-dependency:mule-application:1.0.0-SNAPSHOT: Failure to find com.mycompany:hello-world-3:jar:1.0.11-SNAPSHOT in https://maven.anypoint.mulesoft.com/api/v2/maven was cached in the local repository, resolution will not be reattempted until the update interval of anypoint-exchange-v2 has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
I have searched online and did not get solution for my error. Also, tried jitpack. It didnt help too.
you have to define access repository url in pom.xml of your project where you wanted to access.
Just define like below,
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/<owner>/<repo-name></url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
or also try only with id and url
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/<owner>/<repo-name></url>
</repository>
</repositories>
Notes: Make sure you have given access to read or download the jar so that Maven can easily download for you while running maven phases.

Error with Flyway Enterprise Edition Using Maven : Plugins could not be resolved

In my pom.xml I have
<dependencies>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-commandline</artifactId>
<version>${flyway-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<repositories>
<repository>
<id>flyway-repo</id>
<url>https://repo.flywaydb.org/repo/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>flyway-repo</id>
<url>https://repo.flywaydb.org/repo/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.flywaydb.enterprise</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>${flyway-maven-plugin.version}</version>
<configuration>
<url>${flyway.url}</url>
<user>${flyway.user}</user>
</configuration>
</plugin>
</plugins>
</build>
In my settings.xml, I have added
<server>
<id>flyway-repo</id>
<username>${licenseKey}</username>
<password>flyway</password>
</server>
And I am running the command mvn compile flyway:info, I'm getting the below errors
[WARNING] The POM for org.flywaydb.enterprise:flyway-maven-plugin:jar:6.0.4 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.232 s
[INFO] Finished at: 2019-11-29T09:28:09+04:00
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.flywaydb.enterprise:flyway-maven-plugin:6.0.4 or one of its dependencies could not be resolved: Failure to find org.flywaydb.enterprise:flyway-maven-plugin:jar:6.0.4 in https://repo.flywaydb.org/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of convergence-mirror has elapsed or updates are forced -> [Help 1]
[ERROR]
I have even set the flyway edition and flyway license key enviromental variables on my system. But I am still getting this error. Thanks to help !
If maven didn't resolve dependency, it will not try resolve it again until the update interval(24h usually)
Run maven with -U parameter to force dependency resolving, like mvn -U compile flyway:info or delete directory
/.m2/repository/org/flywaydb/enterprise/flyway-maven-plugin/6.0.4
Please look at
When maven says "resolution will not be reattempted until the update interval of MyRepo has elapsed", where is that interval specified?

maven dependency not resolved, not authorized error

I am trying to use a maven project in eclipse. This is the first time I am using maven repository.
I am using maven 3.2.3
When I do
mvn clean install -U
it shows these errors
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building TreetaggerV2 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://hlt-services4.fbk.eu:8080/artifactory/repo/de/tudarmstadt/ukp/dkpro/core/de.tudarmstadt.ukp.dkpro.core.treetagger-bin/20131118.0/de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom
Downloading: https://repo.maven.apache.org/maven2/de/tudarmstadt/ukp/dkpro/core/de.tudarmstadt.ukp.dkpro.core.treetagger-bin/20131118.0/de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.016 s
[INFO] Finished at: 2014-11-11T01:28:05-08:00
[INFO] Final Memory: 12M/333M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project TreetaggerV2: Could not resolve dependencies for project eu.excitementproject:TreetaggerV2:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-bin:jar:20131118.0: Failed to read artifact descriptor for de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-bin:jar:20131118.0: Could not transfer artifact de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-bin:pom:20131118.0 from/to FBK (http://hlt-services4.fbk.eu:8080/artifactory/repo): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
my pom file is
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>eu.excitementproject</groupId>
<artifactId>TreetaggerV2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>eu.excitementproject</groupId>
<artifactId>core</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>eu.excitementproject</groupId>
<artifactId>lap</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<!-- TreeTagger related dependencies -->
<dependency>
<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
<artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-bin</artifactId>
<version>20131118.0</version>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
<artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-de</artifactId>
<version>20121207.0</version>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
<artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-en</artifactId>
<version>20111109.0</version>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
<artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-it</artifactId>
<version>20101115.0</version>
</dependency>
<!-- end of TreeTagger related dependencies -->
</dependencies>
<repositories>
<repository>
<id>FBK</id>
<url>http://hlt-services4.fbk.eu:8080/artifactory/repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
I want to add treetagger from dkpro to the pom , but it gives an error?
I believe you are trying to use Excitement. They have some documentation to help you get TreeTagger set up: https://github.com/hltfbk/Excitement-Open-Platform/wiki/Step-by-Step,-TreeTagger-Installation
Unfortunately, the TreeTagger license does not permit redistribution of the binaries (or models), that is why you have to package the models and binaries yourself for use with Excitement (or DKPr Core for that matter).
Disclosure: I'm a developer of DKPro Core.
That said, the articles mentioned my MariuszS are also in general great pointers.
Read this articles:
TreeTagger configuration with DKPro and Maven
How to package resources (e.g. models) as Maven Artifacts
There is problem with accessing file: de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom
HTTP Status 401 - Download request for repo:path 'tl-repository:de/tudarmstadt/ukp/dkpro/core/de.tudarmstadt.ukp.dkpro.core.treetagger-bin/20131118.0/de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom' is forbidden for user 'anonymous'.
In general you need to add server definition with creditensial to settings.xml.
<settings>
<servers>
<server>
<id>hlt-services4.fbk.eu</id>
<username>user</username>
<password>password</password>
</server>
</servers>
</settings>
but in your particular case you need to install this jars locally using ant script (link above)
(..) we offer Ant scripts to automatically download the resources and package them as DKPro-compatible JARs. When the license permits, we upload these to our public Maven repository.
You can try building your project in offline mode -O if all artifacts are installed locally.
More: Adding Credentials to Your Maven Settings

Deploying AEM with maven (Error)

I am trying to deploy AEM with maven, so I follow this tutorial. When I run the command mvn clear package, I get the following error:
C:\workspace\myproject\app>mvn clean package
[INFO] Scanning for projects...
[WARNING] The POM for com.day.jcr.vault:maven-vault-plugin:jar:0.0.10 is missing
, no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.uum:app:1-SNAPSHOT (C:\workspace\myproject\app\pom.xml
) has 3 errors
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-
plugin:0.0.10 or one of its dependencies could not be resolved: Failure to find
com.day.jcr.vault:maven-vault-plugin:jar:0.0.10 in http://repo.maven.apache.org/
maven2 was cached in the local repository, resolution will not be reattempted un
til the update interval of central has elapsed or updates are forced -> [Help 2]
[ERROR] Unknown packaging: content-package # line 12, column 16
[ERROR] 'dependencies.dependency.groupId' for :core:jar is missing. # line 1
8, column 22
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
my myproject/app/pom.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.uum</groupId>
<artifactId>parent</artifactId>
<relativePath>../parent/pom.xml</relativePath>
<version>1-SNAPSHOT</version>
</parent>
<artifactId>app</artifactId>
<packaging>content-package</packaging>
<name>Sample Application package</name>
<dependencies>
<dependency>
<groupId><!-- {groupId} --></groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<!-- add additional dependencies -->
</dependencies>
<build>
<resources>
<resource>
<directory>${basedir}/META-INF</directory>
<targetPath>../vault-work/META-INF</targetPath>
</resource>
<resource>
<directory>${basedir}/jcr_root</directory>
<excludes>
<exclude>**/.vlt</exclude>
<exclude>**/.vltignore</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/.classpath</exclude>
<exclude>**/.project</exclude>
<exclude>**/.DS_Store</exclude>
<exclude>**/target/**</exclude>
<exclude>libs/**</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>maven-vault-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>Sample</group>
<requiresRoot>true</requiresRoot>
<install>true</install>
<verbose>true</verbose>
<packageFile>${project.build.directory}/${project.artifactId}-${project.version}.zip</packageFile>
<version>${project.version}</version>
<properties>
<acHandling>overwrite</acHandling>
</properties>
<embeddeds>
<embedded>
<groupId><!-- {groupId} --></groupId>
<artifactId>core</artifactId>
<target><!-- {install path in the repository (e.g. /apps/myproject/install)} --></target>
</embedded>
</embeddeds>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>installPackages</id>
<activation>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>maven-vault-plugin</artifactId>
<executions>
<execution>
<id>install-package</id>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Any idea how to get the deployment with maven works?
It looks maven does not know where to find the maven-vault-plugin. You will need to add the Adobe repository to your maven POM, see http://repo.adobe.com/.
That will cause the Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-
plugin:0.0.10 error and the Unknown packaging: content-package # line 12, column 16 errors.
Also, you still have some variable placeholders (<groupId><!-- {groupId} --></groupId>) from the tutorial left in your code that will need replacing. See the error:
[ERROR] 'dependencies.dependency.groupId' for :core:jar is missing. # line 18, column 22
In the <embeddeds> section of the vault plugin configuration, you can specify maven dependencies that you wish to include. An example of this can be seen in this Managing packages with Maven page.
If you don't want to include any external dependencies in your package right now, you could probably remove the<embeddeds> section altogether.
be sure that you have started CQ/AEM before building project. A lot of errors familiar with vault and maven arise because it.

How to install maven-jdocbook-plugin?

I want to compile netty, but when I run mvn install, it reports this error:
[INFO] ------------------------------------------------------------------------
[INFO] Building The Netty Project 4.0.0.Alpha1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jboss.maven.plugins:maven-jdocbook-plugin:jar:2.2.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
I find the document of maven-jdocbook-plugin, but I don't find a way to install it. My maven environment is:
E:\WORKSPACE_SCALA\netty>mvn --version
Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)
Maven home: E:\java\apache-maven-3.0.3\bin\..
Java version: 1.6.0_27, vendor: Sun Microsystems Inc.
Java home: E:\java\jdk1.6\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
How to install this plugin?
The pom for the plugin is missing, you should try to add JBoss plugin repository to your pom.xml (before the </project> tag):
<pluginRepositories>
<pluginRepository>
<id>JBoss Repo</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<name>JBoss Repo</name>
</pluginRepository>
</pluginRepositories>
You may also need to add it to your artifact repositories :
<repositories>
<repository>
<id>JBoss Repo</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<name>JBoss Repo</name>
</repository>
</repositories>