Chapter 2 code doesnt compile

  7 posts   Feedicon  
Replies: 6 - Last Post: January 27, 2012 19:52
by: matthewcornell
showing 1 - 7 of 7
 
Posted: December 02, 2010 19:40 by eliassal
I am trying to compile the code for Ch 2, using mvn compile, get a huge error
Visited the errata page, understood that a new version of code is available, clicking on download we land on a page where chapters directory structure is shown but there is no link to download the whole code or a chapter by chapter basis

Here is the full error message


[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.apress.javaee6:chapter02:jar:1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ com.apress.javaee6:chapters:1.0, /home/salam/Beginning_Java_trade_EE_6_Platform_with_GlassFish_trade_3_From_Novice_to_Professional/pom.xml, line 1, column 3185
[WARNING] 'repositories.repository.layout' for maven-repository.dev.java.net uses the unsupported value 'legacy', artifact resolution might fail. @ com.apress.javaee6:chapters:1.0, /home/salam/Beginning_Java_trade_EE_6_Platform_with_GlassFish_trade_3_From_Novice_to_Professional/pom.xml, line 1, column 2090
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Chapter 02 - JPA 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.jar
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.jar
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.jar (24 KB at 26.5 KB/sec)
Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar (29 KB at 47.6 KB/sec)
Downloading: http://download.java.net/maven/glassfish/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/maven-metadata.xml
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/maven-metadata.xml
Downloading: http://download.java.net/maven/2/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.eclipse.persistence:javax.persistence:1.1.0-SNAPSHOT/maven-metadata.xml from maven-repository.dev.java.net (http://download.java.net/maven/1/): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1/) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.eclipse.persistence:javax.persistence:1.1.0-SNAPSHOT/maven-metadata.xml from maven-repository.dev.java.net (http://download.java.net/maven/1/): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1/) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://download.java.net/maven/2/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.pom
Downloading: http://download.java.net/maven/glassfish/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.pom
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.pom
Downloading: http://download.java.net/maven/2/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/maven-metadata.xml
Downloading: http://download.java.net/maven/glassfish/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/maven-metadata.xml
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.eclipse.persistence:eclipselink:1.1.0-SNAPSHOT/maven-metadata.xml from maven-repository.dev.java.net (http://download.java.net/maven/1/): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1/) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.eclipse.persistence:eclipselink:1.1.0-SNAPSHOT/maven-metadata.xml from maven-repository.dev.java.net (http://download.java.net/maven/1/): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1/) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://download.java.net/maven/2/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.pom
Downloading: http://download.java.net/maven/glassfish/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.pom
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.pom
Downloading: http://download.java.net/maven/2/org/apache/derby/derbyclient/10.4.2.0/derbyclient-10.4.2.0.pom
Downloading: http://download.java.net/maven/glassfish/org/apache/derby/derbyclient/10.4.2.0/derbyclient-10.4.2.0.pom
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/apache/derby/derbyclient/10.4.2.0/derbyclient-10.4.2.0.pom
Downloading: http://repo1.maven.org/maven2/org/apache/derby/derbyclient/10.4.2.0/derbyclient-10.4.2.0.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/derby/derbyclient/10.4.2.0/derbyclient-10.4.2.0.pom (2 KB at 2.2 KB/sec)
Downloading: http://download.java.net/maven/2/org/apache/derby/derby/10.4.2.0/derby-10.4.2.0.pom
Downloading: http://download.java.net/maven/glassfish/org/apache/derby/derby/10.4.2.0/derby-10.4.2.0.pom
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/apache/derby/derby/10.4.2.0/derby-10.4.2.0.pom
Downloading: http://repo1.maven.org/maven2/org/apache/derby/derby/10.4.2.0/derby-10.4.2.0.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/derby/derby/10.4.2.0/derby-10.4.2.0.pom (2 KB at 2.5 KB/sec)
Downloading: http://download.java.net/maven/2/junit/junit/4.5/junit-4.5.pom
Downloading: http://download.java.net/maven/glassfish/junit/junit/4.5/junit-4.5.pom
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/junit/junit/4.5/junit-4.5.pom
Downloading: http://repo1.maven.org/maven2/junit/junit/4.5/junit-4.5.pom
Downloaded: http://repo1.maven.org/maven2/junit/junit/4.5/junit-4.5.pom (2 KB at 1.7 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

 
Posted: December 02, 2010 21:15 by Alexis Moussine-Pouchkine
Which version of Maven? I think Antonio tested this with Maven 2.x only (not 3.0)
 
Posted: December 02, 2010 20:34 by eliassal
I forgot to mention that I opened the project in Netbeans, I get red circles on the project itself as well as book and main files.
A red circle beside the line
import javax.persistence.*;

and, a hint appears indicating that
package javax.persistence does not exist

and it does not suggest anything I tried adding several jars (Toplink Essentials , JPA.....) it didnt help

Near @Entity, I have a yellow light with red circle, hoverig it, it suggests adding
- import for java.swing.text.....
- import org.w3c.dom....
 
Posted: December 03, 2010 09:43 by eliassal
Yes, I have "apache-maven-3.0".
As I am very new to this platform (java maven....), does this mean that the code can not be adapted to be executed in maven 3.
When I read in cha1 "I.ve decide to use Maven", I downloaded the ost recent version then I noticed that he talked about version 2.2.1.
I come from other platforms, always there is a backward compatibility which I thought it would be the same thing for the java platform.

Can you please confirm if I can not run the code with maven 3 in order to remove it and setup the 2.2.1 version.

Regards
 
Posted: December 03, 2010 20:50 by eliassal
Ok, I downloaded maven 2.2.1, created a hard ink in Chapter02 to this version of mvn, ran

./mvn2 compile


as well as
./mvn2 -e compile


In the command line I am getting :

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: org.codehaus.classworlds.Launcher. Program will exit.




In Netbeans, I configured Maven to point to 2.2.1, ran build, I got the following :

NetBeans: Executing '/usr/local/apache-maven-2.2.1/bin/mvn -Dnetbeans.execution=true install'
NetBeans: JAVA_HOME=/usr/share/jdk1.6.0_22
Scanning for projects...
------------------------------------------------------------------------
Building Chapter 02 - JPA
task-segment: [install]
------------------------------------------------------------------------
Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom
Unable to find resource 'org.apache.maven.plugins:maven-resources-pluginTongueom:2.3' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-plugins/12/maven-plugins-12.pom
Unable to find resource 'org.apache.maven.plugins:maven-pluginsTongueom:12' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/12/maven-plugins-12.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.jar
Unable to find resource 'org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.3' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.jar

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom
Unable to find resource 'org.apache.maven.plugins:maven-compiler-pluginTongueom:2.0.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom
Unable to find resource 'org.apache.maven.plugins:maven-pluginsTongueom:8' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar
Unable to find resource 'org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:2.0.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom
Unable to find resource 'org.apache.maven.plugins:maven-surefire-pluginTongueom:2.4.3' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/surefire/surefire/2.4.3/surefire-2.4.3.pom
Unable to find resource 'org.apache.maven.surefire:surefireTongueom:2.4.3' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire/2.4.3/surefire-2.4.3.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.jar
Unable to find resource 'org.apache.maven.plugins:maven-surefire-plugin:maven-plugin:2.4.3' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.jar

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.pom
Unable to find resource 'org.apache.maven.plugins:maven-jar-pluginTongueom:2.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jar
Unable to find resource 'org.apache.maven.plugins:maven-jar-plugin:maven-plugin:2.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jar

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom
Unable to find resource 'org.apache.maven.plugins:maven-install-pluginTongueom:2.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar
Unable to find resource 'org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar

Downloading: http://download.java.net/maven/2//org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.pom
Unable to find resource 'org.apache.maven.shared:maven-filteringTongueom:1.0-beta-2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/shared/maven-shared-components/10/maven-shared-components-10.pom
Unable to find resource 'org.apache.maven.shared:maven-shared-componentsTongueom:10' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/10/maven-shared-components-10.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.pom
Unable to find resource 'org.apache.maven.wagon:wagon-fileTongueom:1.0-beta-2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/1//org.apache.maven.wagon/poms/wagon-file-1.0-beta-2.pom
Unable to find resource 'org.apache.maven.wagon:wagon-fileTongueom:1.0-beta-2' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.pom
Unable to find resource 'org.apache.maven.wagon:wagon-fileTongueom:1.0-beta-2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.pom
Unable to find resource 'org.apache.maven.wagon:wagon-fileTongueom:1.0-beta-2' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.pom
Unable to find resource 'org.apache.maven.wagon:wagon-fileTongueom:1.0-beta-2' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-file/1.0-beta-2/wagon-file-1.0-beta-2.pom

Downloading: http://download.java.net/maven/2//org/codehaus/plexus/plexus-container-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-container-defaultTongueom:1.0-alpha-7' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/1//org.codehaus.plexus/poms/plexus-container-default-1.0-alpha-7.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-container-defaultTongueom:1.0-alpha-7' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/codehaus/plexus/plexus-container-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-container-defaultTongueom:1.0-alpha-7' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/codehaus/plexus/plexus-container-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-container-defaultTongueom:1.0-alpha-7' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/codehaus/plexus/plexus-container-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-container-defaultTongueom:1.0-alpha-7' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom

Downloading: http://download.java.net/maven/2//plexus/plexus-containers/1.0.2/plexus-containers-1.0.2.pom
Unable to find resource 'plexusTonguelexus-containersTongueom:1.0.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/1//plexus/poms/plexus-containers-1.0.2.pom
Unable to find resource 'plexusTonguelexus-containersTongueom:1.0.2' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//plexus/plexus-containers/1.0.2/plexus-containers-1.0.2.pom
Unable to find resource 'plexusTonguelexus-containersTongueom:1.0.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//plexus/plexus-containers/1.0.2/plexus-containers-1.0.2.pom
Unable to find resource 'plexusTonguelexus-containersTongueom:1.0.2' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/plexus/plexus-containers/1.0.2/plexus-containers-1.0.2.pom
Unable to find resource 'plexusTonguelexus-containersTongueom:1.0.2' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://repo1.maven.org/maven2/plexus/plexus-containers/1.0.2/plexus-containers-1.0.2.pom

Downloading: http://download.java.net/maven/2//plexus/plexus-root/1.0.3/plexus-root-1.0.3.pom
Unable to find resource 'plexusTonguelexus-rootTongueom:1.0.3' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/1//plexus/poms/plexus-root-1.0.3.pom
Unable to find resource 'plexusTonguelexus-rootTongueom:1.0.3' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//plexus/plexus-root/1.0.3/plexus-root-1.0.3.pom
Unable to find resource 'plexusTonguelexus-rootTongueom:1.0.3' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//plexus/plexus-root/1.0.3/plexus-root-1.0.3.pom
Unable to find resource 'plexusTonguelexus-rootTongueom:1.0.3' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/plexus/plexus-root/1.0.3/plexus-root-1.0.3.pom
Unable to find resource 'plexusTonguelexus-rootTongueom:1.0.3' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://repo1.maven.org/maven2/plexus/plexus-root/1.0.3/plexus-root-1.0.3.pom

Downloading: http://download.java.net/maven/2//plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.pom
Unable to find resource 'plexusTonguelexus-utilsTongueom:1.0.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/1//plexus/poms/plexus-utils-1.0.2.pom
Unable to find resource 'plexusTonguelexus-utilsTongueom:1.0.2' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.pom
Unable to find resource 'plexusTonguelexus-utilsTongueom:1.0.2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.pom
Unable to find resource 'plexusTonguelexus-utilsTongueom:1.0.2' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.pom
Unable to find resource 'plexusTonguelexus-utilsTongueom:1.0.2' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://repo1.maven.org/maven2/plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.pom

Downloading: http://download.java.net/maven/2//org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolationTongueom:1.6' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/1//org.codehaus.plexus/poms/plexus-interpolation-1.6.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolationTongueom:1.6' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolationTongueom:1.6' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolationTongueom:1.6' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolationTongueom:1.6' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom

Downloading: http://download.java.net/maven/2//org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar
Downloading: http://download.java.net/maven/2//org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.jar
Unable to find resource 'org.apache.maven.shared:maven-filtering:jar:1.0-beta-2' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolation:jar:1.6' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/1//org.codehaus.plexus/jars/plexus-interpolation-1.6.jar

Unable to find resource 'org.codehaus.plexusTonguelexus-interpolation:jar:1.6' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.jar
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolation:jar:1.6' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.jar
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolation:jar:1.6' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.jar
Unable to find resource 'org.codehaus.plexusTonguelexus-interpolation:jar:1.6' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.jar

[resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
Copying 1 resource
snapshot org.eclipse.persistence:javax.persistence:1.1.0-SNAPSHOT: checking for updates from maven-repository.dev.java.net
snapshot org.eclipse.persistence:javax.persistence:1.1.0-SNAPSHOT: checking for updates from maven2-repository.dev.java.net
snapshot org.eclipse.persistence:javax.persistence:1.1.0-SNAPSHOT: checking for updates from glassfish-maven-repository.dev.java.net
snapshot org.eclipse.persistence:javax.persistence:1.1.0-SNAPSHOT: checking for updates from EclipseLink Repo
Downloading: http://download.java.net/maven/1//org.eclipse.persistence/poms/javax.persistence-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:javax.persistenceTongueom:1.1.0-SNAPSHOT' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:javax.persistenceTongueom:1.1.0-SNAPSHOT' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:javax.persistenceTongueom:1.1.0-SNAPSHOT' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:javax.persistenceTongueom:1.1.0-SNAPSHOT' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
snapshot org.eclipse.persistence:eclipselink:1.1.0-SNAPSHOT: checking for updates from maven-repository.dev.java.net
snapshot org.eclipse.persistence:eclipselink:1.1.0-SNAPSHOT: checking for updates from maven2-repository.dev.java.net
snapshot org.eclipse.persistence:eclipselink:1.1.0-SNAPSHOT: checking for updates from glassfish-maven-repository.dev.java.net
snapshot org.eclipse.persistence:eclipselink:1.1.0-SNAPSHOT: checking for updates from EclipseLink Repo
Downloading: http://download.java.net/maven/1//org.eclipse.persistence/poms/eclipselink-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:eclipselinkTongueom:1.1.0-SNAPSHOT' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:eclipselinkTongueom:1.1.0-SNAPSHOT' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:eclipselinkTongueom:1.1.0-SNAPSHOT' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.pom
Unable to find resource 'org.eclipse.persistence:eclipselinkTongueom:1.1.0-SNAPSHOT' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://download.java.net/maven/1//org.eclipse.persistence/jars/javax.persistence-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:javax.persistence:jar:1.1.0-SNAPSHOT' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:javax.persistence:jar:1.1.0-SNAPSHOT' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:javax.persistence:jar:1.1.0-SNAPSHOT' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/javax.persistence/1.1.0-SNAPSHOT/javax.persistence-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:javax.persistence:jar:1.1.0-SNAPSHOT' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
Downloading: http://download.java.net/maven/1//org.eclipse.persistence/jars/eclipselink-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:eclipselink:jar:1.1.0-SNAPSHOT' in repository maven-repository.dev.java.net (http://download.java.net/maven/1/)
Downloading: http://download.java.net/maven/2//org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:eclipselink:jar:1.1.0-SNAPSHOT' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)
Downloading: http://download.java.net/maven/glassfish//org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:eclipselink:jar:1.1.0-SNAPSHOT' in repository glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/)
Downloading: http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo/org/eclipse/persistence/eclipselink/1.1.0-SNAPSHOT/eclipselink-1.1.0-SNAPSHOT.jar
Unable to find resource 'org.eclipse.persistence:eclipselink:jar:1.1.0-SNAPSHOT' in repository EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Failed to resolve artifact.

Missing:
----------
1) org.eclipse.persistence:javax.persistence:jar:1.1.0-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.eclipse.persistence -DartifactId=javax.persistence -Dversion=1.1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.eclipse.persistence -DartifactId=javax.persistence -Dversion=1.1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.apress.javaee6:chapter02:jar:1.0
2) org.eclipse.persistence:javax.persistence:jar:1.1.0-SNAPSHOT

2) org.eclipse.persistence:eclipselink:jar:1.1.0-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.eclipse.persistence -DartifactId=eclipselink -Dversion=1.1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.eclipse.persistence -DartifactId=eclipselink -Dversion=1.1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.apress.javaee6:chapter02:jar:1.0
2) org.eclipse.persistence:eclipselink:jar:1.1.0-SNAPSHOT

