Fórum

Liferay Maven repositories

Lee Chamberlain, modificado 7 Anos atrás.

Liferay Maven repositories

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
Apologies for the endless posts I've been putting.

I think the issue I'm constantly facing is that I can't get Maven working with Eclipse (Mars) and IDE 3. We're using Liferay 7.

I "think" that I've not got the maven settings in my settings.xml file. However I'm new to Maven and am struggling.

Are there any tutorials which can help me, and more importantly what repositories (and how) do I add to my settings.xml file?

Thanks
L
Lee Chamberlain, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
I think I've over thought this....

I've downloaded the zip files and I'm unpackaging them to my local repository.

Is this all I need to do?

Lee
thumbnail
James Hinkey, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Junior Member Postagens: 62 Data de Entrada: 15/02/11 Postagens Recentes
Hi Lee,

Maven tutorials have recently been published to https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/maven.

Hope that helps.

Jim
Lee Chamberlain, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
Thanks

I'm trying running it through ant (had to use a .bat file as the command line is blocked for me here).

all I'm getting in the terminal window is the path followed by ant....

ie C:\mydownloadedzip\ant

Is there something I'm missing?
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
I've always found it helpful to download the maven zip file for the release I'm working on. In the directory after expanding, use ant to install the artifacts into your local repo or, if you configure it, you can deploy them to your local nexus repo.

That way you have the artifacts you need for the maven dependencies.
Lee Chamberlain, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
David H Nebinger:
I've always found it helpful to download the maven zip file for the release I'm working on. In the directory after expanding, use ant to install the artifacts into your local repo or, if you configure it, you can deploy them to your local nexus repo.

That way you have the artifacts you need for the maven dependencies.


thanks, but that is exactly what I am trying to do.

I've unzipped the file.
gone to the root of that directory (with build.xml in it).
written a file called ant.bat to run the command as I can't use the command line (I've tried "ant install", and just "ant "on it's own in the file)

All I get when I run that is

C\:Users\myusername\Downloads\filelocation>ant install
or
C\:Users\myusername\Downloads\filelocation>ant

repeating constantly on a loop in the terminal.

Lee
Lee Chamberlain, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
Solved the ant issue (didn't like the file being called ant.bat).

However I'm back to the same issue in that the Maven repositories are not being identified (even when local). - This occurs when I try to set up a liferay plugin project

org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer com.liferay.maven.archetypes:liferay-portlet-archetype:pom:6.2.5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact com.liferay.maven.archetypes:liferay-portlet-archetype:pom:6.2.5 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
If inside of the IDE, it is often not configured to use ~/.m2/repository as the actual maven home.
Lee Chamberlain, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
How can I check?

I think I remember something pointing at my settings.xml file
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Liferay Maven repositories

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Hmm, I don't remember in detail, but it was something in the preferences window for maven configuration...