Discussion:
maven-init: Invalid Nexus URL and/or authentication
Domenico Cianniello (via Magnolia Forums)
2014-01-22 17:20:49 UTC
Permalink
Hello All,
I'm setting up the environment for the CE edition as reported on the Magnolia academy, but while I was initializing Maven, I got an error during Nexus authentication.

I have executed the following command
[b]mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-download -Dnexus.url=http://nexus.magnolia-cms.com -Dsettings.templateId=magnolia-community-public
[/b]
as reported on the page: [url=http://documentation.magnolia-cms.com/display/DOCS/Maven+init]http://documentation.magnolia-cms.com/display/DOCS/Maven+init[/url].

I have used the following credentials anonymous/anonymous (the same reported for the community edition into the page), but I got the following error:
[INFO] Invalid Nexus URL and/or authentication for: http://nexus.magnolia-cms.com (user: anonymous)

could you please help me?
I don't know how to resolve this issue. I'm using maven 2.2.1.
thanks a lot
Mimmo
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=68f3d3e1-3666-462e-8fa0-b398714792a1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
Gavan Stockdale (via Magnolia Forums)
2014-01-23 09:58:46 UTC
Permalink
Hi Domenico,

Great that you are taking the Maven route, as this is precisely what we expect a professional dev. to do. Can you provide us with more detailed information?

Also, what system are you working on? (Windows, Linux, Mac)

In meantime, see also: http://documentation.magnolia-cms.com/display/DOCS/Maven+enviroment+variables

Your feedback on how you get on with Maven will be much appreciated. Please keep us informed of any errors, where and how they occur. Likewise, let us know of a successful outcome.

Thanks,

Gavan
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=68f3d3e1-3666-462e-8fa0-b398714792a1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
Domenico Cianniello (via Magnolia Forums)
2014-01-29 16:25:32 UTC
Permalink
Hi Gavan,
please read below:

OS: Windows 7
Java version: 1.7
JAVA_HOME: C:\Java\jdk1.7.0_45
JRE_HOME: C:\Java\jre7
M2_HOME: D:\j-frameworks\apache-maven-2.2.1
M2: not set
PATH: D:\j-frameworks\apache-maven-2.2.1\bin;D:\j-frameworks\apache-tomcat-7.0.50\bin;C:\Java\jdk1.7.0_45\bin;C:\Windows\system32;C:\Windows;...

by the way, I have bypassed that issue modifying manually the ./m2/settings.xml as reported below
I have accessed to the following link "[url]http://nexus.magnolia-cms.com/index.html#m2-settings-templates;magnolia-community-public[/url]" and I have added what necessary to my file.


settings.xml
[code]<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
<pluginGroup>org.sonatype.plugins</pluginGroup>
</pluginGroups>
<proxies>
<proxy>
<id>sopra-http</id>
<active>true</active>
<protocol>http</protocol>
<username>...</username>
<password>...</password>
<host>miln.proxy.corp.sopra</host>
<port>8080</port>
<nonProxyHosts>localhost|127.0.0.1|192.*|*.sopra</nonProxyHosts>
</proxy>
<proxy>
<id>sopra-https</id>
<active>true</active>
<protocol>https</protocol>
<username>...</username>
<password>...</password>
<host>miln.proxy.corp.sopra</host>
<port>8080</port>
<nonProxyHosts>localhost|127.0.0.1|192.*|*.sopra</nonProxyHosts>
</proxy>
</proxies>
<servers>
<server>
<id>rcl_rw</id>
<username>rcl_rw</username>
<password>password</password>
</server>
<server>
<id>sopra-central</id>
<username>rcl_rw</username>
<password>password</password>
</server>
<server>
<username>rcl_rw</username>
<password>password</password>
<id>sopra-snapshots</id>
</server>
</servers>
<mirrors>
<!--mirror>
<id>central</id>
<mirrorOf>central</mirrorOf>
<name>Repository Artifactory de Sopra Puteaux.</name>
<url>http://pdtinteg.ptx.fr.sopra/artifactory/repo</url>
</mirror-->
<!--mirror>
<id>central</id>
<mirrorOf>central</mirrorOf>
<name>Repository Nexus Magnolia</name>
<url>http://nexus.magnolia-cms.com/content/groups/public</url>
</mirror-->
</mirrors>
<profiles>
<profile>
<id>jboss-public-repository</id>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>sopra-artifactory</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>sopra-central</id>
<name>libs-releases</name>
<url>http://pdtinteg.ptx.fr.sopra:8180/artifactory/libs-releases</url>
</repository>
<repository>
<snapshots />
<id>sopra-snapshots</id>
<name>libs-snapshots</name>
<url>http://pdtinteg.ptx.fr.sopra:8180/artifactory/libs-snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>sopra-central</id>
<name>plugins-releases</name>
<url>http://pdtinteg.ptx.fr.sopra:8180/artifactory/plugins-releases</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>sopra-snapshots</id>
<name>plugins-snapshots</name>
<url>http://pdtinteg.ptx.fr.sopra:8180/artifactory/plugins-snapshots</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>magnolia-repositories</id>
<repositories>
<repository>
<id>magnolia.nexus.public</id>
<url>http://nexus.magnolia-cms.com/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>magnolia.nexus.public</id>
<url>http://nexus.magnolia-cms.com/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>jboss-public-repository</activeProfile>
<activeProfile>sopra-artifactory</activeProfile>
<activeProfile>magnolia-repositories</activeProfile>
</activeProfiles>
</settings>
[/code]
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=68f3d3e1-3666-462e-8fa0-b398714792a1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
Gavan Stockdale (via Magnolia Forums)
2014-01-29 18:17:55 UTC
Permalink
Very cool. I will investigate on this end.
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=68f3d3e1-3666-462e-8fa0-b398714792a1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
michela dimastrochicco (via Magnolia Forums)
2014-10-23 13:56:28 UTC
Permalink
Hi,
i have the same problem of Mimmo.
Have you find some solution?

Microsoft Windows [Versione 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tutti i diritti riservati.

C:\Users\root>cd C:\Users\root\.m2

C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: https://nexus.magnolia-cms.com? [Y/n
] : y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: : Enter Username [root]: : Terminare il processo batch (S
/N)? y
Terminare il processo batch (S/N)? s

C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=http://nexus.magnolia-cms.com -Dsettings.templateId=magnolia
-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: http://nexus.magnolia-cms.com? [Y/n]
: y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: http://nexus.magnolia-cms.co
m (user: anonymous)
Enter Username [root]: :
Enter Username [root]: :
Enter Username [root]: : Enter Username [root]: : Terminare il processo batch (S
/N)?
^CImpossibile aprire il dispositivo o il file specificato.
C:\Users\root\.m2>
C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: https://nexus.magnolia-cms.com? [Y/n
] : y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: : Enter Username [root]: : Terminare il processo batch (S
/N)? ^C
C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: https://nexus.magnolia-cms.com? [Y/n
] : y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: : Enter Username [root]: : Terminare il processo batch (S
/N)?
^CImpossibile aprire il dispositivo o il file specificato.

