Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

!!TOP!! Download Apache Maven 3.5.4

9 views
Skip to first unread message

Carin Nunziato

unread,
Jan 25, 2024, 9:17:38 PMJan 25
to
I've even rebooted my machine a couple times, but the OS does not always recognize the maven command. But when I execute either, cd %M2_HOME%, or cd %M2% it brings me to the installation directory. I've also made sure to add the user variable M2 to the Path system variable.



download apache maven 3.5.4

Download Zip https://xiuty.com/2xw5v5






I solved this by creating all under user variables (including the PATH variable).This is because the system variables do not "translate" the user variables.So if you only want to use maven in your account, you need to add another PATH variable as a user variable, not system variable.


As others have done, creating new System variables M2 and M2_HOME solved the problem. Just making User variables M2 and M2_HOME on my Windows XP machine led to maven not being recognised from the command line. I then deleted the User variables, created copies as System variables and it all came to life.


I had similar issue on Windows 7. At first I setup M2, M2_HOME under User variable but when I echoed %PATH% , I did not see maven bin directory listed under PATH. Then I setup M2, M2_HOME under system variable and it worked.






N.B my %M2_HOME% is pointing to %MV3_HOME% instead of actual absolute path bcos I have multiple version of maven installed and trying to be clever (switch between maven versions on the same box for different project).


I was facing the same issue while executing the command mvn -version; however, I checked I had also set the mvn options in the environment variables setting, which gave me some Heap memory issue on the command prompt. So, I removed the maven options that I had set and then it worked fine for me.


Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6


on downloading the maven-resources-plugin-2.6.jar.sha1, i got this:dd093ff6a4b680eae7ae83b5ab04310249fc6590. its the same withmaven-resources-plugin-2.6.pom.sha1. i am new to maven and would request to know how am i supposed to add it to the repositories .


Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-war-plugin:jar:2.2 from Central Repository: was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-war-plugin:jar:2.2 from/to central (Central Repository:): repo.maven.apache.orgPlugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-war-plugin:jar:2.2 from Central Repository: was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-war-plugin:jar:2.2 from/to central (Central Repository:): repo.maven.apache.orgmaven error1360727 62.5 KB


another option , would be ,

If you have maven installed on your machine ,Just ensure you can build your project successfully without any errors in your command line and if that happens , then you may ignore eclipse maven plugin errors.


Could not calculate build plan: Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:2.4


Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-jar-plugin:pom:2.4 from was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.


I have in trouble with this problem too, and my output is Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2 Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2


In my case, after stoping eclipse, just going to the path that it was complaining about, in your case will be:

"C:/Users/yourUser/.m2/repository/org/apache/maven/plugins/maven-war-plugin" and deleting all the files then starting eclipse has resolved the issue.


Adding 'maven-war-plugin' worked for me. Actually in my .m2\repository\org\apache\maven\plugins folder there are two versions of maven-war-plugin available. So, I updated it with the latest version(in my case from 2.1.1 to 2.2).


I was testing the move from a Jenkins docker image to another using Thinbacvkup and restore the backup and restore went well and of course it didn't bring maven with it (No problem there) I went online and got the latest apache maven bin file (apache-maven-3.8.4-bin), extracted and set up the global tool configuration, export M2_HOME ...ETC. BUT for some reason, it didn't work giving me the same message


searched and searched nothing worked, so I went to the original docker and got the same maven from there (apache-maven-3.5.3-bin)edited the configs and all, and it worked but now I wanted to know why did this work and that won't is there something with my project, build or what?


The problem with me was related to the project I was working last year, which required a certain proxy on maven settings (located at \maven\conf\settings.xml and C:\Users\\.m2\settings.xml). The proxy was blocking the download of required external packages.


1) Declare the com.atlassian.maven.plugins pluginGroup in .m2/settings.xml to ensure that Maven will not try to resolve 'clover' goals to a very old Clover 2.4 (org.apache.maven.plugins:maven-clover-plugin).


Proxying the Oracle Maven Repository requires special HTTP options for the maven2 (proxy) recipe. Also, you must register for an account to access the external repository. Configure the proxy repository to access the Oracle repository, with these additional steps:


A hosted Maven repository can be used to deploy your own as well as third-party components. A default installation of Nexus Repository Manager includes a two hosted Maven repositories. The maven-releases repository uses a release version policy and the maven-snapshots repository uses a snapshot version policy.


A repository group is the recommended way to expose all your Maven repositories from the repository manager to your users, without needing any further client side configuration. A repository group allows you to expose the aggregated content of multiple proxy and hosted repositories as well as other repository groups with one URL for tool configuration. This is possible for Maven repositories by creating a new repository with the maven2 (group) recipe as documented in Repository Management.


A typical, useful example is the maven-public group that is configured by default. It aggregates the maven-central proxy repository with the maven-releases and maven-snapshots hosted repositories. Using the URL of the repository group gives you access to the packages in all three repositories with one URL. Any new component added as well as any new repositories added to the group will automatically be available.


Full example projects can be found in the maven folder of the example project in the nexus-3.x branch. A full build of the simple-project, including downloading the declared dependencies and uploading the build output to the repository manager can be invoked with mvn clean deploy.


The archetype generates a BOM (bill of materials) artifact dependency for the software.amazon.awssdk group id. With a BOM, you do not have to specify the maven version for individual artifact dependencies that share the same group id.


The s3 dependency excludes the the netty-nio-client and apache-client transitive dependencies. In place of either of those HTTP clients, the archetype includes the url-connection-client dependency, which helps reduce the startup latency for AWS Lambda functions.


if artifactId starts with last section of groupId that portion is removed.eg.org.apache.maven:maven-core -> org.apache.maven.core The computed symbolic name is also stored in the $(maven-symbolicname) property in case you want to add attributes or directives to it.


Consider this more real-world example using Felix' Log Service implementation.The Log Service project is comprised of a single package: org.apache.felix.log.impl.It has a dependency on the core OSGi interfaces as well as a dependency on the compendium OSGi interfaces for the specific log service interfaces.The following is its POM file:


If you want to keep your project packaging type (for example "jar") but would like to add OSGi metadata you can use the manifest goal to generate a bundle manifest.The maven-jar-plugin can then be used to add this manifest to the final artifact.For example:


The plugin uses the instruction to transform the project dependencies into and clauses, which are then appended to the current set of instructions and passed onto BND.If you want the embedded dependencies to be at the start or middle of or then you can use maven-dependencies, which will automatically expand to the relevant clauses.


The ant goal creates a customized build.xml Ant script along with a collection of BND instructions and properties, taken from the current project and stored in maven-build.bnd.You also need to run `ant:ant` to create the standard Ant support tasks to download Maven dependencies and perform compilation, etc.


Sometimes you would like to clean your local OBR because it contains bundles that are no longer in your local Maven repository.This case often occurs when artifacts were deleted manually.The maven-bundle-plugin provides a simple goal to check for missing bundles, and remove them from the local OBR.

f5d0e4f075



0 new messages