我有一个Android应用程序,它是使用pom.xml下面给出的文件构建的. mvn clean install工作没有错误,但在Eclipse中我得到以下错误:
Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:generate-sources (execution: default-generate-sources, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:proguard (execution: default-proguard, phase: process-classes)
Run Code Online (Sandbox Code Playgroud)
我该如何解决这些问题?
这是pom.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myapp-android</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>myappAndroidClient</name>
<repositories>
<repository>
<id>achartengine</id>
<name>Public AChartEngine repository</name>
<url>https://repository-achartengine.forge.cloudbees.com/snapshot/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>compile</scope>
</dependency>
<!-- Make sure this (robolectric dependency) is below the …Run Code Online (Sandbox Code Playgroud) TFS是否支持本地提交?
换句话说:我可以
在TFS 2012?
如果没有,是否有任何解决方法,允许此功能?
我想使用Osm2pgsql工具将OSM文件导入我的PostgreSQL数据库(Windows,Postgres版本9.2).
当我运行以下命令
osm2pgsql.exe --create -d mydb artyom.xml -U myuser -W --style default.style
Run Code Online (Sandbox Code Playgroud)
我收到了错误
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
failed: FEHLER: Funktion addgeometrycolumn(unknown, unknown, integer, unknown,
integer) existiert nicht
LINE 1: SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, ...
^
HINT: Keine Funktion stimmt mit dem angegebenen Namen und den Argumenttypen ??b
erein. Sie m??ssen m?Âglicherweise ausdr??ckliche Typumwandlungen hinzuf??gen.
Error occurred, cleaning up
Run Code Online (Sandbox Code Playgroud)
德语翻译:
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
failed: ERROR: Function addgeometrycolumn(unknown, unknown, integer, unknown, …Run Code Online (Sandbox Code Playgroud) 我正在学习如何使用"Head first iPhone and iPad development"(第二版)这本书在iOS操作系统上进行编程.

当我尝试编译本书中的代码时,我得到错误,即release在引用计数模式下不允许使用use 关键字.
在这种情况下,我是否必须明确释放内存?如果是 - 如何?
我想编写一段代码,它将处理如下的GraphQL查询:
query {
group(id: "com.graphql-java")
name(name: "graphql-java")
version(id: "2.3.0")
}
Run Code Online (Sandbox Code Playgroud)
我已经创建了一个数据获取器并在get方法中放置了一个断点:
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
public class TestDataFetcher implements DataFetcher {
public Object get(final DataFetchingEnvironment dataFetchingEnvironment) {
return null;
}
}
Run Code Online (Sandbox Code Playgroud)
然后我写了下面的代码:
public class Example02 {
public static void main(final String[] args) throws IOException {
final Example02 app = new Example02();
app.run();
}
void run() throws IOException {
final TestDataFetcher testDataFetcher = new TestDataFetcher();
final List<GraphQLFieldDefinition> fields = Lists.newArrayList(
createGroupField(testDataFetcher),
createNameField(),
createVersionField());
final GraphQLObjectType queryType = newObject()
.name("query") …Run Code Online (Sandbox Code Playgroud) 我有一个项目与pom.xml下面给出的文件.当我发出命令时,mvn clean compile assembly:single install我希望Maven生成一个包含的JAR
它不起作用 - 我的代码在"jar-with-dependencies"文件中没有被混淆.
当我运行mvn clean compile install生成的文件包含我的应用程序的模糊代码,但没有依赖项.
为了获得包含所有依赖项和混淆代码的JAR文件,我该怎么办?
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myproduct</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<restlet-version>2.3.5</restlet-version>
</properties>
<dependencies>
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert-core</artifactId>
<version>2.0M8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.restlet.jse</groupId>
<artifactId>org.restlet</artifactId>
<version>${restlet-version}</version>
</dependency>
<dependency>
<groupId>org.restlet.jse</groupId>
<artifactId>org.restlet.ext.jackson</artifactId>
<version>${restlet-version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>
<resources>
<resource> …Run Code Online (Sandbox Code Playgroud) 我需要计算它们之间的距离
在从OSM导入的地图中.
我使用以下查询:
SELECT building_id, hospital_id, ST_Distance(building_centroid, hospital_location)
FROM
(
select planet_osm_polygon.osm_id building_id, ST_Centroid(planet_osm_polygon.way) building_centroid
from planet_osm_polygon
where building = 'yes'
) buildings,
(
select planet_osm_point.osm_id hospital_id, planet_osm_point.way hospital_location
from planet_osm_point
where amenity = 'hospital') hospitals
Run Code Online (Sandbox Code Playgroud)
我得到奇怪的结果 - 距离总是小于1.
我怎样才能了解报告这些值的单位?
更新1:示例结果:

更新2:此查询似乎有效
SELECT building_id, hospital_id, ST_Distance_sphere(building_centroid, hospital_location) distance
FROM
(
select planet_osm_polygon.osm_id building_id, ST_Centroid(planet_osm_polygon.way) building_centroid
from planet_osm_polygon
where building = 'yes'
) buildings,
(
select planet_osm_point.osm_id hospital_id, planet_osm_point.way hospital_location
from planet_osm_point
where amenity = 'hospital') hospitals …Run Code Online (Sandbox Code Playgroud) 我正在尝试在IIS Express中运行Visual Studio 2013 Express for Web中的ASP.NET项目.
当我启动它时,我在浏览器中看到以下消息:

德语翻译:ASP.NET设置被识别,在"集成"管理管道模式中无效.可能原因:"system.web/identity@impersonate"设置为"true".
我怎样才能解决这个问题?
更新1: "属性"面板:

想象一下,我有以下课程:
public class TestClass {
public class Index<X> {
}
public class IndexData {
private final Index<?> index;
private final ReentrantReadWriteLock lock =
new ReentrantReadWriteLock();
public IndexData(final Index<?> index) {
super();
this.index = index;
}
public Index<?> getIndex() {
return index;
}
public Lock getReadLock() {
return lock.readLock();
}
public Lock getWriteLock() {
return lock.writeLock();
}
}
public void add(final InputClass input)
{
final IndexData index = getIndex(input);
final Lock lock = index.getWriteLock();
lock.lock();
try {
// Do something here, …Run Code Online (Sandbox Code Playgroud) FindBugs抱怨在此方法中Comparator.compareStrings(String,String)中可能不可行的分支上的str1的可能空指针解除引用:
private static int compareStrings(final String str1, final String str2) {
if ((str1 == null) && (str2 == null)) {
return COMPARE_ABSENT;
}
if ((str1 == null) && (str2 != null)) {
return COMPARE_DIFFERS;
}
if ((str1 != null) && (str2 == null)) {
return COMPARE_DIFFERS;
}
return str1.equals(str2) ? COMPARE_EQUALS : COMPARE_DIFFERS;
}
Run Code Online (Sandbox Code Playgroud)
在Eclipse中,我还在最后一行看到警告(str1可能为null).
在什么情况下可以str1 是null在return str1.equals(str2) ? COMPARE_EQUALS : COMPARE_DIFFERS;(鉴于前两个if块覆盖的情况下,当str1为null)?
java ×5
maven ×2
maven-3 ×2
postgis ×2
postgresql ×2
android ×1
asp.net ×1
easymock ×1
eclipse ×1
findbugs ×1
graphql ×1
graphql-java ×1
iis ×1
iis-express ×1
ios ×1
mocking ×1
mockito ×1
obfuscation ×1
objective-c ×1
proguard ×1
tfs ×1
tfs2012 ×1
unit-testing ×1