----------
2 required artifacts are missing.

for artifact:
com.apress.javaee6:chapter02:jar:1.0

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
glassfish-maven-repository.dev.java.net (http://download.java.net/maven/glassfish/),
maven2-repository.dev.java.net (http://download.java.net/maven/2/),
maven-repository.dev.java.net (http://download.java.net/maven/1/),
EclipseLink Repo (http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo)



------------------------------------------------------------------------
For more information, run Maven with the -e switch
------------------------------------------------------------------------
Total time: 1 minute 17 seconds
Finished at: Fri Dec 03 21:42:57 CET 2010
Final Memory: 12M/29M
------------------------------------------------------------------------



 
Posted: December 30, 2010 15:29 by agoncal
Try updating the code and running it again. I've cleaned up the pom.xml files, updated some dependencies.... it's working with Maven 3
 
Posted: January 27, 2012 19:52 by matthewcornell
Even with this, I cannot compile (BUILD FAILURE). Using Apache Maven 3.0.3 and the latest svn of your code. mvn compile generates the following failed output. Please advise.

====
Macintosh:chapter02 matt$ cd /Users/matt/IdeaProjects/beginningee6\~src/book/tags/1.0.1/chapter02 ; mvn compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.apress.javaee6:chapter02:jar:1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ com.apress.javaee6:chapters:1.0, /Users/matt/IdeaProjects/beginningee6~src/book/tags/1.0.1/pom.xml, line 1, column 3930
[WARNING] 'repositories.repository.layout' for maven-repository.dev.java.net uses the unsupported value 'legacy', artifact resolution might fail. @ com.apress.javaee6:chapters:1.0, /Users/matt/IdeaProjects/beginningee6~src/book/tags/1.0.1/pom.xml, line 1, column 2290
[WARNING] 'repositories.repository.layout' for Apache Repo uses the unsupported value 'legacy', artifact resolution might fail. @ com.apress.javaee6:chapters:1.0, /Users/matt/IdeaProjects/beginningee6~src/book/tags/1.0.1/pom.xml, line 1, column 3606
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Chapter 02 - JPA 1.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.737s
[INFO] Finished at: Fri Jan 27 14:50:49 EST 2012
[INFO] Final Memory: 2M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project chapter02: Could not resolve dependencies for project com.apress.javaee6:chapter02:jar:1.0: Failed to collect dependencies for [org.eclipse.persistence:javax.persistence:jar:2.0.0-M9 (provided), org.eclipse.persistence:eclipselink:jar:2.0.0-M9 (provided), org.apache.derby:derbyclient:jar:10.5.3.0 (compile), org.apache.derby:derby:jar:10.5.3.0 (test), junit:junit:jar:4.7 (test)]: Failed to read artifact descriptor for org.eclipse.persistence:javax.persistence:jar:2.0.0-M9: Could not transfer artifact org.eclipse.persistence:javax.persistenceTongueom:2.0.0-M9 from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory -> [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

====
showing 1 - 7 of 7
Replies: 6 - Last Post: January 27, 2012 19:52
by: matthewcornell
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2014, Oracle Corporation and/or its affiliates
(revision 20150626.29986a4)
 
 
Close
loading
Please Confirm
Close