| Summary: | ClassNotFoundException while building with maven-ant-tasks tasks | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Guido Grazioli <guido.grazioli> | ||||
| Component: | maven-ant-tasks | Assignee: | Orion Poplawski <orion> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | akurtako, java-sig-commits, mizdebsk, orion | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | noarch | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-08-10 19:30:05 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
It seems to misunderstand the idea of the ant.d files. you need a /etc/ant.d/maven-ant-tasks containing all the needed jars e.g. "maven2/maven-project maven2/maven-error-diagnostics plexus/classworlds plexus/container-default plexus/interpolation classworlds and etc." Created attachment 513936 [details] maven-ant-tasks configuration in /etc/ant.d What Alexander says make sense, i'm attaching the configuration i used to go past the ClassNotFoundException-s. Maven task invocation still fails tough, with error: "cannot find component org.apache.mavenartifact.manager.WagonManager". I swear if it expects a local maven repo setup with the needed dependencies; it's definitely an overkill for a task that just copies a pomfile, so i am going to do that by hand in my new package; but you can still look there if you need a test case: bug 723427 So, can this be closed? Well, no. I could find alternative ways to build a determined package, but still maven-ant-tasks suffers from the issues reported in this bug. maven-ant-tasks isn't supposed to be used with Maven 3. Maven 3 uses a different dependency resolution engine -- Aether. With Maven 3 you would probably want to use aether-ant-tasks instead. If I were ant maintainer I would close it as WONTFIX. Will do. Looks like I may have to retire this package completely and I'm not sure I can build it anymore. |
Description of problem: Building with ant and maven-ant-tasks throws several ClassNotFoundExceptions Version-Release number of selected component (if applicable): maven-ant-tasks-2.1.1-8.fc16.noarch How reproducible: Run a build.xml which invokes a <artifact:> task Actual results: ClassNotFoundExceptions, ie: BUILD FAILED /home/guido/rpmbuild/BUILD/jinput/build.xml:251: The following error occurred while executing this line: jar:file:/home/guido/rpmbuild/BUILD/jinput/lib/maven-ant-tasks-2.1.0.jar!/org/apache/maven/artifact/ant/antlib.xml:4: taskdef A class needed by class org.apache.maven.artifact.ant.DependenciesTask cannot be found: org/codehaus/classworlds/DuplicateRealmException Expected results: Build runs succesfully Additional info: I could go a bit ahead in the build, avoiding CNFEs, creating the files: /etc/ant.d/maven-project (containing "maven2/maven-project") /etc/ant.d/maven-error-diagnostics ("maven2/maven-error-diagnostics") /etc/ant.d/plexus-classwords (containing "plexus/classworlds") /etc/ant.d/plexus-container-default ("plexus/container-default") /etc/ant.d/plexus-interpolation ("plexus/interpolation") but at some point i get: BUILD FAILED /home/guido/rpmbuild/BUILD/jinput/build.xml:261: Unable to find component: org.apache.maven.artifact.manager.WagonManager maven-ant-tasks should also get runtime requires on the packages which provide those jars