Could not find artifact javax.xml.crypto:xmldsig - maven

Each time when I'm trying to build the Spring application I got an error:
im#im:~/projects/nsn_maintenance_be/maintenance$ mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building maintenance 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for javax.xml.crypto:xmldsig:jar:1.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.770 s
[INFO] Finished at: 2019-05-22T19:09:32+03:00
[INFO] Final Memory: 11M/211M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project maintenance: Could not resolve dependencies for project com.ia:maintenance:war:1.0-SNAPSHOT: Failure to find javax.xml.crypto:xmldsig:jar:1.0 in http://maven.springframework.org/release was cached in the local repository, resolution will not be reattempted until the update interval of spring-maven-release 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
the pom.xml file (repositories part):
<repositories>
<repository>
<id>spring-maven-release</id>
<name>Spring Maven Release Repository</name>
<url>http://maven.springframework.org/release</url>
</repository>
<repository>
<id>spring-maven-milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
<repository>
<id>spring-roo-repository</id>
<name>Spring Roo Repository</name>
<url>http://spring-roo-repository.springsource.org/release</url>
</repository>
</repositories>
I did some research and fond this lib https://mvnrepository.com/artifact/javax.xml/xmldsig/1.0 instead of javax.xml.crypto:xmldsig:jar:1.0, but I can't cut javax.xml.crypto:xmldsig:jar:1.0 from the repository. The dependencies part in my pom.xml doesn't contain javax.xml.crypto lib.
I guess that the problem is here (in this repository) http://spring-roo-repository.springsource.org/release because it returns:
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>release</Key>
<RequestId>C7A040F5A0227562</RequestId>
<HostId>uPDsneugMkZ3DgdU5THuUsWdaC/wEkyfgXAUPntzxdcsprT1C6M2eNgK0jo5cr2KLdNAW7uU=
</HostId>
</Error>
How can I built the application?

Related

Maven cannot download from Artifactory Repository

I am attempting to connect our Jenkins servers to our Artifactory repository for builds. I've been successful with the Jenkins server at my office location, but I am having problems with a Jenkins server that's on another part of the corporate network.
I've disabled the job, went into the workspace, and tried using mvn directly:
$ mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] PROJ Generic Aggregate POM
[INFO] PROJ Generic Module
[INFO] PROJ Generic Features
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PROJ Generic Aggregate POM 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.vegicorp.net/artifactory/plugins-release/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
And then it freezes before it spits out:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PROJ Generic Aggregate POM ........................ FAILURE [2:06.295s]
[INFO] PROJ Generic Module ............................... SKIPPED
[INFO] PROJ Generic Features ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:07.160s
[INFO] Finished at: Wed Feb 11 18:16:46 EST 2015
[INFO] Final Memory: 8M/149M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.vegicorp.net/artifactory/plugins-release): Connection to http://repo.vegicorp.net refused: Connection timed out -> [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/PluginResolutionException
to
However, if I attempt to fetch that URL via curl, it downloads without any problems. Same with wget:
$ curl http://repo.vegicorp.net/artifactory/plugins-release/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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>
So, I am able to reach that URL via wget and curl, but Maven itself seems to be having problems fetching that URL. I've added a proxy settings to my ~/.m2/settings.xml, but that doesn't seem to make any difference. We originally setup our Maven repository to redirect from Port 80 to Port 8080, but adding or removing the port number from the URL makes no difference. The settings.xml is from Artifactory which will generate it for you. The same settings.xml works in our office.
Removing the settings.xml allows everything to work because it can download from the standard Maven repo.
My settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>dweintraub</username>
<password>AP8SoMtGnYpACsAwZo5oqUCfSYP</password>
<id>central</id>
</server>
<server>
<username>dweintraub</username>
<password>AP8SoMtGnYpACsAwZo5oqUCfSYP</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://repo.vegicorp.net/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://repo.vegicorp.net/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://repo.vegicorp.net/artifactory/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://repo.vegicorp.net/artifactory/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
And there's a file ~/.m2/repositories/org/apache/maven/plugins/maven-clean-plugins/2.4.1/maven-clean-plugin-2.4.1.pom.lastUpdated with this content:
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Wed Feb 11 18:16:46 EST 2015
da39a3ee5e6b4b0d3255bfef95601890afd80709#proxy.gain.tcprod.local\:3128>2f606e371a64780e100321226a9f68a38c8b7906#default-http\://repo.vegicorp.net/artifactory/plugins-release/.lastUpdated=1423695463870
2f606e371a64780e100321226a9f68a38c8b7906#default-http\://repo.vegicorp.net/artifactory/plugins-release/.lastUpdated=1423696543392
http\://repo.vegicorp.net/artifactory/plugins-release/.error=Could not transfer artifact org.apache.maven.plugins\:maven-clean-plugin\:pom\:2.4.1 from/to central (http\://repo.vegicorp.net/artifactory/plugins-release)\: Connection to http\://repo.vegicorp.net refused
http\://repo.fusesource.com/nexus/content/repositories/releases/.lastUpdated=1423694766347
http\://repo.vegicorp.net/artifactory/plugins-snapshot/.error=Could not transfer artifact org.apache.maven.plugins\:maven-clean-plugin\:pom\:2.4.1 from/to snapshots (http\://repo.vegicorp.net/artifactory/plugins-snapshot)\: Connection to http\://repo.vegicorp.net refused
2f606e371a64780e100321226a9f68a38c8b7906#default-http\://repo.vegicorp.net/artifactory/plugins-snapshot/.lastUpdated=1423696606400
http\://repo.fusesource.com/nexus/content/repositories/releases/.error=
http\://repo.vegicorp.net/artifactory/plugins-release/.error=Could not transfer artifact org.apache.maven.plugins\:maven-clean-plugin\:pom\:2.4.1 from/to central (http\://repo.vegicorp.net/artifactory/plugins-release)\: Failed to transfer file\: http\://repo.vegicorp.net/artifactory/plugins-release/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom. Return code is\: 504 , ReasonPhrase\:Gateway Time-out.
That looks like a proxy settings problem. Can you please add the ouptut of mvn help:effective-settings to the question? Thanks!
I'm going to cry...
$ mvn help:effective-settings
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] PROJ Generic Aggregate POM
[INFO] PROJ Generic Module
[INFO] PROJ Generic Features
Downloading: http://repo.fusesource.com/nexus/content/repositories/releases/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
Downloading: http://repo.vegicorp.net/artifactory/plugins-release/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
and then it freezes and displays:
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Sorry. I can't run mvn help:effective-settings because of my settings...
Yet I don't know why, but after i restarted the nexus process, even before it truly started, maven download process continued.......
my environment: centos 7 , maven 3.6.3, java-1.8.0-openjdk-1.8.0.302

