"mvn hibernate3:hbm2ddl" in "7.7. Running the Web Application" doesn't work.
Book version: Beta 0.20 (HTML). To reproduce:
More details upon request.
$ mvn -version
Maven version: 2.0.9
Java version: 1.5.0_16
OS name: "linux" version: "2.6.18-92.1.1.el5" arch: "i386" Family: "unix"
$ rm -rf ~/.m2/ # just to be sure...
$ cd ~/src/tmp/
$ wget http://www.sonatype.com/book/mvn-exam...
$ md5sum mvn-examples-1.0.tar.gz
da7d196392cf76d626b49c3e7bf7e877 mvn-examples-1.0.tar.gz
$ tar xzf mvn-examples-1.0.tar.gz
$ cd mavenbook-examples-1-SNAPSHOT/ch07-multi-spring/simple-parent/simple-webapp/
$ mvn hibernate3:hbm2ddl 2>&1 | tee output.txt
[...]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.sonatype.mavenbook.ch07:simple-weather:jar:1-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.sonatype.mavenbook.ch07 -DartifactId=simple-weather -Dversion=1-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.sonatype.mavenbook.ch07 -DartifactId=simple-weather -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.sonatype.mavenbook.ch07:simple-webapp:war:1-SNAPSHOT
2) org.sonatype.mavenbook.ch07:simple-weather:jar:1-SNAPSHOT
2) org.sonatype.mavenbook.ch07:simple-persist:jar:1-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.sonatype.mavenbook.ch07 -DartifactId=simple-persist -Dversion=1-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.sonatype.mavenbook.ch07 -DartifactId=simple-persist -Dversion=1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.sonatype.mavenbook.ch07:simple-webapp:war:1-SNAPSHOT
2) org.sonatype.mavenbook.ch07:simple-persist:jar:1-SNAPSHOT
----------
2 required artifacts are missing.
for artifact:
org.sonatype.mavenbook.ch07:simple-webapp:war:1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
sonatype-forge (http://repository.sonatype.org/conten...),
Central (http://repo1.maven.org/maven2),
Codehaus Snapshots (http://snapshots.repository.codehaus.org)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39 seconds
[INFO] Finished at: Fri Dec 12 17:54:30 CET 2008
[INFO] Final Memory: 6M/73M
[INFO] ------------------------------------------------------------------------
More details upon request.
3
people have this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
The company has a solution in progress.
-
Inappropriate?Running mvn clean install on the simple-parent pom makes it work.
1 person says
this solves the problem
-
Inappropriate?I think we need a clarifying note here: https://issues.sonatype.org/browse/MV...
-
Inappropriate?i hit the similiar problem like this:
I wonder why it those file (pom and jar ) cannot be downloaded????
++++++++++++++++++++++++++++++++++++++
D:\java\maven\test\simple-parent\simple-webapp>mvn hibernate3:hbm2ddl
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building simple-webapp Web Application
[INFO] task-segment: [hibernate3:hbm2ddl]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing hibernate3:hbm2ddl
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
Downloading: http://repo1.maven.org/maven2/org/son...
ather/1.0/simple-weather-1.0.pom
[INFO] Unable to find resource 'org.sonatype.mavenbook.ch07:simple-weather:pom:1
.0' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/son...
rsist/1.0/simple-persist-1.0.pom
[INFO] Unable to find resource 'org.sonatype.mavenbook.ch07:simple-persist:pom:1
.0' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/son...
ather/1.0/simple-weather-1.0.jar
[INFO] Unable to find resource 'org.sonatype.mavenbook.ch07:simple-weather:jar:1
.0' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/son...
rsist/1.0/simple-persist-1.0.jar
[INFO] Unable to find resource 'org.sonatype.mavenbook.ch07:simple-persist:jar:1
.0' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.sonatype.mavenbook.ch07:simple-weather:jar:1.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.sonatype.mavenbook.ch07 -DartifactI
d=simple-weather -Dversion=1.0 -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.sonatype.mavenbook.ch07 -DartifactId=
simple-weather -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -D
repositoryId=[id]
Path to dependency:
1) org.sonatype.mavenbook.ch07:simple-webapp:war:1.0
2) org.sonatype.mavenbook.ch07:simple-weather:jar:1.0
2) org.sonatype.mavenbook.ch07:simple-persist:jar:1.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.sonatype.mavenbook.ch07 -DartifactI
d=simple-persist -Dversion=1.0 -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.sonatype.mavenbook.ch07 -DartifactId=
simple-persist -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -D
repositoryId=[id]
Path to dependency:
1) org.sonatype.mavenbook.ch07:simple-webapp:war:1.0
2) org.sonatype.mavenbook.ch07:simple-persist:jar:1.0
----------
2 required artifacts are missing.
for artifact:
org.sonatype.mavenbook.ch07:simple-webapp:war:1.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Aug 11 15:34:49 CST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------
D:\java\maven\test\simple-parent\simple-webapp>
-
Inappropriate?Ok... I fixed the problem...
To fix the problem,
Firstly, on simple-parent, run the command 'mvn install';
If the result is successful, then go to folder simple-webapp,
run the command:
'mvn hibernate3:hbm2ddl'
Then it should be no above problem.
Loading Profile...



EMPLOYEE