aether有一个函数来获取给定工件的所有版本,如下所示:
org.sonatype.aether.impl.VersionRangeResolver.resolveVersionRange(
RepositorySystemSession session,
VersionRangeRequest request )
Run Code Online (Sandbox Code Playgroud)
是否有一个以太函数来列出存储库中的所有工件?
或者如何获得该列表?
ps:我知道大多数maven存储库提供了一个人类可读的索引,你可以解析和爬行.这不是一个安全的解决方案,只是一种解决方法,我不是在寻找这种类型的解决方案.
我使用以下软件:
我有一个pom.xml文件,我试图用Sonar执行但是得到了以下错误.
[INFO] Building asgard-bpm
[INFO] task-segment: [sonar:sonar] (aggregator-style)
[INFO] -----------------------------------------------------------------------
[INFO] [sonar:sonar {execution: default-cli}]
[INFO] Sonar host: http://{host:8080}/sonar
[INFO] Sonar version: 3.4.1
[INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:3.4.1:sonar
[INFO] [sonar:sonar {execution: default-sonar}]
[INFO] [14:34:54.474] Load project settings
[INFO] [14:34:54.552] Install plugins
[INFO] [14:34:56.674] Apply project exclusions
[INFO] [14:34:56.674] Install JDBC driver
[WARN] [14:34:56.736] H2 database should be used for evaluation purpose only
[INFO] [14:34:56.736] Create JDBC datasource for jdbc:h2:tcp://host/sonar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------ …
Run Code Online (Sandbox Code Playgroud) ehCache是否具有自动刷新功能?如果是,请告诉我该怎么做。如果没有,请告诉我几种可行且有效的方法来完成ehCache刷新。
我们正在使用Artifactory 3.9.2
并且必须合并两个存储库的部分(通过复制工件),这些存储库具有相同的(SNAPSHOT
-versioned)工件.这搞砸了maven-metadata.xml
.在Nexus中,可以简单地重建此工件的元数据,并让存储库管理器为您排序.我似乎无法找到关于如何使用Artifactory执行此操作的任何链接/解释.有人可以告诉我怎么做到这一点?
我在从 src/main/resources/lib 文件夹分发 dll 的 maven 项目中遇到问题。
该项目使用 maven-assembly-plugin 构建为具有依赖项的单个 jar。
不幸的是,maven 进程在复制过程中破坏了我的 dll 库,因此它们对应用程序不再有用。
我看过诸如资源过滤之类的概念。
这是我的相关 pom.xml
有没有人有任何想法?
我想我需要做这样的事情,但到目前为止它对我不起作用。
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<resources>
<resource>
<directory>${basedir}/src/main/resources/lib</directory>
<filtering>false</filtering>
</resource>
</resources>
<archive>
<manifest>
<mainClass>de.bochumuniruhr.psy.bio.behaviourcoder.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我的最终解决方案(基于以下答案):
谢谢你的好答案。我最终得到了不需要扩展 maven-resources-plugin 配置的答案。我将二进制文件放在文件src/main/resources/unfiltered-resources
夹中,因为我需要过滤其他资源。
这是源代码的链接。
以下是我在撰写本文时的最终工作 pom。
<build>
<finalName>BehaviourCoder_${git.build.time}_${git.commit.id.describe-short}</finalName>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>${basedir}/src/main/unfiltered-resources</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.2</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<injectAllReactorProjects>true</injectAllReactorProjects>
<dateFormat>yyyy-MM-dd_HHmmss</dateFormat>
<dateFormatTimeZone>UTC</dateFormatTimeZone>
</configuration> …
Run Code Online (Sandbox Code Playgroud) 根据spring-hadoopREADME
的消息,该项目已达到生命周期终点:
注意:Spring for Apache Hadoop 项目已于 2019 年 4 月 5 日达到生命周期结束状态。最终的 Spring for Apache Hadoop 2.5.0 版本是使用 Apache Hadoop 版本 2.7.3 构建的,并且没有计划新版本。
我假设该项目将以不同的名称继续,或者 Springframework 系列中的一个全新项目可能会继承它,但我无法找到任何进一步的细节,并且他们的 Github 问题跟踪器已被禁用。
有人可以提供更多详细信息并解释还应该使用什么吗?谢谢!
我们一直遇到jsessionid的问题,我正试图找出一种方法来禁用它.有没有人碰巧知道如何使用org.mortbay.jetty:jetty-maven-plugin:7.xx?到目前为止,我遇到的所有方法都是使用Mortbay的旧插件来完成它,其设置与Eclipse的版本不兼容.
提前致谢,
马丁
我有一个使用localdb的MVC4/ASP.Net应用程序.一切"看起来"才能正常工作.但是我在事件日志中遇到了大量错误:
LocalDB实例注册表项中缺少"DataDirectory"注册表值:{BB3F4304-E7E9-4EE7-9A25-B46BFAA73FB4}
LocalDB实例注册表项中缺少"DataDirectory"注册表值:{BB31321B-BEB9-465B-8C8E-DEF9C2C67FBE}
每次实例更改.
XML错误的详细信息:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="SQLLocalDB 11.0" />
<EventID Qualifiers="35269">512</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-03-12T14:12:43.000000000Z" />
<EventRecordID>1080755</EventRecordID>
<Channel>Application</Channel>
<Computer>XXXXXX</Computer>
<Security />
</System>
<EventData>
<Data>{BB07CF13-2ABD-4FD5-AB2B-467FF08F28E6}</Data>
</EventData>
</Event>
Run Code Online (Sandbox Code Playgroud)
连接字符串:
<add
name="DefaultConnection"
connectionString="Data Source=(localdb)\v11.0; Initial Catalog=WebMVCContext-20121205135209; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|WebMVCContext-20121205135209.mdf"
providerName="System.Data.SqlClient" />
Run Code Online (Sandbox Code Playgroud)
再次,它正在工作,一切都连接只为每个连接获得10-20.
我有一个带有字段的测试用例@Autowired
。我想要一种设置测试用例的方法,因为它有许多@Test
带注释的方法,这些方法将依赖于相同的生成数据(为此我需要自动装配类)。
实现这一目标的好方法是什么?
如果我有@BeforeClass
,那么我需要将该方法设为静态,这会破坏自动装配。
我想在 Logback (1.2.1) 中定义一个属性/变量:
基本上,在开发过程中,我希望 Maven 使用如下方式调用maven-surefire-plugin
:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<log.dir>${project.build.directory}/logs</log.dir>
</systemPropertyVariables>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
(我确信上述工作正常,因为我有其他属性以这种方式传递给测试,并且这些属性按预期工作)。
目前,我有以下几点logback.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration>
<configuration scan="true" scanPeriod="30 seconds" debug="false">
<property name="log.dir" value="."/>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.dir}/logs/my.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>strongbox_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<fileNamePattern>strongbox-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>128MB</maxFileSize>
<maxHistory>31</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<charset>UTF-8</charset>
<pattern>%d{HH:mm:ss.SSS dd-MM-yyyy} | %-5.5p | %-20.20t | %-50.50logger{50} | %m%n</pattern>
</encoder>
</appender>
...
</configuration>
Run Code Online (Sandbox Code Playgroud)
的-Dlog.dir=foo/logs
,它只是被忽略和日志文件在当前目录中产生。我在这里做错了什么?它需要一个范围吗?需要if
设置条件吗?