C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: https://nexus.magnolia-cms.com? [Y/n
] : y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: : Enter Username [root]: : Terminare il processo batch (S
/N)?
Terminare il processo batch (S/N)? s

C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
Error reading settings.xml: Duplicated tag: 'pluginGroups' (position: START_TAG
seen ...</activeProfiles>\n <pluginGroups>... @288:17)
Line: 288
Column: 17
C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: https://nexus.magnolia-cms.com? [Y/n
] : Y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: : Enter Username [root]: : Terminare il processo batch (S
/N)?
^CImpossibile aprire il dispositivo o il file specificato.

C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: https://nexus.magnolia-cms.com? [Y/n
] : Y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: : Enter Username [root]: : Terminare il processo batch (S
/N)?
^CImpossibile aprire il dispositivo o il file specificato.

C:\Users\root\.m2>

C:\Users\root\.m2>mvn org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:settings-d
ownload -Dnexus.url=https://nexus.magnolia-cms.com -Dsettings.templateId=magnoli
a-community-public
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [org.sonatype.plugins:nexus-maven-plugin:1.9.2.4:setting
s-download] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: https://nexus.magnolia-cms.com? [Y/n
] : y
Enter Username [root]: : anonymous
Enter Password: : anonymous
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.HttpClient).
log4j:WARN Please initialize the log4j system properly.
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: : anonymous
Enter Password: : anonymous
[INFO] Invalid Nexus URL and/or authentication for: https://nexus.magnolia-cms.c
om (user: anonymous)
Enter Username [root]: :
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=68f3d3e1-3666-462e-8fa0-b398714792a1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
Gavan Stockdale (via Magnolia Forums)
2014-10-23 14:53:56 UTC
Permalink
Guys - ensure you are using

https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/

http will not work.

Check the logs:

"[INFO] [nexus:settings-download {execution: default-cli}]
Are you sure you want to use the Nexus URL: http://nexus.magnolia-cms.com? [Y/n]
: y
Enter Username [root]: : anonymous
Enter Password: : anonymous


G.
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=68f3d3e1-3666-462e-8fa0-b398714792a1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
Grégory Joseph (via Magnolia Forums)
2014-10-23 21:42:43 UTC
Permalink
Michela _is_ using https on 4 of her 5 attempts, if I'm reading this correctly. The exact command works fine on my mac with anonymous/anonymous, so the only thing I can think of is it's a windows-specific problem (can't try this right now unfortunately), or perhaps a Maven version mismatch ? Michela, could you ensure you're using 2.2.1 and paste the output of the [code]mvn -version[/code] command ?

If you're using Maven 3 (I'd recommend the very latest 3.2.3), the command is slightly different: [code]mvn org.sonatype.plugins:nexus-m2settings-maven-plugin:1.6.5:download -DnexusUrl=https://nexus.magnolia-cms.com -DtemplateId=magnolia-community-public[/code]

That said, you don't _need_ any of this to get started, especially if you unless public artifacts; just add the <repository> to your pom.xml !
--
Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=68f3d3e1-3666-462e-8fa0-b398714792a1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-***@magnolia-cms.com>
----------------------------------------------------------------
Loading...