掲示板

archtype is missing

8年前 に Raphael Molnar によって更新されました。

archtype is missing

New Member 投稿: 5 参加年月日: 14/06/27 最新の投稿
Hello all

I`m am new into liferay and need some support with liferay maven projects creation. After follow the enviroment creation guide I find out myself without liferay achtypes so I add this remote achtype catalog:

https://repo1.maven.org/maven2/archetype-catalog.xml

I`m using liferay 6.2.g4 but I can't find this archtype for any liferay project. I wonder if I'm looking for the wrong version archtype or if archtypes have a different version number. Could you help me with my issue?

Thank You and Best Regards
thumbnail
8年前 に Kamesh Sampath によって更新されました。

RE: archtype is missing

New Member 投稿: 9 参加年月日: 14/07/04 最新の投稿
try adding this Liferay Maven Repo to your pom.xml or if you are using Nexus or Artifactory then configure the repo with it.

HTH
8年前 に Raphael Molnar によって更新されました。

RE: archtype is missing

New Member 投稿: 5 参加年月日: 14/06/27 最新の投稿
Hello Kamesh

Sorry but what do you mean with add adding the Liferay Maven Repo to my pom.xml? My problem is that always I try to create a new maven project using the a liferay arctype. I'm (trying to use) using nexus, I did the ant deploy and I saw all artifacts being deployed to my repository my my archtype catalog is quit empty: <archetype-catalog xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0 http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd"/>

When I try to create a liferay plugin project using maven I get the following error:

Failure to transfer com.liferay.maven.plugins:liferay-maven-plugin:pom:${liferay.maven.plugin.version} from http://
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.plugins:liferay-maven-
plugin:pom:${liferay.maven.plugin.version} from/to central (http://repo.maven.apache.org/maven2): Illegal character in path at
index 84: http://repo.maven.apache.org/maven2/com/liferay/maven/plugins/liferay-maven-plugin/${liferay.maven.plugin.version}/
liferay-maven-plugin-${liferay.maven.plugin.version}.pom

I looked into the http://repo1.maven.org/maven2/com/liferay/maven/plugins/liferay-maven-plugin/ and I cant find 6.2.ga4.

I'm kind of lost here

Any clue?.
thumbnail
8年前 に Gregory Amerson によって更新されました。

RE: archtype is missing

Liferay Legend 投稿: 1123 参加年月日: 10/02/16 最新の投稿
Raphael Molnar:
liferay-maven-plugin-${liferay.maven.plugin.version}.pom


This is the problem. It means that you don't have a "profile" set that will properly resolve those versions. If you look in the pom.xml there are several "${liferay.xxx.xxx}" properties that must have valid values. You can set the properties directly in the pom or set them as a profile. You can set the profile also manually in Eclipse from the project properties menu "Project > Properties > Maven > Active Profile"

let us know if you have trouble getting those properties set.
8年前 に Raphael Molnar によって更新されました。

RE: archtype is missing

New Member 投稿: 5 参加年月日: 14/06/27 最新の投稿
Hello Gregory, thanks for your reply

I couldn't do it using active maven profiles, I tried put it in global settings and user settings . . . In active profiles I inserted the profile ID but it didn't work . . . Adding the real values to pom made it works but I still wonder what is the right value for the properties in server 6.2.ga4

The higest version I could use is 6.2.2 but I don`t know if it fits with server version 6.2.2
Here is my settings.xml


<!--?xml version="1.0"?-->
<settings>
    <servers>
        <server>
            <id>liferay-releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>liferay-snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>
</settings>

 <profile>
        <id>liferay</id>
            <properties>
                <plugin.type>portlet</plugin.type>
                <liferay.version>6.2.2</liferay.version>
                <liferay.maven.plugin.version>6.2.2</liferay.maven.plugin.version>
                <liferay.auto.deploy.dir>/media/cachorrod/sharedFolder/desenv/liferay/enviroment/bundles/liferay-portal-6.2-ce-ga4/deploy</liferay.auto.deploy.dir>
                <liferay.app.server.deploy.dir>/media/cachorrod/sharedFolder/desenv/liferay/enviroment/bundles/liferay-portal-6.2-ce-ga4/deploy</liferay.app.server.deploy.dir>
                <liferay.app.server.lib.global.dir>/media/cachorrod/sharedFolder/desenv/liferay/enviroment/bundles/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/lib/ext</liferay.app.server.lib.global.dir>
                <liferay.app.server.portal.dir>/media/cachorrod/sharedFolder/desenv/liferay/enviroment/bundles/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/ROOT</liferay.app.server.portal.dir>
            </properties>
    	</profile>
thumbnail
8年前 に James Falkner によって更新されました。

RE: archtype is missing (回答)

Liferay Legend 投稿: 1399 参加年月日: 10/09/17 最新の投稿
liferay.version refers to the version of Liferay itself that you wish to depend on and build against, but liferay.maven.plugin.version refers to the version of the Liferay maven plugin you wish to use. They are independent, and unfortunately due to the similar versioning are often set to the same values which cause errors like this when we don't release new plugin versions with new portal versions (as is the case for the latest release of portal - there is no 6.2.3 version of the Liferay Maven plugin). So you can use 6.2.3 for liferay.version but must use 6.2.2 for liferay.maven.plugin.version.

The good news is this is all resolved in the next major release of Liferay (7). It will be much more obvious that the plugin and Liferay are independent.
8年前 に Raphael Molnar によって更新されました。

RE: archtype is missing

New Member 投稿: 5 参加年月日: 14/06/27 最新の投稿
Thank You very much James, it clarified a lot.

I just have one more doubt before test this new Knowledge , when I create a new maven project should I use 6.2.2 version of liferay archtype portlet, theme etc?

I'm just asking because I see a lot of 6.2.10.x versions mixed with 6.x.x version.

Thank You again
thumbnail
8年前 に James Falkner によって更新されました。

RE: archtype is missing (回答)

Liferay Legend 投稿: 1399 参加年月日: 10/09/17 最新の投稿
Liferay 6.2 CE version goes 6.2.0, 6.2.1, 6.2.2, ...
Liferay 6.2 EE versioning goes 6.2.10.0, 6.2.10.1, 6.2.10.2, ...

So anytime you see a .10. this refers to an EE version. Liferay's aim is for binary and source compatibility within a given release family, so for example if you create an app for 6.2.2 it should work in other 6.2.x releases in the past and future (with some notable historical exceptions, but that's not the norm).

Anyway, back to your question. You should use the latest archetype for the release against which you're building. So if you're using CE, then you should use 6.2.2 archetypes even if you are using Liferay 6.2.3 as your runtime.
8年前 に Raphael Molnar によって更新されました。

RE: archtype is missing

New Member 投稿: 5 参加年月日: 14/06/27 最新の投稿
Hello, sorry about the delay in the message

I got it . . . It's just clear now . . Thank You very much emoticon

For now I have what I need to keep going my experiences.