プロジェクトのビルド中に、Ant/Maven から次のエラーが表示されます。
BUILD FAILED
C:\Users\kmilyutin\git\siamprofiler\classpath.build.xml:41: The following error occurred while executing this line:
C:\Users\kmilyutin\git\siamprofiler\classpath.build.xml:33: Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact 'commons-beanutils:commons-beanutils:jar': Cannot find parent: org.apache.commons:commons-parent for project: commons-beanutils:commons-beanutils:jar:1.8.0 for project commons-beanutils:commons-beanutils:jar:1.8.0
commons-beanutils:commons-beanutils:jar:1.8.0
同時に、関連付けられてcommons-beanutils
いるファイルがリポジトリにあります。C:\Users\kmilyutin\.m2\repository\commons-beanutils\commons-beanutils\1.8.0
誰かこの問題の解決を手伝ってくれませんか?
更新:ディレクトリを削除して.m2\repository\commons-beanutils\
、再度ビルドしようとしました。Maven で同じエラーが表示されましたが、1.8.0\
ディレクトリには 2 つのファイルしかありません:commons-beanutils-1.8.0.pom
とcommons-beanutils-1.8.0.pom.sha1
. 中央の Maven リポジトリで見つけることができますが、何らかの理由で jar ファイルがありません。
デバッグ出力は次のとおりです。
BUILD FAILED
C:\Users\kmilyutin\git\siamprofiler\classpath.build.xml:41: The following error occurred while executing this line:
C:\Users\kmilyutin\git\siamprofiler\classpath.build.xml:33: Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact 'commons-beanutils:commons-beanutils:jar': Cannot find parent: org.apache.commons:commons-parent for project: commons-beanutils:commons-beanutils:jar:1.8.0 for project commons-beanutils:commons-beanutils:jar:1.8.0
commons-beanutils:commons-beanutils:jar:1.8.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
maven2-repository.dev.java.net (http://download.java.net/maven/2/),
jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/)
Path to dependency:
1) com.sivis:siamprofiler:war:2.7.3-SNAPSHOT
2) org.richfaces.framework:richfaces-api:jar:3.3.5-SNAPSHOT
at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:268)
at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:168)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:751)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'commons-beanutils:commons-beanutils:jar': Cannot find parent: org.apache.commons:commons-parent for project: commons-beanutils:commons-beanutils:jar:1.8.0 for project commons-beanutils:commons-beanutils:jar:1.8.0
commons-beanutils:commons-beanutils:jar:1.8.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
maven2-repository.dev.java.net (http://download.java.net/maven/2/),
jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/)
Path to dependency:
1) com.sivis:siamprofiler:war:2.7.3-SNAPSHOT
2) org.richfaces.framework:richfaces-api:jar:3.3.5-SNAPSHOT
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:430)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:74)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:316)
at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:263)
... 32 more
Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException: Unable to read the metadata file for artifact 'commons-beanutils:commons-beanutils:jar': Cannot find parent: org.apache.commons:commons-parent for project: commons-beanutils:commons-beanutils:jar:1.8.0 for project commons-beanutils:commons-beanutils:jar:1.8.0
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:200)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedArtifact(MavenMetadataSource.java:94)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:387)
... 36 more
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.apache.commons:commons-parent for project: commons-beanutils:commons-beanutils:jar:1.8.0 for project commons-beanutils:commons-beanutils:jar:1.8.0
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:255)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:163)
... 38 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Parse error reading POM. Reason: end tag not allowed in epilog but got / (position: END_TAG seen ...</properties>\r\n\r\n</project>\r\n </... @639:6) for project org.apache.commons:commons-parent at C:\Users\kmilyutin\.m2\repository\org\apache\commons\commons-parent\11\commons-parent-11.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1610)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1571)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:562)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392)
... 41 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: end tag not allowed in epilog but got / (position: END_TAG seen ...</properties>\r\n\r\n</project>\r\n </... @639:6)
at org.codehaus.plexus.util.xml.pull.MXParser.parseEpilog(MXParser.java:1594)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1405)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1105)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reader.java:2133)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:3912)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1606)
... 44 more
Total time: 5 seconds
これが一部ですclasspath.build.xml
(33行目はartifact:dependencies
タグです):
<target name="resolve-dependencies" depends="checkTimestamps,mvn-configure"
unless="${dependencies-resolved}">
<macrodef name="resolve-scoped-dependencies" xmlns:artifact="urn:maven-artifact-ant">
<attribute name="scope" />
<sequential>
<artifact:dependencies pathId="@{scope}.classpath" filesetId="@{scope}.fileset" useScope="@{scope}" >
<pom refid="maven.project" />
<localRepository refid="local.repository" />
</artifact:dependencies>
<pathconvert property="@{scope}.p" refid="@{scope}.fileset" pathsep="," />
<echo file="target/@{scope}.fileset.txt">${@{scope}.p}</echo>
</sequential>
</macrodef>
<resolve-scoped-dependencies scope="compile" />
<resolve-scoped-dependencies scope="runtime" />
<resolve-scoped-dependencies scope="provided" />
<resolve-scoped-dependencies scope="system" />
<resolve-scoped-dependencies scope="test" />
</target>