MAC OSX下MAVEN生成javadoc报错

《嵌入式最全面试题-Offer直通车》目录 嵌入式领域蓬勃发展,嵌入式工程师成为众多科技企业争抢的热门人才。如果你渴望在嵌入式面试中脱颖而出,成功斩获心仪的 offer,那么《嵌入式最全面试题 - Offer直通车》将是你的绝佳选择。本专栏是CSDN是热门专栏,100多篇文章,总字数过百万。每月新增订阅用户过百,现在是优惠价9.9元,后面要逐渐恢复原价,早订阅早受益。本专栏精心整理了众多超万字的精华内容,总计达数十万字的嵌入式面试题总结。涵盖从嵌入式基础知识到各大厂面试真题,从驱动开发到操作系统,从硬件到软件等各个方面。 阅读详情

一,现象

[INFO] --- maven-javadoc-plugin:2.9:jar (attach-javadocs) @ template.querylist ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] template ........................................... SUCCESS [  0.797 s]
[INFO] template.querylist ................................. FAILURE [  0.470 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.758 s
[INFO] Finished at: 2015-03-17T21:43:23+08:00
[INFO] Final Memory: 15M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9:jar (attach-javadocs) on project template.querylist: MavenReportException: Error while creating archive: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :template.querylist
如文中的红色字体所示,创建javadoc失败,并提示找不到javadoc命令。

二,环境变量

我的MAC OSX操作的JAVA_HOME环境设置如下(.bash_profile文件,该文件在OSX Yosemite(10.10.2)中是不存在的,需要自己创建):export JAVA_HOME=$(/usr/libexec/java_home)
export M2_HOME=/apache-maven-3.2.5
export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH

三,查找原因

1,运行maven打包,控制台标题显示如下,



这说明maven是读取到了JAVA_HOME的环境变量设置的值,我们进入JAVA_HOME路径下看看:


很明显,JAVA_HOME/bin路径下是有javadoc命令的。那么问题就来了,为什么maven找到了java命令,却对javadoc视而不见?

我们在终端运行一下:mvn -version,结果在终端中输出如下内容:

我的JAVA_HOME的设置值应该是/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/

而mvn命令取的"Java home"的值是/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre,不应该到jre路径内啊?!!!,

所以,咱们试着改一下,在POM的配置:

  <properties>
  <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
  </properties>

现在,运行一下MAVEN打包,结果如下:

成功了!!!

写此文,留作日志记录!!

Playwright爬虫实战:破解动态网页懒加载与无限滚动 本文介绍了使用Playwright处理懒加载和无限滚动页面的完整解决方案。摘要如下: 问题分析:传统爬虫无法获取JS动态渲染内容,Playwright能模拟真实浏览器行为解决此类问题。 核心原理: 懒加载:资源延迟加载,滚动触发 无限滚动:滚动到底部异步加载新内容 技术方案: 分段滚动页面并等待加载 动态监测页面高度变化 合理设置等待和终止条件 代码实现: 提供图片懒加载和无限滚动列表的完整可运行代码 包含异常处理和性能优化建议 关键优势: 比传统爬虫更可靠 支持复杂交互场景 完善的错误处理机制 该方法已在 阅读详情

相关推荐

本地AI代码助手:智能解析大型代码库,实现自动化重构与理解

在软件开发中,大型代码库的理解与维护是常见挑战。传统方法依赖人工阅读和有限上下文工具,效率低下。通过结合检索增强生成(RAG)和多智能体(Multi-Agent)架构,现代AI工具能够智能解析代码结构,理解模块关系,并精准定位相关代码片段。这种技术不仅能提升代码探索效率,还能自动化执行重构、文档生成等任务,在遗留系统维护、快速上手新项目等场景中发挥关键作用。本文以blackboxaicode/cli为例,展示了如何利用其代码感知和Workflow Automation能力,高效处理复杂代码库。

weixin_30240349的博客 378

Mac下Maven生成javadoc报错

错误为保留记录,很类似,不清楚问题出现的原因。 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9:jar (attach-javadocs) on project template.querylist: MavenReportException: Error while creating archive: Unable to find javadoc command: The environm.

Lycn_97的博客 497

【ChatGPT实战案例】ChatGPT如何帮助产品经理高效工作?

1. 产品经理主要工作方向, 2. 具体工作中,向ChatGPT提问参考

weixin_62909516的博客 1902

maven打包,报MavenReportException: Error while generating Javadoc错误

在使用maven打包时报MavenReportException: Error while generating Javadoc错误,这个是由于jdk8之后javadoc工具默认是开启doclint来检查注释格式的,一般我们写注释都不是完全遵循该规范,所以需要在maven中关闭该检查。 添加-Xdoclint:none便可关闭检查。“-Xdoclint:none”只是JDK 8中有的,如果使用的是JDK 8之前的版本,一定不能有这个,否则maven跑不过。 所以我们可以借助...

tong1132的博客 7533

海康工业相机使用教程

海康工业相机连接电脑教程

qq_43251445的博客 2万+

Plant Simulation 双深位立库开发系列教程-货架参数化

为了方便用户进行货架参数化,我们需要在交互界面上进行参数调整,右键打开RackLane,打开Dialog,在Rack_tab的tab下创建相应的对象,并创建NumberOfRightRack和NumberOfLeftRack作为数据连接对象。通过Rack._3D.VisibleGraphicGroups := ["default"]来切换需要显示的Rack,当不需要显示则可以Rack._3D.VisibleGraphicGroups := [""]即可。首先,加载默认的HBW库到模型中,确保结构树当中有。

santayana的专栏 1262

【AI·FDE】第9篇:FDE 的未来——从人 FDE 到 AI FDE 到自助化,价值迁向哪里

系列文章 | 2026年9月这是【AI·FDE】系列的终章。前面 8 篇把 FDE 的起源、能力、方法论、产品化、转型路径、工具化都讲透了。我们用一条"三段式演变弧线"来回答——从手工作坊,到平台化,再到自助化。

107

MavenReportException: Error while creating archive:

idea编译报错: 我的JDK是最新的jdk8,maven工程配置的jdk是jdk6,在工程上执行install、package等命令会出现如下的一些信息,还有错误,导致执行命令不成功,打包不成功等: 在JDK 8中,Javadoc中添加了doclint,而这个工具的主要目的是旨在获得符合W3C HTML 4.01标准规范的HTML文档,在JDK 8中,已经无法获取如下的Javadoc。一...

weixin_30278237的博客 2566

手把手教你学Simulink——基于矢量控制(FOC)的电机场景实例:电动汽车用PMSM FOC驱动系统仿真

永磁同步电机(Permanent Magnet Synchronous Motor, PMSM)因其高效率、高功率密度和良好的动态响应特性,在电动汽车驱动系统中得到了广泛应用。为了实现高性能的速度和转矩控制,通常采用磁场定向控制(Field Oriented Control, FOC),也称为矢量控制。FOC通过将三相定子电流解耦为直轴(d轴)和交轴(q轴)分量,实现对电机转矩和磁链的独立控制,从而提升系统效率与动态性能。PMSM建模Clarke/Park变换与解耦控制。

MHD0815的博客 228

【Android Performance】Android CPU调度模式详解:从performance到schedutil的Governor调优指南

本文系统讲解Android/Linux系统中的CPU频率调节策略(Governor),涵盖六大调度模式的底层工作原理:performance(性能优先)、powersave(省电优先)、conservative(保守调频)、ondemand(按需调频)、userspace(手动控制)以及schedutil(调度器驱动)。文中深入拆解每种Governor的调频决策逻辑、上升/下降曲线的差异、适用场景与选型建议,并配以实操命令演示如何查看可用Governor列表、动态切换调度模式以及多Cluster架构下的统一

weixin_44081096的博客 443

【maven】Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set.

当使用自己不熟悉的工具,出现报错,大概率都是入门级的报错。一定不要紧张,debug打开,一步步看具体在哪里报错,看看是由什么问题引起的。你说你看不懂debug的日志,那你一定是太着急了,总想着赶紧解决报错,而不想弄清楚报错的问题是什么,这时候需要一定的耐心。...

桐原因的博客 3177

Far planner 代码系列(14)

MatchContourWithNavGraph(3) this->EnclosePolygonsCheck(); //可能有些ctnode的is_contour_necessary属性变成了true // 这说明我的contour_graph是一个local层级的 才会从这里面 get new vertices new_convex_vertices.clear(); //! 把contour_graph_里符

博客 906

OSX Eclipse Maven 报错JAVA_HOME

关键错误信息:JAVA_HOME is not defined correctly.解决办法: 此方法虽然管用,但是只是临时的,需要对每个项目都进行添加。需要添加一个系统变量,待完善:参考链接: http://stackoverflow.com/questions/20313453/java-home-on-osx-with-eclipse-and-maven

微寒的技术博客 1910

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

通义灵码深度集成指南:从网页版到企业级AI编程工作流

AI编程助手正从代码补全工具演进为理解上下文、融合知识、编排开发流程的智能体。其核心原理在于三层协同:基于AST的代码感知引擎实现强类型精准补全,企业知识中枢支持私有API与规范注入,开发行为编排器打通IDE、Git与CI/CD。技术价值体现在将隐性经验显性化、机械劳动自动化、质量管控左移。典型应用场景包括Spring Boot项目中的上下文感知生成、Git提交自动合规、单元测试一键覆盖,以及金融/医疗等强监管领域本地化部署。本文聚焦通义灵码官网集成路径与VS Code深度调优实践,解决私有依赖解析、风格强

weixin_30732487的博客 1295

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

Error while creating archive: Unable to find javadoc

直接mvn package打包或者mvn deploy时报错 跳过javadoc 使用如下命令即可

nonolive的专栏 753

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

idea中Maven项目打包报错:Error while creating archive:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project java-sdk: MavenReportException: Error while creating archive: 在pom.xml文件里加上: <pr...

hkm的博客 4889

maven install 报异常:MavenReportException: Error while generating Javadoc:

mvn clean install -Dmaven.test.skip=true -X -Dmaven.javadoc.skip=true 命令说明: -Dmaven.test.skip=true :跳过test -Dmaven.javadoc.skip=true :跳过javadoc ...

chuangmoliao4054的博客 3657

maven执行package命令报maven-javadoc-plugin错误

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-          plugin:2.9.1:jar (javadoc) on project projectName:             MavenReportException: Error while creating archive:  [ERR

zhairuiping1989的博客 1723

javadoc出现java_home没有设置的问题

Error while creating archive: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set 出现这个原因是系统配置的JAVA_HOME没有生效 在pom.xml 中指定javadoc的javahome路径 : … maven-javadoc-plugin ${java.home}/…/bin/javadoc … idea中手动添加环境变量 ..

weixin_43979134的博客 1394

maven仓库报错 MavenResportException: Error while generating Javadoc:

maven仓库报错 MavenResportException: Error while generating Javadoc:

Geralt_of_theone的博客 752

Error while creating archive:Unable to find javadoc command: The environment variable JAVA_HOME

使用Maven 进行install时出现以下错误 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.1:jar (attach-javadocs) on project nurse-client: Error while creating archive:Unable to find jav...

菜鸟腾飞 2420

Unable to find javadoc command: The environment variable JAVA_HOME is not set

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project inter-core: MavenReportException: Error while creating archive: Unable to find java...

PickRecalled 3704

MavenReportException:The environment variable JAVA_HOME is not correctly set.错误异常解决方法

用Maven打包项目,提示错误信息入戏

cesul的专栏 8285

maven 导出javadoc_maven mvn跳过生成javadoc 打包报错

遇到javadoc用maven打包报错的问题,起初没发现javadoc,后发现并在pom看到了javadoc的配置。[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (attach-javadocs) on project qcloud-java-sdk: MavenRep...

weixin_39628594的博客 370
上一篇: ubuntu软件安装与设置
jameswei0310
博客等级 码龄20年 0粉丝 3原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值