[Mavne] Maven项目引入非Maven的jar

背景

最新项目引入了对接其他项目,但是其他项目提供的jar不是mvn的,所以每次mvn编译都是失败

解决方式

将非Maven的jar通过下面方式定义的项目的pmo文件

<dependency>
    <groupId>cn.xxx</groupId>
    <artifactId>xxx</artifactId>
    <version>2.0</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/xxx.jar</systemPath>
</dependency>

说明:

  systemPath:jar包的路径

修改maven的编译插件:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.5</version>
    <configuration>
        <warName>${project.artifactId}</warName>
        <webResources>
            <resource>
                <directory>lib/</directory>
                <targetPath>WEB-INF/lib</targetPath>
                <includes>
                    <include>**/*.jar</include>
                </includes>
            </resource>
        </webResources>
    </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.2</version>
  <configuration>
      <source>1.7</source>
      <target>1.7</target>
      <encoding>utf-8</encoding>
      <debug>true</debug>
      <fork>true</fork>
      <compilerArguments>
          <extdirs>src\main\webapp\WEB-INF\lib</extdirs>
      </compilerArguments>
  </configuration>
</plugin>

 

转载于:https://my.oschina.net/lowkeysoft/blog/884795

IDEA对使用了第三方依赖jar包的非Maven项目打jar包的问题(图文详解) 主要介绍了IDEA对使用了第三方依赖jar包的非Maven项目打jar包的问题,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下 立即下载

相关推荐

Python中优化模块scipy.optimize的优化算法介绍

如果你有一个特殊的优化问题,你可以使用对象来自定义问题的求解。# 自定义目标函数# 自定义优化问题custom_problem.fun = custom_objective_function # 目标函数custom_problem.x = [1, 1] # 初始猜测# 执行优化# 打印结果在上述例子中,我们自定义了一个对象,并指定了目标函数和初始猜测,然后使用minimize函数进行求解。Scipy的优化模块提供了丰富的功能,适用于各种优化问题。

Pandas120的博客 3055

maven项目打包时外部引入jar包无法打到项目中的解决方案

— 遇到问题 昨天在用Maven打包时,发现一个错误,报错信息如下图所示: — 找到问题根源 这个问题由于是第一次遇到,我网上找了很多办法,都没有解决,主要是问题的根源没有找到,最后经过我的一番不懈探索!!我终于发现了问题的根源(其实仔细看报错信息,你发现其实问题描述的很清除了,就是程序引用的包找不到,而这些所有错误基本都是指向了自己引进的jar包):原因就在于我引入了外部(非maven导入的)jar包,如下图所示。 由于maven项目打包的时候默认是不会把外部jar包打到项目中去的,所有如果直接在m

CoVerMySoul 7423

Word公式一键转MathType保姆级教程(附omml2mml.xsl报错终极解决方案)

本文提供Word公式一键转MathType的保姆级教程,重点解决常见的omml2mml.xsl报错问题。通过详细分析报错原因、官方解决方案实操步骤及转换后格式优化技巧,帮助用户高效完成公式转换,适用于科研论文和商业文档编辑。

weixin_30082367的博客 612

maven jar包冲突解决方案、导入非maven工程jar包

一、背景 一般来说一个项目有成百上千的 jar 包,当这些 jar 包都存在且不发生冲突的情况下项目才能正常运行;一旦发生冲突可能会出现很多意外的异常及错误信息;所以需要解决的就是规范出一套不会发生 jar包冲突的方案;并在其他项目中直接使用;而不是每个项目都来找出一套方案;一般将找出的不会发生冲突的方案以父工程的形式呈现,每个项目都继承该父工程,在该父工程中使用 dependencyManagement 统一管理这些 jar包。 二、常见冲突现象 一般来说,我们自己编写的代码、配置文件报错所导致的问题通常

doubiy的博客 3234

KiCad插件安装太慢?试试华秋版,再手把手教你装这5个实用插件

本文介绍了KiCad华秋发行版如何解决插件安装慢的问题,并详细推荐了5个实用插件及其安装方法。华秋版优化了国内用户的下载速度,预装了常用扩展包,包括BOM生成器、3D模型增强工具等,显著提升PCB设计效率。

weixin_29184075的博客 561

FPGA进位链(Carry Chain)实战:从Xilinx CARRY8原语到性能优化全解析

本文深入解析了FPGA进位链(Carry Chain)的原理与应用,重点剖析了Xilinx CARRY8原语的端口功能与内部机制。通过实测数据揭示了进位链的真实延迟特性与温度影响,并详细阐述了如何利用DI和S信号进行动态路径优化、实现减法运算与条件进位选择,从而有效提升设计性能。最后,文章探讨了系统级的流水线拆分、布局约束等实战优化策略与常见陷阱。

weixin_29313817的博客 461

Java开发环境系列:idea导入maven项目后如何引入非maven管理的jar包

idea导入maven项目后如何引入非maven管理的jar包 1、导入项目 双击项目中的pom.xml文件,打开项目 2、配置Modules 点击右侧的加号,添加/whjd/src/main/webapp/WEB-INF/lib/QRCode.jar,和D:\DevTools\jdk1.8.0_131\lib\tools.jar包。这两个jar包是独立引入的。...

开发者导航 1044

[ENVI]-[高光谱遥感]-波谱沙漏分析工具的使用

图1-2-1查看特殊波段的坏波段图1-2-2在中添加坏波段ENVI波谱沙漏分析工具MNF变换。

m0_57992372的博客 1480

解决maven项目中引用非maven工程中的jar

执行如下命令,根据实际情况进行调整: 打开cmd执行如下命令 格式代码: mvn install:install-file -DgroupId= -DartifactId= -Dversion= -Dfile= -Dpackaging=jar -DgeneratePom=true 示例代码: 按照打印出来的pom目录,打开该文件,将对应的引用添加到对应

loveuserzzz的专栏 2600

YOLOv8【第十章:多任务扩展深度篇·第16节】车道线检测——基于 YOLOv8-Seg 的车道线分割与拟合!

🏆 本文收录于 《YOLOv8实战:从入门到深度优化》 专栏。该专栏系统复现并梳理全网各类 YOLOv8 改进与实战案例(当前已覆盖分类 / 检测 / 分割 / 追踪 / 关键点 / OBB 检测等方向),坚持持续更新 + 深度解析,质量分长期稳定在 97 分以上,可视为当前市面上 覆盖较全、更新较快、实战导向极强 的 YOLO 改进系列内容之一。

**My Coding Family** 1万+

实战篇| app爬虫不用真机

之前写过一篇基于真机app爬虫《App爬虫实战篇-以华为真机手机爬取集换社的app为例》,如果大家有用真机爬虫的经历,会深刻认识到真的不方便,一是自己的手机,经常会被电话、微信等打断,二是闲置手机,面对小批量数据还能勉强,大批量爬虫,会导致成本指数级上升,并且控制起来相对麻烦。以下就是常见的模拟器。emulator -avd my_avd -no-snapshot-save # 启动时不保存 snapshot。emulator -avd my_avd -wipe-data # 清除数据(恢复到出厂)

youbingchen的博客 605

Maven之jar包冲突&引入非第三方jar

Maven之jar包冲突&引入非第三方jar

scorpio的博客 1281

【STM32实物】基于STM32设计的智能仓储管理系统

近年来,随着我国仓储发展的和药品需求的不断增多,许多医院都采用药物仓储管理系统。我国的药物仓储产业已经有了长足的发展,仓库的规模不断变大,对仓储的要求也不断增高,药物的存储,识别以及对仓储环境条件的要求成为仓储的重要决策,他们可以根据不同的特点在不同场景中使用。本文详细介绍了一个基于单片机技术的智能仓储管理系统的设计与实现,这个系统可谓是集射频识别(RFID)技术和环境监测传感器于一身,旨在提高仓储操作的自动化和精确度。

嵌入式阿齐Archie 1万+

非maven项目快速转换为maven项目

`maven-compiler-plugin`:解决在编译过程中识别不到第三方依赖的问题 `maven-war-plugin`:解决在部署后可以让第三方包被tomcat识别 使用这两个插件让我们可以无需一个一个的添加`denpendency`,之后的有再补充的`jar`包,可以通过`denpendency`交给`maven`来管理。

假女吖的博客 1477

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

深度学习工具包 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")

Maven项目的两种打包方式-spring-boot-mavne-plugin/maven-jar-plugin

Maven项目的两种打包方式-spring-boot-mavne-plugin/maven-jar-plugin

weixin_42202992的博客 2675

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

如何将jar包加入到Maven本地仓库

在项目中我们常常会遇到一种问题,我们依赖一个jar包,这个jar包可能是别人提供给你,也可能是自己下载的,但是我们用的是maven项目,这个jar包刚好又没有公共maven库去供你下载同步。那这种情况下就需要我们手动将jar包打包打本地仓库,再通过pom.xml引入。例如,我现在有如下jar包,放在D盘下。 打包前你要先确定你的maven安装是没问题的,并且已经配置好环境变量,这个内容不是本文要介...

qq_40929047的博客 1万+

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

SpringBoot引入自定义jar包的处理方式

jar包: 在项目resources目录中创建个文件夹用来存放jar包 pom文件中加入如下内容 <dependency> <groupId>com.ckfinder</groupId> <artifactId>json-lib</artifactId> <version>2.3</version> <scope>system</scope&

yushun的博客 1151

mavne引入当前项目下某个jar包

com.hope.cloud cloud 1.0 system ${basedir}/src/main/webapp/lib/beautyeye_lnf.jar 路径:

Jalen备忘录 595

Maven 基础、Settings、JAR包说明

Maven工程

Lyndon的专栏 808

autowired注入jar中的依赖_如何在Maven中把依赖的JAR包一起打包,一点课堂(多岸学院)...

Maven中把依赖的JAR包一起打包这里所用到的MAVEN-PLUGIN是MAVNE-ASSEMBLY-PLUGIN官方网站是:http://maven.apache.org/plugins/maven-assembly-plugin/usage.html添加此PLUGIN到项目的POM.XML中 maven-assembly-plugin com.allen.captu...

weixin_42394088的博客 642

mavne的创建

一、maven的前期准备 1.建议使用myeclipse2013的版本的因为在你创建web项目是它把你的目录结构给你创建好,myeclipse也自带maven插件 2.jdk1.6以上 3.maven官网上下载maven插件包;这是最新的 二、maven的配置 1.把下载好的maven根据自己的意愿,来放到指定目录我这里放的是这个目录 2.新建个文件夹...

banchen4483的博客 166

Mavne简介与安装

Maven 是Apache 软件基金会组织维护的一款自动化构建工具,专注服务于 Java 平台的项目构建和依赖管理。Windows安装Maven。Linux安装Maven。

Dawn的博客 793

【Mavne】Maven的pom.xml文件详解

讲述Maven的pom.xml文件详解

四季轮换叶,一路招摇胜 437

解决 idea mavne repositories 未知错误

问题描述   使用 maven package 时提示报错异常 process terminated 可能出现的问题   一. 没在工具中配置 maven 导致引发的报错(重新配置编译就可以)   二. pom 文件中包含不存在的包,导致引发的错误(检查 pom 文件中不存在的包删除,重新编译就可以 / 或者看看日志中是不是有提示,找到删掉引入的依赖)   三. maven配置文件 settings.xml 中有错误(检查配置文件中是否包含特殊符号,中文符号及空格等)   目前就遇到了这些,后续有待补充

平凡的人类的博客 4400

mavne工程运行报错:软件包javax.crypto 不存在解决办法

javax.crypto这个包是Java自带的,在jce.jar里面。从网上搜的解决办法是:在pom的build分支下面的maven-compiler-plugin加上标红的部分。 plugin>              groupId>org.apache.maven.pluginsgroupId>              artifactId>maven-compiler-plugi

wangliutao1的专栏 1万+

springboot项目打入外部jar包

背景: 由于一些外部原因,不能通过mavn来下载外部依赖,此时我们需要将自己的依赖手动打包到我们的项目中去,比如一些自定义的加解密等sdk,通过maven的方式将jar包加入项目。 编码: 首先,我们需要单独处理下我们的私有包,将所有依赖准备好,在maven中加入相关打包插件 <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> ...

lxy826076的博客 1138
上一篇: 小明A+B(杭电2096)
下一篇: ES6新语法
weixin_33688840
博客等级 码龄11年 5350粉丝 1468原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值