Error running Spring-Boot samples

I've just cloned the github repo for Spring Boot samples, and I am trying to run various samples but they all return the same error:
c:\temp\spring-boot\spring-boot-samples\spring-boot-sample-web-jsp>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring Boot Web JSP Sample 1.2.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.springframework.boot:spring-boot-maven-plugin:jar:1.2.0.BUILD-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.197s
[INFO] Finished at: Fri Aug 29 11:57:22 BST 2014
[INFO] Final Memory: 3M/183M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:1.2.0.BUILD-SNAPSHOT or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:1.2.0.BUILD-SNAPSHOT: Could not find artifact org.springframework.boot:
spring-boot-maven-plugin:pom:1.2.0.BUILD-SNAPSHOT -> [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/PluginResolutionException
Have I missed anything? Do I need to add a repo for Spring Boot? The only Spring Boot artifacts in the main maven repo are all 1.1.5.RELEASE. If I replace 1.2.0.BUILD-SNAPSHOT with 1.1.5.RELEASE, it builds; but then unsurprisingly fails to run.
I ran into the same problem when I updated from 1.1.5.RELEASE.
I ran mvn install from the spring-boot directory.
It took over 1 hour 10 minutes!
Let me know if this fixes it!
Did you have the pom file pointing to the snapshot repo as in this link? The repo link has the maven plugin contents listed.
<repositories>
<repository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>

Why does maven build fails on dowloading itext from incorrect repo?

I am downloading certain dependency from external repository. So I have added following repository tag to my pom.xml
<repository>
<id>cdatoolsrelease</id>
<name>cdatools.com-releases</name>
<url>http://www.cdatools.com:8081/artifactory/ext-release-local</url>
</repository>
<repository>
<id>cdatoolssnapshot</id>
<name>cdatools.com-snapshot</name>
<url>http://www.cdatools.com:8081/artifactory/libs-snapshot-local</url>
</repository>
Everything works well. I can see my required dependencies downloaded as well. But when I try to build this project i get following exception and build fails\
D:\WORKSPACE\some-project>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count
of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building some-project 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://www.cdatools.com:8081/artifactory/libs-snapshot-local/com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.122 s
[INFO] Finished at: 2014-07-17T11:53:53+05:45
[INFO] Final Memory: 10M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project some-project: Could not resolve dependencies for project ProjectName:some-project:war:0.0.1-SNAPSHOT: Failed to collect dependencies at net.sf.jasperrepor
ts:jasperreports:jar:5.1.2 -> com.lowagie:itext:jar:2.1.7.js2: Failed to read artifact descriptor for com.lowagie:itext:jar:2.
1.7.js2: Could not transfer artifact com.lowagie:itext:pom:2.1.7.js2 from/to cdatoolssnapshot (http://www.cdatools.com:8081/ar
tifactory/libs-snapshot-local): Failed to transfer file: http://www.cdatools.com:8081/artifactory/libs-snapshot-local/com/lowa
gie/itext/2.1.7.js2/itext-2.1.7.js2.pom. Return code is: 409 , ReasonPhrase:The repository 'libs-snapshot-local' rejected the
artifact 'libs-snapshot-local:com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2.pom' due to its snapshot/release handling policy.. -
> [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 don't have itext dependency in my pom file but I do have jasper dependency.
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>5.1.2</version>
</dependency>
Maven is trying to search itext dependency in cdatools repo but in case it does not get it maven build fails. How can i make it work. When I remove the repo everything works well as it was originally before I added new repo tag
I resolved this problem adding 2 repositories in pom.xml:
<repository>
<id>jasper</id>
<url>http://jasperreports.sourceforge.net/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jasper1</id>
<url>http://jaspersoft.artifactoryonline.com/jaspersoft/jaspersoft-repo/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

Maven fails to find Jive archetypes from repository when building initial jive project

I'm trying to follow the instructions as specified here: https://community.jivesoftware.com/docs/DOC-3544
For some reason when I execute:
mvn archetype:generate -e -B -DarchetypeGroupId=com.jivesoftware.maven -DarchetypeArtifactId=maven-jive-archetype -DarchetypeVersion=6.0.x-SNAPSHOT -DgroupId=com.jivesoftware.dummycustomer -DartifactId=dummyCustomerSite
It doesn't seem to be able to find the archetype.
I believe I've added all the changes I needed to my ~/.m2/settings.xml (i.e. proxy settings, profile, and jive credentials)
<?xml version="1.0"?>
<settings>
<profiles>
<profile>
<id>jive.archiva</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>jive.internal</id>
<name>Jive's Repository</name>
<url>https://maven-secure.jivesoftware.com/archiva/repository/jive.internal</url>
</repository>
<repository>
<id>jive.snapshots</id>
<name>Jive's Repository</name>
<url>https://maven-secure.jivesoftware.com/archiva/repository/jive.snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jive.internal</id>
<name>Jive's Repository</name>
<url>https://maven-secure.jivesoftware.com/archiva/repository/jive.internal</url>
</pluginRepository>
<pluginRepository>
<id>jive.snapshots</id>
<name>Jive's Repository</name>
<url>https://maven-secure.jivesoftware.com/archiva/repository/jive.snapshots</url>
</pluginRepository>
</pluginRepositories>
<properties>
<tomcat6.home><![CDATA[/usr/local/apache-tomcat-6.0.36]]></tomcat6.home>
<cargo.wait>false</cargo.wait>
<jive.setup>true</jive.setup>
<jive.devMode>true</jive.devMode>
<pluginDirs>null</pluginDirs>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>jive.internal</id>
<username>john.smith</username>
<password>password123</password>
</server>
<server>
<id>jive.snapshots</id>
<username>john.smith</username>
<password>password123</password>
</server>
<server>
<id>central</id>
<username>john.smith</username>
<password>password123</password>
</server>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.mycompany.com</host>
<port>8080</port>
<nonProxyHosts>*.mycompany.com|localhost</nonProxyHosts>
</proxy>
</proxies>
</settings>
When running, Maven says it can't find the file:
$mvn archetype:create -DarchetypeGroupId=com.jivesoftware.maven -DarchetypeArtifactId=maven-jive-archetype -DarchetypeVersion=5.0.x-SNAPSHOT -DgroupId=com.cirrus.jive -DartifactId=tap
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-archetype-plugin:2.2:create (default-cli) # standalone-pom ---
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.cirrus.jive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.116s
[INFO] Finished at: Thu Apr 11 16:17:50 CDT 2013
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:create (default-cli) on project standalone-pom: Error creating from archetype: org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested com.jivesoftware.maven:maven-jive-archetype:jar:5.0.x-SNAPSHOT download does not exist. Could not find artifact com.jivesoftware.maven:maven-jive-archetype:jar:5.0.x-SNAPSHOT
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=com.jivesoftware.maven -DartifactId=maven-jive-archetype -Dversion=5.0.x-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=com.jivesoftware.maven -DartifactId=maven-jive-archetype -Dversion=5.0.x-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] com.jivesoftware.maven:maven-jive-archetype:jar:5.0.x-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
[ERROR] -> [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/MojoExecutionException
EDIT: After following Charlee's suggesions, I get these warnings.
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo1.maven.org/maven2/com/jivesoftware/maven/maven-jive-archetype/6.0.x-SNAPSHOT/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/com/jivesoftware/maven/maven-jive-archetype/6.0.x-SNAPSHOT/maven-metadata.xml
...
...
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.245s
[INFO] Finished at: Fri Apr 12 10:03:30 CDT 2013
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
It looks like it still can't find the archetype, and then goes to another repository so this isn't exactly what I want.
If I change the argument for archetype version to 5.0 (which I think what my company might want me to use). Setting DarchetypeVersion=5.0.x-SNAPSHOT gives me this (note where it says xxxx actually should say http because stackoverflow is complaining that I can't post html links due to lack of my reputation):
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: xxxx://repo1.maven.org/maven2/com/jivesoftware/maven/maven-jive-archetype/5.0.x-SNAPSHOT/maven-metadata.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.009s
[INFO] Finished at: Fri Apr 12 10:08:44 CDT 2013
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.jivesoftware.maven:maven-jive-archetype:5.0.x-SNAPSHOT) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.jivesoftware.maven:maven-jive-archetype:5.0.x-SNAPSHOT)
Any advice as to why I can't seem to find the 5.0.x- snapshot?
Since the profile named jive.archiva is not active by default. AFAIK, there are 2 possible ways as the following :-
1.Execute the maven by specifying the profile id.
mvn archetype:generate -e -B
-P jive.archiva
-DarchetypeGroupId=com.jivesoftware.maven
-DarchetypeArtifactId=maven-jive-archetype
-DarchetypeVersion=6.0.x-SNAPSHOT
-DgroupId=com.jivesoftware.dummycustomer
-DartifactId=dummyCustomerSite
2.Make the profile active by missing some system property.
<profiles>
<profile>
<id>jive.archiva</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>!disableJive</name>
</property>
</activation>
</profile>
</profile>
You may wondered why we not use the <activeByDefault>true</activeByDefault>. Here may be the answer
This profile will automatically be active for all builds unless another profile in the same POM is activated using one of the previously described methods.All profiles that are active by default are automatically deactivated when a profile in the POM is activated on the command line or through its activation config.
Please see further information at Introduction to Build Profiles.
I hope this may help.

How to run a snapshot plugin

When I attempt to run below maven plugin using this command :
com.wordpress.pomfromjarmavenplugin:generate:0.0.1-SNAPSHOT:generatepom
I get this error :
Downloading:
https://oss.sonatype.org/content/repositories/snapshots/com/wordpress/pomfromjarmavenplugin/generate/0.0.1-SNAPSHOT/generate-0.0.1-SNAPSHOT.pom
[WARNING] The POM for
com.wordpress.pomfromjarmavenplugin:generate:jar:0.0.1-SNAPSHOT is
missing, no dependency information available [INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 1.862s [INFO] Finished at: Fri Nov 09 11:15:47 GMT
2012 [INFO] Final Memory: 5M/15M [INFO]
------------------------------------------------------------------------ [ERROR] Plugin
com.wordpress.pomfromjarmavenplugin:generate:0.0.1-SNAPSHOT or one of
its dependencies could not be resolved: Failed to read artifact
descriptor for
com.wordpress.pomfromjarmavenplugin:generate:jar:0.0.1-SNAPSHOT: Could
not find artifact
com.wordpress.pomfromjarmavenplugin:generate:pom:0.0.1-SNAPSHOT in
apache.snapshots
(https://oss.sonatype.org/content/repositories/snapshots/) -> [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/PluginResolutionException
Problem seems to be that all of the pom files have timestamps associated with them :
https://oss.sonatype.org/content/repositories/snapshots/com/wordpress/pomfromjarmavenplugin/generate/0.0.1-SNAPSHOT/
How can I run this plugin ? Do I need to wait until the plugin is released or somehow instruct maven to run the latest version of the snapshot ?
Add these lines to your pom:
<pluginRepositories>
<pluginRepository>
<id>oss.sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
Then your command should work:
mvn com.wordpress.pomfromjarmavenplugin:generate:0.0.1-SNAPSHOT:generatepom
Or add these lines to your pom:
<build>
<plugins>
<plugin>
<groupId>com.wordpress.pomfromjarmavenplugin</groupId>
<artifactId>generate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</plugin>
</plugins>
</build>
And then issue:
mvn generate:generatepom

Resources