tomcat 7 maven plugin snapshot repository issue? - maven

I would like to have tomcat 7 maven plugin, and followed the instruction from [the plugin site][1].
What happened is that it seems to be able to find the tomcat 6.0.29, but not the version 7.
I know that because when i tried tomcat:run, the one that was started is the 6.0.29 version.
As far as i know, the plugin for t7 is still in development, thus the snapshot version, and i assumed that i'd need to provide the repo for the snapshot plugin, and i placed
<pluginRepository>
<id>tomcat snapshot</id>
<name>tomcat snapshot</name>
<url>http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/</url>
</pluginRepository>
but it doesnt seem to have any changes with my tomcat:run -U (to update the snapshot), still 6.x version running. Here's the output of my mvn tomcat:info -U :
C:\Users\albert\workspace\BasicSetup>mvn tomcat:info -U
[INFO] Scanning for projects...
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/apache
/tomcat/maven/tomcat7-maven-plugin/2.0-SNAPSHOT/maven-metadata.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/apache
/tomcat/maven/tomcat7-maven-plugin/2.0-SNAPSHOT/maven-metadata.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/apache
/tomcat/maven/tomcat7-maven-plugin/2.0-SNAPSHOT/tomcat7-maven-plugin-2.0-SNAPSHOT.pom
[WARNING] The POM for org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.0-SNAPSHOT is missing, no d
ependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-
SNAPSHOT: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT or one of its dependencie
s could not be resolved: Failed to read artifact descriptor for org.apache.tomcat.maven:tomcat7-mave
n-plugin:jar:2.0-SNAPSHOT
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/codeha
us/mojo/maven-metadata.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/apache
/maven/plugins/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (11 KB at 6.1
KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (18 KB at 10.7 KB/sec
)
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/codeha
us/mojo/tomcat-maven-plugin/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xml (
439 B at 0.1 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building BasicSetup Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/apache
/tomcat/maven/tomcat7-maven-plugin/2.0-SNAPSHOT/tomcat7-maven-plugin-2.0-SNAPSHOT.pom
[WARNING] The POM for org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.0-SNAPSHOT is missing, no d
ependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-
SNAPSHOT: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT or one of its dependencie
s could not be resolved: Failed to read artifact descriptor for org.apache.tomcat.maven:tomcat7-mave
n-plugin:jar:2.0-SNAPSHOT
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/codeha
us/mojo/maven-metadata.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/apache
/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (11 KB at 6.0
KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (18 KB at 4.4 KB/sec)
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/maven/org/codeha
us/mojo/tomcat-maven-plugin/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xml (
439 B at 0.2 KB/sec)
[INFO]
[INFO] --- tomcat-maven-plugin:1.1:info (default-cli) # BasicSetup ---
[INFO] Listing server information at http://localhost:8080/manager
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.348s
[INFO] Finished at: Wed Oct 26 14:28:40 ICT 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:info (default-cli) on proje
ct BasicSetup: Cannot invoke Tomcat manager: Connection refused: connect -> [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 arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Any help would be appreciated ..

Try this:
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshots</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/snapshot-test.html

Related

mvn dependency:tree, multi-module and ${revision}

Does dependency:tree understand ${revision}?
I have a multi-module project X:
<groupId>org.X</groupId>
<artifactId>X-parent</artifactId>
<version>${revision}</version>
<properties>
<revision>8.0.0-SNAPSHOT</revision>
</properties>
<modules>
<module>X-A</module>
:
It is installed to my local .m2 (and only there).
I have a project Y which depends on X-A, revision 8.0.0-SNAPSHOT
Project Y's pom also includes:
<repositories>
<repository>
<id>rescarta</id>
<url>http://software.rescarta.org/nexus/content/groups/public/</url>
</repository>
</repositories>
When I run mvn dependency:tree on project Y, it complains:
$ mvn -U dependency:tree
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/3.0.1/maven-dependency-plugin-3.0.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/3.0.1/maven-dependency-plugin-3.0.1.pom (14 kB at 7.0 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/3.0.1/maven-dependency-plugin-3.0.1.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/3.0.1/maven-dependency-plugin-3.0.1.jar (164 kB at 186 kB/s)
[INFO]
[INFO] -------------------< com.y:Y >-------------------
[INFO] Building Y 8.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from rescarta: http://software.rescarta.org/nexus/content/groups/public/org/x/X-A/8.0.0-SNAPSHOT/maven-metadata.xml
Downloading from rescarta: http://software.rescarta.org/nexus/content/groups/public/org/x/X-parent/$%7Brevision%7D/X-parent-$%7Brevision%7D.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/x/X-parent/$%7Brevision%7D/X-parent-$%7Brevision%7D.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.681 s
[INFO] Finished at: 2019-04-08T06:45:53+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Y: Could not resolve dependencies for project com.y:Y:jar:8.0.0-SNAPSHOT: Failed to collect dependencies at org.x:X-A:jar:8.0.0-SNAPSHOT: Failed to read artifact descriptor for org.x:X-A:jar:8.0.0-SNAPSHOT: Could not find artifact org.x:X-parent:pom:${revision} in rescarta (http://software.rescarta.org/nexus/content/groups/public/) -> [Help 1]
Notice it is trying to download org.x:X-parent:pom:${revision}, not org.x:X-parent:pom:8.0.0-SNAPSHOT
Does dependency:tree not know how to resolve ${revision}?
The flatten-maven-plugin as explained at https://stackoverflow.com/a/52173650/1031689 seems to be an effective workaround.

Why am I obtaining this Maven error when I try to compile a .car application related to an ESB project containing a single proxy?

I was studying the VFS concept and I was trying to implement this tutorial:
https://docs.wso2.com/pages/viewpage.action?pageId=87712181
but I have some doubts about it:
Starting the ESB with this sample configuration (as explained here: https://docs.wso2.com/display/EI620/Setting+Up+the+ESB+Samples#SettingUptheESBSamples-Startingasample ) it works fine:
wso2ei-samples.bat -sn 254
So basically I have the 254 sample that is defined in this file on my PC:
C:\WSO2\EI\6.3.0\samples\service-bus\synapse_sample_254.xml
I think that starting EI with the previous -sn 253 parameter will execute this flow. How exactly works? My idea is that it take the proxy into this file synapse_sample_254.xml and automatically deploy it after that the EI is started. But I am abslolutly not sure about this assertion.
Anyay in this way it works.
The problem is that I am trying to implement this behavior inside an ESB project creating a proxy and in this case it is not working.
What I have done:
1) I create an ESB Config Project (named VFSTest).
2) Into this project I create a custom proxy. New --> Proxy Service --> Create A New Proxy Service. I set the "Proxy Service Name" to VFSProxy. Then I chose Custom Proxy as value for the Proxy Service Type dropdown. So my new proxy is created.
3) I insert the following code for this proxy (using the Source tab):
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy name="StockQuoteProxy" startOnLoad="true" transports="vfs">
<target>
<endpoint>
<address format="soap12" uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
<inSequence/>
<outSequence>
<property expression="fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.xml')" name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<send>
<endpoint>
<address uri="vfs:file://C:\Users\nobil\OneDrive\Documenti\WSO2\RESOURCES\VFSTest\out"/>
</endpoint>
</send>
</outSequence>
<faultSequence/>
</target>
<publishWSDL preservePolicy="true" uri="file:samples/service-bus/resources/proxy/sample_proxy_1.wsdl"/>
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.FileURI">file://C:\Users\nobil\OneDrive\Documenti\WSO2\RESOURCES\VFSTest\in</parameter>
<parameter name="transport.vfs.ContentType">text/xml</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file://C:\Users\nobil\OneDrive\Documenti\WSO2\RESOURCES\VFSTest\failure</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file://C:\Users\nobil\OneDrive\Documenti\WSO2\RESOURCES\VFSTest\success</parameter>
</proxy>
</definitions>
(I only replaced the same line replaced in the previous sample related to the directory and the endpoint on my PC, it is the same code).
So now I have my ESB project containing this proxy.
Then I create a new Composite Application Project named VFSTestCAP and I add the previous VFSTest ESB project as dependency.
Finnally I select the pom.xml file of this VFSTestCAP project and I do a Run As --> Maven Install to build the .car application that have to be deployed on my server.
The problem is that doing in this way Maven fails, this is my stack trace:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building VFSTestCAP 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml (397 B at 0.3 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml (843 B at 0.6 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml (843 B at 0.6 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (2 KB at 1.4 KB/sec)
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (402 B at 0.5 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (2 KB at 1.3 KB/sec)
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml (491 B at 0.6 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml (2 KB at 2.0 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml (2 KB at 2.0 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml (366 B at 0.5 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml (663 B at 0.8 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml (663 B at 0.8 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml (394 B at 0.5 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml (749 B at 0.9 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml (749 B at 0.9 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.pom
[INFO] Downloading: http://dist.wso2.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.pom
[WARNING] The POM for com.example.VFSTest.proxy-service:VFSProxy:xml:1.0.0 is missing, no dependency information available
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.xml
[INFO] Downloading: http://dist.wso2.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.xml
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.597 s
[INFO] Finished at: 2018-10-12T11:21:42+02:00
[INFO] Final Memory: 20M/295M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project VFSTestCAP: Could not resolve dependencies for project com.example.VFSTestCAP:VFSTestCAP:carbon/application:1.0.0: Could not find artifact com.example.VFSTest.proxy-service:VFSProxy:xml:1.0.0 in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/) -> [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
As you can see the error seems to be:
[ERROR] Failed to execute goal on project VFSTestCAP: Could not resolve dependencies for project com.example.VFSTestCAP:VFSTestCAP:carbon/application:1.0.0: Could not find artifact com.example.VFSTest.proxy-service:VFSProxy:xml:1.0.0 in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/) -> [Help 1]
Why is it trying to retrieve the VFSProxy from Nexus? It is defined into my ESB project as XML flow.
What could be the problem? What am I missing? How can I fix it and create my car deployable application?
There can be a name mismatch between the name you gave your new proxy and the name you copied with the code from the sample proxy (as shown in your post).
Eclipse automatically makes an entry in the artifacts.xml file when you generate the new Proxy. If the name is not the same as the name in the code of your proxy can cause a problem when the maven is trying to resolve the dependencies of the CAR project.
The best way to check this is to compare the dependencies in the pom file with the artifacts.xml in the ESB project. And if you make name changes make sure you match the name in the actual proxy definition (to prevent future mixups)
First you have to build the proxy project the same way you did with the capp project. Now if you try to build the capp, it would succeed because the relevant dependency will be in your local maven repository.
PS: If you want to use maven to build the car file, it's better to use maven multi module project. This will first install the artifacts and then the capp accordingly. Otherwise, simply exporting the capp would be sufficient.

Can't compile PrimeFaces demo

I downloaded the PF demo from git at: https://github.com/primefaces/showcase
And run mvn package, but received the following message:
martin#MyUbuntu:~/study/PrimeFaces/showcase$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building primefaces-showcase 6.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repository.primefaces.org/org/primefaces/themes/all-themes/1.0.10/all-themes-1.0.10.pom
Downloaded: http://repository.primefaces.org/org/primefaces/themes/all-themes/1.0.10/all-themes-1.0.10.pom (10 KB at 8.7 KB/sec)
Downloading: http://repository.primefaces.org/org/primefaces/themes/themes-project/1.0.10/themes-project-1.0.10.pom
Downloaded: http://repository.primefaces.org/org/primefaces/themes/themes-project/1.0.10/themes-project-1.0.10.pom (4 KB at 8.1 KB/sec)
Downloading: http://repository.primefaces.org/org/primefaces/primefaces/6.0-SNAPSHOT/maven-metadata.xml
Downloading: http://repository.primefaces.org/org/primefaces/primefaces/6.0-SNAPSHOT/primefaces-6.0-SNAPSHOT.pom
[WARNING] The POM for org.primefaces:primefaces:jar:6.0-SNAPSHOT is missing, no dependency information available
Downloading: http://repository.primefaces.org/org/primefaces/themes/all-themes/1.0.10/all-themes-1.0.10.jar
Downloading: http://repository.primefaces.org/org/primefaces/primefaces/6.0-SNAPSHOT/primefaces-6.0-SNAPSHOT.jar
Downloaded: http://repository.primefaces.org/org/primefaces/themes/all-themes/1.0.10/all-themes-1.0.10.jar (1335 KB at 72.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.563 s
[INFO] Finished at: 2016-03-08T16:30:14-08:00
[INFO] Final Memory: 11M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project showcase: Could not resolve dependencies for project org.primefaces:showcase:war:6.0-SNAPSHOT: Could not find artifact org.primefaces:primefaces:jar:6.0-SNAPSHOT in prime-repo (http://repository.primefaces.org) -> [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
In your pom.xml file under <id>dev</id> fill in the correct version you find at https://repository.primefaces.org/org/primefaces/primefaces/
For the latest build as of today:
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1.RC2</version>
</dependency>
The pom of the showcase references to an primefaces 6.0 snapshot jar on the primefaces sftp server.
As far as i can see there is no way to get this jar. I would recomend you to use the prebuild showcase war file and put it on a application server showcase download

while running maven project i am getting this error

while running this command
mvn clean package liferay:depoy
in maven project i am getting this error.
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metada
ta.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml (13 KB at 6.9 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadat
a.xml (20 KB at 9.6 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.313 s
[INFO] Finished at: 2015-07-10T14:11:49-04:00
[INFO] Final Memory: 15M/105M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'liferay' in the current project and in the p
lugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the re
positories [local (C:\Users\Nokia_Admin\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
Whatever plugin you have developed( portlets, themes, layout templates, hooks or Ext) you need to navigate to that specific plugin and then fire your command to deploy your plugin.
mvn clean package liferay:depoy
It is mentioned in your error that maven is not able to find the plugin as your path mentioned is wroong.
Try to include repositories to be downloaded by including this stuff on your pom:
<profiles>
<profile>
<id>Liferay-v6.2-CE-(Tomcat-7)</id>
<properties>
<liferay.version>Your_Liferay-Version</liferay.version>
<liferay.maven.plugin.version>6.2.5</liferay.maven.plugin.version>
<liferay.auto.deploy.dir>/opt/liferay-portal-6.2-ce-ga4/deploy</liferay.auto.deploy.dir>
<liferay.app.server.deploy.dir>/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps</liferay.app.server.deploy.dir>
<liferay.app.server.lib.global.dir>/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/lib/ext</liferay.app.server.lib.global.dir>
<liferay.app.server.portal.dir>/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/ROOT</liferay.app.server.portal.dir>
</properties>
</profile>
</profiles>

Maven resolved commons-collections groupid as org.apache.commons.collections and can't find version 3.2.1

in my pom I have a dependency:
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
IMHO This is the correct dependency (compare http://mvnrepository.com/artifact/commons-collections/commons-collections/3.2.1).
However when Maven tries to resolve this, the URLs it trying for are:
Downloading: http://mvnrepository.com/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://central.maven.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://repo1.maven.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://snapshots.repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
[WARNING] The POM for org.apache.commons:commons-collections:jar:3.2.1 is missing, no dependency information available
Downloading: http://almvn.solnetsolutions.co.nz/content/groups/public/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://almvn.solnetsolutions.co.nz/content/repositories/releases/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://mvnrepository.com/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://central.maven.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://repo1.maven.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://snapshots.repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Those all fail, as (IMHO) it is the wrong group id (org/apache/commons).
Where does it get the "org/apache/commons" in the URL path from ?
I have no other dependency that would even mention org.apache in the group id.
Where does Maven get this URL from ?
It is just so wrong, why can't it resolve it correctly to:
http://central.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
?
My Maven setup is:
Apache Maven 3.0.4 (r1232337; 2012-01-17 21:44:56+1300)
Maven home: /home/solnet/apache-maven-3.0.4
Java version: 1.7.0_11, vendor: Oracle Corporation
Java home: /home/solnet/jdk1.7.0_11/jre
Default locale: en_NZ, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-358.2.1.el6.x86_64", arch: "amd64", family: "unix"
This is my repository setup in the pom file:
<repositories>
<repository>
<id>mvnrepo</id>
<name>mvnrepo</name>
<url>http://mvnrepository.com</url>
</repository>
<repository>
<id>centralmvn</id>
<name>centralmvn</name>
<url>http://central.maven.org</url>
</repository>
<repository>
<id>mvnrepo2</id>
<name>mvnrepo2</name>
<url>http://repo1.maven.org</url>
</repository>
<repository>
<id>oss-sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>codehaus-snaphosts</id>
<name>Codehaus Snapshots</name>
<url>http://snapshots.repository.codehaus.org/</url>
</repository>
<repository>
<id>codehaus-releases</id>
<name>CodeHaus Releases</name>
<url>http://repository.codehaus.org/</url>
</repository>
/repositories>
And this is the output of "mvn help:effective-pom"
... too big for stackoverflow so see: http://pastebin.com/RHAkUmMu
And this is the output of
mvn dependency:tree -Dincludes="org.apache.commons:commons-collections"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mobilewebapp 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://mvnrepository.com/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://central.maven.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://repo1.maven.org/maven2/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://snapshots.repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://almvn.solnetsolutions.co.nz/content/groups/public/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
Downloading: http://almvn.solnetsolutions.co.nz/content/repositories/releases/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.pom
[WARNING] The POM for org.apache.commons:commons-collections:jar:3.2.1 is missing, no dependency information available
Downloading: http://mvnrepository.com/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://central.maven.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://repo1.maven.org/maven2/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://snapshots.repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://repository.codehaus.org/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-collections/3.2.1/commons-collections-3.2.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.986s
[INFO] Finished at: Thu Sep 04 11:28:24 NZST 2014
[INFO] Final Memory: 9M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mobilewebapp: Could not resolve dependencies for project nz.co.nzlotteries:mobilewebapp:war:1.1.0-SNAPSHOT: Could not find artifact org.apache.commons:commons-collections:jar:3.2.1 in mvnrepo (http://mvnrepository.com) -> [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
You have invalid repository configured, to fix it, change <url> of mvnrepo2 tohttp://repo1.maven.org/maven2/
Okay so finally the real answer to this question is actually:
I had another depending project, this project also had the wrong groupid. So when Maven build the project, it uses the pom of the dependency to resolve the jar.
So I basically had a cascading problem, and I simply had to start to fix the problem from the bottom, not from the top.
Thanks for all the help provided!

Resources