How to install maven-jdocbook-plugin? - plugins

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>

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

maven jboss artifact issue

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

Maven plugin could not find artifact when using remote server

I'm trying to write my own maven plugin. When I manually mvn install the plugin project, I can use it without a problem, but I'm having a problem retrieving it from our remote maven repository. This error occurs if I delete the com/company/my-plugin from my .m2/repository directory and then try to do mvn install.
[WARNING] The POM for com.company:my-plugin:jar:0.0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.472s
[INFO] Finished at: Wed Jun 19 16:15:29 EDT 2013
[INFO] Final Memory: 4M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin com.company:my-plugin:0.0.1-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.company:my-plugin:jar:0.0.1-SNAPSHOT: Could not find artifact com.company:my-plugin:pom:0.0.1-SNAPSHOT -> [Help 1]
The only reference to the plugin in the pom is in the build/plugins section:
<plugin>
<groupId>com.company</groupId>
<artifactId>my-plugin</artifactId>
<version>0.0.1-SNAPSHOT</version>
<configuration>
<sourceFiles>
<sourceFile>infile.foo</sourceFile>
</sourceFiles>
<outputFile>outpath/myfile.foo</outputFile>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>my-goal</goal>
</goals>
</execution>
</executions>
</plugin>
I've confirmed that the project exists in our remote repository and that other dependencies in that repository are resolving. The other dependencies are not plugins, however.
Is there additional configuration I need to specify to resolve a plugin dependency? Is there an approach I can use to help me figure out what's causing this problem more specifically?
Turns out I needed to separately specify the location of plugin repositories in the pom (in addition to specifying the remote repository normally). I was missing the following block:
<pluginRepositories>
<pluginRepository>
<id>my-plugin-repo</id>
<url>https://nexus.company.com:8443/path/to/repository/</url>
</pluginRepository>
</pluginRepositories>
"[WARNING] The POM for com.company:my-plugin:jar:0.0.1-SNAPSHOT is missing, no dependency information available"
Are you sure if the pom.xml for this plugin project exists in the plugin remote repository you are trying to pull from? If no, i probably think that should be the problem.