maven fails to find resources in local repository (running on Windows) - Stack Overflow

Project ContextI got to manage a Java application that was until now mantained by a "lone ranger&

Project Context

I got to manage a Java application that was until now mantained by a "lone ranger", a very skilled single person thet handled the project brillantly until recent times and worked all by himself, building the artifacts within his own IDE (Eclipse) installation without resorting to any building tool.

Since in the future the application could benefit also of such things as "continuous integration", I added a maven set of files.

The original application relied on a libs directory containint the jar file for compile time and runtime dependencies, therefore I provided a script that performs the following command for each original jar file:

mvn install:install-file -Dfile=path-to-jarfile.jar -DgroupId="it.eng.locallib" -DartifactId="commons-compress-1.25.0" -Dversion="1.0.0" -Dpackaging=jar -DgeneratePom=true;

The problem

On one machine (Windows 11), the compilation fails with this message:

Caused by: The following artifacts could not be resolved: .eclipse.nebula:progresscircle:pom:1.0.0-SNAPSHOT (absent): Could not find artifact .eclipse.nebula:progresscircle:pom:1.0.0-SNAPSHOT in local-maven-repository (file://C:\Users\username/.m2/repository) [ERROR] Failed to read artifact descriptor for it.eng.locallib:.eclipse.rap.addons.ckeditor_0.2.0.20150605-1208:jar:1.0.0

Even if the previous mvn isntall:install-file reports no problem, the .m2 directories on the faulty machine and on one where everything goes OK (not only my own :) ) looks identical.

The dependency file has this dependency definition:

<dependency> <groupId>it.eng.locallib</groupId> <artifactId>.eclipse.nebula.widgets.progresscircle_1.0.0.201804281520</artifactId> <version>1.0.0</version> <!-- not 1.0.0-SNAPSHOT --> </dependency> While the project is actually in 1.0-SNAPSHOT

Any suggestion on what could cause the problem?

Project Context

I got to manage a Java application that was until now mantained by a "lone ranger", a very skilled single person thet handled the project brillantly until recent times and worked all by himself, building the artifacts within his own IDE (Eclipse) installation without resorting to any building tool.

Since in the future the application could benefit also of such things as "continuous integration", I added a maven set of files.

The original application relied on a libs directory containint the jar file for compile time and runtime dependencies, therefore I provided a script that performs the following command for each original jar file:

mvn install:install-file -Dfile=path-to-jarfile.jar -DgroupId="it.eng.locallib" -DartifactId="commons-compress-1.25.0" -Dversion="1.0.0" -Dpackaging=jar -DgeneratePom=true;

The problem

On one machine (Windows 11), the compilation fails with this message:

Caused by: The following artifacts could not be resolved: .eclipse.nebula:progresscircle:pom:1.0.0-SNAPSHOT (absent): Could not find artifact .eclipse.nebula:progresscircle:pom:1.0.0-SNAPSHOT in local-maven-repository (file://C:\Users\username/.m2/repository) [ERROR] Failed to read artifact descriptor for it.eng.locallib:.eclipse.rap.addons.ckeditor_0.2.0.20150605-1208:jar:1.0.0

Even if the previous mvn isntall:install-file reports no problem, the .m2 directories on the faulty machine and on one where everything goes OK (not only my own :) ) looks identical.

The dependency file has this dependency definition:

<dependency> <groupId>it.eng.locallib</groupId> <artifactId>.eclipse.nebula.widgets.progresscircle_1.0.0.201804281520</artifactId> <version>1.0.0</version> <!-- not 1.0.0-SNAPSHOT --> </dependency> While the project is actually in 1.0-SNAPSHOT

Any suggestion on what could cause the problem?

Share Improve this question asked Mar 15 at 13:14 saintsaint 644 bronze badges 2
  • a very skilled single person thet handled the project brillantly until recent times and worked all by himself, building the artifacts within his own IDE that's not a brilliant person exactly the opposite. A script which installs deps from a lib directory is the wrong way. Find out which artifacts are those (given example .. commons-compress existing in central repository (checking the SHA1/version from the manifest of the jar file if it has NOT been manually repackaged or alike) – khmarbaise Commented Mar 16 at 11:07
  • central.sonatype/artifact/.apachemons/… and add it as a usual dependency to your pom file... step by step... and get rid of the lib directory... – khmarbaise Commented Mar 16 at 11:08
Add a comment  | 

1 Answer 1

Reset to default 0

This can be closed.

A co-worker fixed the issue, so certain comments have a value going towards 0 from below.

I already decided that I will use our company maven mirror and move there the jars - not all have a maven dependency.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744613973a4583935.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
['keyword'] : $thread['subject']; $header['description'] = $thread['description'] ? $thread['description'] : $thread['brief']; $_SESSION['fid'] = $fid; if ($ajax) { empty($conf['api_on']) and message(0, lang('closed')); $apilist['header'] = $header; $apilist['extra'] = $extra; $apilist['access'] = $access; $apilist['thread'] = well_thread_safe_info($thread); $apilist['thread_data'] = $data; $apilist['forum'] = $forum; $apilist['imagelist'] = $imagelist; $apilist['filelist'] = $thread['filelist']; $apilist['threadlist'] = $threadlist; message(0, $apilist); } else { include _include(theme_load('single_page', $fid)); } break; default: message(-1, lang('data_malformation')); break; } ?>