我有一个多模块maven项目.其中一个模块使用maven-assembly-plugin.在整个项目上运行mvn clean install时,构建失败并超出GC Overhead limit错误.
我正在使用maven 3.3.9(也尝试使用3.2.2).maven-assembly-plugin的版本是2.5.5(也是2.6版).这是插件配置:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>dist-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<classifier>all</classifier>
<finalName>${project.artifactId}-${project.version}-all</finalName>
<attach>false</attach>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib</classpathPrefix>
<mainClass>...my main class...</mainClass>
</manifest>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我甚至将MAVEN_OPTS设置为以下,但没有帮助:
MAVEN_OPTS="-Xms2048m -Xmx4096m -XX:PermSize=1024m"
Run Code Online (Sandbox Code Playgroud)
失败前的最后一条消息是:
Cleaning up unclosed ZipFile for archive .../.m2/repository/org/bouncycastle/bcprov-jdk16/1.46/bcprov-jdk16-1.46.jar
Run Code Online (Sandbox Code Playgroud) 我想,这很容易找出来.但是,谷歌给了我很糟糕的结果.请问,有谁知道如何将euro符号写入strings.xml值?我仍然得到一个例外,即不允许这样的值.谢谢.
我正在使用Spring Security OAuth2进行授权。尝试刷新令牌时,出现错误:(UserDetailsService is required有趣的是,我仅在UNIX计算机上而不是Windows上收到此错误)。我正在使用Spring OAuth2版本2.0.7。
由于某种原因,中的AuthenticationManagerin DefaultTokenService不为空,它尝试对用户进行身份验证以检查其是否仍然存在。我认为它由于一些春季安全性与春季oauth2配置问题而被初始化。
我没有使用任何自定义UserDetailsService,因此此时它不应该对用户进行身份验证。但是,当我调试它时,我看到它尝试使用中的一个WebSecurityConfigurerAdapter并得到此错误。即使我提供了自定义的虚拟对象UserDetailsService,它也没有使用该虚拟对象,而是尝试使用另一个虚拟对象,这是空的。我在这里想念什么吗?我不知道为什么会这样?
这是我的Oauth2配置
@Configuration
@EnableAuthorizationServer
public class OAuth2Config extends AuthorizationServerConfigurerAdapter {
@Autowired
private MySpringTokenStore tokenStore;
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private MyClientDetailsServiceImpl clientDetailsService;
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
endpoints.tokenStore(tokenStore);
endpoints.authenticationManager(authenticationManager)
.approvalStoreDisabled();
}
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients.withClientDetails(clientDetailsService);
}
@Override
public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
security.allowFormAuthenticationForClients();
}
@Bean
public TokenStore tokenStore() {
return new …Run Code Online (Sandbox Code Playgroud) java spring spring-security spring-security-oauth2 spring-oauth2
我正在使用这个小部件https://github.com/erikwt/PullToRefresh-ListView,并希望进行一些更改.我已经定义了attrs.xml,以便能够从XML定义控制文本的颜色等.但是我的自定义属性未被识别(错误是:在包'eu.erikw'中找不到属性'ptrContainerBackground'的资源标识符).我已经使用了在其他库项目中定义的自定义视图,到目前为止一切运行良好.你能帮忙解决一下这个问题吗?
这是我的attrs.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="eu.erikw.PullToRefreshListView">
<attr name="ptrContainerBackground" format="integer"/>
<attr name="ptrArrow" format="integer"/>
<attr name="ptrTextColor" format="integer"/>
<attr name="ptrTextSize" format="integer"/>
</declare-styleable>
</resources>
Run Code Online (Sandbox Code Playgroud)
这是布局文件中的视图定义:
<eu.erikw.PullToRefreshListView xmlns:ptr="http://schemas.android.com/apk/res/eu.erikw"
android:id="@+id/lv_transactionsList"
ptr:ptrTextColor="@color/text_white_color"
ptr:ptrContainerBackground="@color/text_white_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/transactions_list_divider"
android:dividerHeight="1dip"
android:cacheColorHint="@color/stations_finder_item_bg">
</eu.erikw.PullToRefreshListView>
Run Code Online (Sandbox Code Playgroud)