環境はMacOSXでJDK5.0, maven2.02でやってます。 ポイントは Reason: Parent: plexus:plexus-components:jar:1.0 of project: plexus:plexus-velocity has wrong packaging: jar. Must be 'pom'. だと思うのですが、意味がいまいちつかめません。 クラスパスを通せってことでしょうか?
分かる方がいらっしゃいましたら、どうかよろしくお願いします。
----------------------------------------- mvn archetype:create -company.app -DartifactId=my-app -e + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ---------------------------------------------------------------------------- [INFO] Building Maven Default Project [INFO] task-segment: [archetype:create] (aggregator-style) [INFO] ---------------------------------------------------------------------------- [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------------- [INFO] Error building POM (may not be this project's POM).
Project ID: plexus:plexus-velocity
Reason: Parent: plexus:plexus-components:jar:1.0 of project: plexus:plexus-velocity has wrong packaging: jar. Must be 'pom'.
[INFO] ---------------------------------------------------------------------------- [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'plexus:plexus-velocity:jar': Parent: plexus:plexus-components:jar:1.0 of project: plexus:plexus-velocity has wrong packaging: jar. Must be 'pom'. plexus:plexus-velocity:jar:1.0
from the specified remote repositories: central (http://repo1.maven.org/maven2), snapshots (http://snapshots.maven.codehaus.org/maven2) Path to dependency: 1) org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:1.0-alpha-3 2) org.apache.maven:maven-archetype-core:jar:1.0-alpha-3
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:548) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:216) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
Try downloading the file manually from:
http://java.sun.com/products/jdbc/download.html
Then, install it using the command:
mvn install:install-file -DgroupId=javax.sql -DartifactId=jdbc-stdext \
-Dversion=2.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=javax.sql -DartifactId=jdbc-stdext \
-Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file \
-Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) jp.example.hoge:hoge-common:jar:0.0.1
2) commons-dbcp:commons-dbcp:jar:1.1
3) javax.sql:jdbc-stdext:jar:2.0
↑↑↑↑
ログの一部:
[INFO] artifact org.codehaus.mojo:cobertura-maven-plugin: checking for updates from central
[WARNING] repository metadata for: 'artifact org.codehaus.mojo:cobertura-maven-plugin' could not be retrieved from repository: central due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted