在Maven存储库中查找Oracle JDBC驱动程序(Find Oracle JDBC driver in Maven repository)
我想将oracle jdbc驱动程序添加到我的项目作为依赖(运行时间) - ojdbc14。 在MVNrepository网站中,放入POM的依赖关系是:
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> <version>10.2.0.3.0</version> </dependency>
当然这不行,因为它不在maven使用的中央存储库中。 2个问题:
如何找到包含此工件的存储库(如果有)?
如何添加它,以便Maven会使用它?
I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14. In MVNrepository site the dependency to put in the POM is:
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> <version>10.2.0.3.0</version> </dependency>
of course this does't work as it is not in the central repository used by maven. 2 questions:
How do I find a repository (if any) that contains this artifact?
How do I add it so that Maven will use it?
原文:https://stackoverflow.com/questions/1074869
最满意答案
有三种方法可以实现这一目标:
- rc.local(仍然可以,在添加行之后记得chmod + x)
- systemd
- udev规则(我自己的首选)
使用systemd:
# /etc/systemd/system/hid_apple_fnmode_set.service [Unit] Description=Set Apple keyboard fn mode After=multi-user.target [Service] ExecStart=/usr/bin/bash -c '/usr/bin/echo 2 > /sys/module/hid_apple/parameters/fnmode' [Install] WantedBy=graphical.target
接下来是使服务在启动时运行。
sudo systemctl enable hid_apple_fnmode_set.service
使用udev规则:
# /etc/udev/rules.d/99-hid_apple.rules SUBSYSTEM=="module", DRIVER=="hid_apple", ATTR{parameters/fnmode}="2"
系统脚本和udev规则与一些疯狂的猜测放在一起,可能需要一些调整才能工作。 以下命令可以帮助调整和调试udev规则:
udevadm info --attribute-walk --path=/module/hid_apple udevadm test /sys/module/hid_apple/
There are 3 ways in which you can achieve this:
- rc.local (Still works, remember to chmod +x after adding your lines)
- systemd
- udev rules (My own preferred)
With systemd:
# /etc/systemd/system/hid_apple_fnmode_set.service [Unit] Description=Set Apple keyboard fn mode After=multi-user.target [Service] ExecStart=/usr/bin/bash -c '/usr/bin/echo 2 > /sys/module/hid_apple/parameters/fnmode' [Install] WantedBy=graphical.target
Followed by this to make the service run at boot.
sudo systemctl enable hid_apple_fnmode_set.service
With udev rules:
# /etc/udev/rules.d/99-hid_apple.rules SUBSYSTEM=="module", DRIVER=="hid_apple", ATTR{parameters/fnmode}="2"
The systemd script and udev rules are put together with some wild guesses, might take some tweaking to work. The following commands can help adjust and debug the udev rule:
udevadm info --attribute-walk --path=/module/hid_apple udevadm test /sys/module/hid_apple/
相关问答
更多-
如何在Docker CentOS容器中使用Systemd[2022-06-30]
在本教程中,我将介绍如何在CentOS或Fedora上创建和管理Docker容器。请注意:眼下Docker只在64位主机系统上得到支持。 将Docker安装到CentOS或Fedora上 要将Docker安装到CentOS上,首先启用EPEL软件库,然后使用yum命令: $ sudo yum install docker-io $ sudo service docker start $ sudo chkconfig docker on 要将Docker安装到Fedora上,使用下面这些命令: $ sudo ... -
如何在centos 7(systemd)中使sysfs更改持久化(how to make sysfs changes persistent in centos 7 (systemd))[2023-11-07]
有三种方法可以实现这一目标: rc.local(仍然可以,在添加行之后记得chmod + x) systemd udev规则(我自己的首选) 使用systemd: # /etc/systemd/system/hid_apple_fnmode_set.service [Unit] Description=Set Apple keyboard fn mode After=multi-user.target [Service] ExecStart=/usr/bin/bash -c '/usr/bin/echo ... -
我发现sysfs / debugfs设置的值实际上是设置在内核中的一些变量中,因此实际上是在内核中使用predefind(默认)值设置特定变量的问题。 I find that the values that are set by sysfs/debugfs are actually set into some variables in kernel, so it is actually an issue of setting specific variables in kernel with predefi ...
-
使用RHEL / Centos 7的systemd基于版本208.在213之前似乎不包括CPUQuota支持。 您应该可以通过在所需的切片/范围中运行该过程进行实验,然后直接修改/ sys / fs / cgroup / cpu /下的cpu.cfs_ {quota,period} _us比率...我希望你在那里设置的任何内容只要没有任何系统活动会导致它重新写入文件,就可以坚持一段时间。 The systemd shipping with RHEL/Centos 7 is based on version ...
-
尝试在调试模式下启动它。 rsyslog -d After a deep research i found the problem with imjournal.state file. imjournal.state file holds the state of journal control service. In REHL the system messages are actually controlled by journal control service. Rsyslog service w ...
-
如何在CentOS7(Systemd)中设置目标(运行级别)服务?(How to set target (runlevel) to service in CentOS7 (Systemd)?)[2022-07-29]
设置目标是在服务的单元文件中完成的。 例如: [Install] WantedBy=multi-user.target 然后运行systemctl enable $service_name以创建符号链接,该符号链接使服务能够作为特定目标的一部分启动。 您也可以手动创建符号链接。 enable命令将打印出它正在创建的符号链接的路径。 我认为systemctl --reverse list-dependencies $service是查找哪些服务和目标依赖于要引导的特定服务的方法。 Setting the t ... -
从run命令中删除-d选项。 ExecStart=/usr/bin/docker run --name usljavadoc_server -p 80:80 -p 443:443 -v /opt/app/uslJavadoc/:/var/www/html/ eboraas/apache 在docker文档中描述: 要以分离模式启动容器,请使用-d = true或只使用-d选项。 按照设计,当用于运行容器的根进程退出时,以分离模式启动的容器退出。 在ExecStart之后,您的客户端退出。 Systemd会 ...
-
这取决于您的服务。 如果您的服务是有效服务,则启动它将不会执行任何操作。 您可以通过运行“ systemctl status yourservice.service ”来查找您的服务是否为活动服务。 如果您的服务未处于活动状态,您可以告诉systemd即使在退出后也将其视为活动服务。 对此的指令是RemainAfterExit= ( https://www.freedesktop.org/software/systemd/man/systemd.service.html#RemainAfterExit= ) ...
-
编辑/etc/docker/daemon.json 。 仅提供以下内容: { "graph": "/data/docker" } 重启docker守护进程: sudo service docker restart Edit /etc/docker/daemon.json. Put only the following content: { "graph": "/data/docker" } Restart docker daemon: sudo service docker restar ...
-
CentOS 70-persistent-net.rules不会重新生成(CentOS 70-persistent-net.rules will not regenerate)[2022-07-10]
我不是Centos专家,但知道为什么这在Ubuntu和其他几个发行版中不起作用。 读一下生成它的文件,通常是/lib/udev/rules.d/75-persistent-net-generator.rules 。 您将注意到它将跳过各种类型的以太网接口,具体取决于MAC地址和子系统(即接口来自哪里)。 这是一个像RHEL这样的发行版,它可以跳过Xen: # ignore Xen virtual interfaces SUBSYSTEMS=="xen", GOTO="persistent_net_gener ...