ForgeRock / openam-auth-sample

OpenAM Sample Custom Auth Module
19 stars 31 forks source link

When building this project Eclipse fails to find Maven dependencies #1

Closed markcraig closed 10 years ago

markcraig commented 10 years ago

Gulshan reports that this project does not build in Eclipse. (This issue was originally reported against DOCS-47. See https://github.com/markcraig/DOCS-47/issues/1.)

According to the error message, Maven appears to be looking in the releases repository for a snapshot:

ArtifactDescriptorException: Failed to read artifact descriptor for org.forgerock.openam:openam-core:jar:12.0.0-SNAPSHOT: ArtifactResolutionException: Could not transfer artifact org.forgerock.openam:openam-core:pom:12.0.0-SNAPSHOT from/to forgerock (http://maven.forgerock.org/repo/releases): Failed to look for file: http://maven.forgerock.org/repo/releases/http://maven.forgerock.org/repo/releases/org/forgerock/openam/openam-core/12.0.0-SNAPSHOT/openam-core-12.0.0-SNAPSHOT.pom. Return code is: 409

When I clone the project and build with Maven 3.0.5 on the command line, the build completes successfully. I don't have Eclipse installed on this system, and have not yet managed to reproduce the problem.

gulshanrajwani commented 10 years ago

let me try from command line

gulshanrajwani commented 10 years ago

It works good when I try to build from command line , you are correct. Thx & Regards

Gulshan

markcraig commented 10 years ago

Perhaps there's something extra that Eclipse requires. I don't know, yet, as I haven't used Eclipse lately. Which versions of Eclipse and of Maven are you using?

gulshanrajwani commented 10 years ago

Please see the screen shots Eclipse and maven . But for now I am good . I was able to create a jar file using the command line And I am planning to install and register the new openam-auth-sample-1.0.0-SNAPSHOT.jar in openam

cp target/openam-auth-sample*.jar /path/to/tomcat/webapps/openam/WEB-INF/lib/

ssoadm create-svc --adminid amadmin --password-file /tmp/pwd.txt --xmlfile amAuthSampleAuth.xml

ssoadm register-auth-module --adminid amadmin --password-file /tmp/pwd.txt --authmodule org.forgerock.openam.examples.

Raj

[image: Inline image 1]

[image: Inline image 2]

On Thu, Jun 5, 2014 at 8:58 AM, Mark Craig notifications@github.com wrote:

Perhaps there's something extra that Eclipse requires. I don't know, yet, as I haven't used Eclipse lately. Which versions of Eclipse and of Maven are you using?

— Reply to this email directly or view it on GitHub https://github.com/markcraig/openam-auth-sample/issues/1#issuecomment-45221971 .

gulshanrajwani commented 10 years ago

Which part of the world you live in ?

Gulshan

On Thu, Jun 5, 2014 at 9:23 AM, gulshan rajwani gulshan.rajwani@gmail.com wrote:

Please see the screen shots Eclipse and maven . But for now I am good . I was able to create a jar file using the command line And I am planning to install and register the new openam-auth-sample-1.0.0-SNAPSHOT.jar in openam

cp target/openam-auth-sample*.jar /path/to/tomcat/webapps/openam/WEB-INF/lib/

ssoadm create-svc --adminid amadmin --password-file /tmp/pwd.txt --xmlfile amAuthSampleAuth.xml

ssoadm register-auth-module --adminid amadmin --password-file /tmp/pwd.txt --authmodule org.forgerock.openam.examples.

Raj

[image: Inline image 1]

[image: Inline image 2]

On Thu, Jun 5, 2014 at 8:58 AM, Mark Craig notifications@github.com wrote:

Perhaps there's something extra that Eclipse requires. I don't know, yet, as I haven't used Eclipse lately. Which versions of Eclipse and of Maven are you using?

— Reply to this email directly or view it on GitHub https://github.com/markcraig/openam-auth-sample/issues/1#issuecomment-45221971 .

markcraig commented 10 years ago

I work at ForgeRock's Grenoble, France office. Let me try something...

markcraig commented 10 years ago

An old Eclipse setup that I found on another system:

Here's how I built the example in this setup:

  1. Clone the project from GitHub.
  2. In Eclipse, File > Import > Maven > Existing Maven Projects, then click Next.
  3. Browse to the root directory where you cloned the project, then click Finish.
  4. Right-click the pom.xml, and select Run As > Maven install.

The result was successful for me.

...
[INFO] 
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ openam-auth-sample ---
[INFO] Building jar: /Users/mark/Documents/workspace/openam-auth-sample/target/openam-auth-sample-1.0.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ openam-auth-sample ---
[INFO] Installing /Users/mark/Documents/workspace/openam-auth-sample/target/openam-auth-sample-1.0.0-SNAPSHOT.jar to /Users/mark/.m2/repository/org/forgerock/openam/examples/openam-auth-sample/1.0.0-SNAPSHOT/openam-auth-sample-1.0.0-SNAPSHOT.jar
[INFO] Installing /Users/mark/Documents/workspace/openam-auth-sample/pom.xml to /Users/mark/.m2/repository/org/forgerock/openam/examples/openam-auth-sample/1.0.0-SNAPSHOT/openam-auth-sample-1.0.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.890s
[INFO] Finished at: Fri Jun 06 08:36:55 CEST 2014
[INFO] Final Memory: 19M/81M
[INFO] ------------------------------------------------------------------------
markcraig commented 10 years ago

This project seems to build for me both on the command line and in Eclipse. I'll close the issue for now.

If this issue can be reproduced with a different (for example, more recent) version of Eclipse and Maven, please reopen the bug with steps showing how to reproduce the problem and what versions of the software are needed to reproduce it.