我试图使用以下原型. https://github.com/akquinet/android-archetypes/wiki/Android-release-archetype
我可以按照页面上的说明(使用终端)
我想知道,我如何在Eclipse中执行此操作?是否有一种命令行界面我可以输入所需的命令?即
mvn archetype:generate \
-DarchetypeArtifactId=android-release \
-DarchetypeGroupId=de.akquinet.android.archetypes \
-DarchetypeVersion=1.0.5 \
-DgroupId=com.foo.bar \
-DartifactId=my-android-project \
-Dpackage=com.foo.bar.android
Run Code Online (Sandbox Code Playgroud)
谢谢
我正在MySQL上建立一个主/从体系结构的故障转移集群.我也正在配置我的JBoss数据源,我正在寻找更好的方法来测试我的连接,因为它知道它适用于Alfresco(使用Ibatis).
即使我多次尝试MySQL,我也不太清楚MySQL服务器内部的执行机制.
到目前为止,我正在使用此查询来测试我的SQL连接(就像在这个线程中:Jboss数据源中的数据库故障转移)
SELECT 1;
Run Code Online (Sandbox Code Playgroud)
这里是完整的数据源.
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>alfresco-datasource</jndi-name>
<connection-url>
jdbc:mysql://10.1.2.13,10.1.2.14:3306/alfresco
</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>alfresco</user-name>
<password>alfresco</password>
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
</exception-sorter-class-name>
<connection-property name="readOnly">false</connection-property>
<failOverReadOnly>false</failOverReadOnly>
<!-- Automatic reconnecion - desactivated to preserve transactions -->
<!-- http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html :
Failover happens when the driver determines that the connection has failed (checked before every query), and falls back to the first host when it determines that the host has become available again (after queriesBeforeRetryMaster queries have been issued). -->
<!--<autoReconnect>true</autoReconnect>-->
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql> …Run Code Online (Sandbox Code Playgroud) 我想定义PaymentMethod如下.是否支持swagger.yaml?
PaymentMethod:
oneOf:
- $ref: '#/definitions/NewPaymentMethod'
- $ref: '#/definitions/ExistPaymentMethod'
Run Code Online (Sandbox Code Playgroud)
在ExistPaymentMethod将只有ID,并cardNumber在那里NewPaymentMethod将没有id,但所有其他的细节,例如cardNumber,cardholderName,cardholderAddress等.
这是我第一次涉足Swagger,所以请保持温柔.
我有以下定义:
definitions:
Payload:
type: object
properties:
indicators:
type: array
items:
$ref: '#/definitions/Indicator'
Indicator:
type: object
properties:
type:
type: string
computeOn:
type: array
items:
type: string
default:
- close
parameters:
type: object
BBANDS:
properties:
type:
type: string
default: BBANDS
computeOn:
type: array
items:
type: string
default:
- close
parameters:
type: object
properties:
timeperiod:
type: integer
format: int32
default: 5
nbdevup:
type: integer
format: int32
default: 2
nbdevdn:
type: integer
format: int32
default: 2
matype:
type: integer
format: int32
default: 0 …Run Code Online (Sandbox Code Playgroud) 我想创建一个使用参数创建的原型...坚果我不知道这是否是一个以这种方式制作的参数:
<requiredProperties>
<requiredProperty key="appName">
<defaultValue>${artifactId}</defaultValue>
</requiredProperty>
</requiredProperties>
Run Code Online (Sandbox Code Playgroud)
这对我不起作用......我在集成测试中失败了
[INFO] --- maven-archetype-plugin:2.0:integration-test (default-integration-test) @webapp-archetype ---
[ERROR] Archetype test.archetype:webapp-archetype:1.0-SNAPSHOT is not configured
Property appName is missing.
org.apache.maven.archetype.exception.ArchetypeNotConfigured: Archetype test.archetype:webapp-archetype:1.0-SNAPSHOT is not configured
Property appName is missing.
现在,由于Birt 3.7有一种更简单的方法来使用运行时(只是部署jar),为什么没有maven存储库?
Birt包含50多个依赖项,这很荒谬.
你是如何解决这个问题的?
更新:还有
一些帮助(我们并不孤单):https:
//dev.c-ware.de/confluence/display/PUBLIC/Embeding+Birt+into+Application+built+with+Maven
更新11. 2012
年2月在链接的Birt-Exchange论坛中取得了一些进展:
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependency>
<groupId>org.eclipse.birt.runtime</groupId>
<artifactId>org.eclipse.birt.runtime</artifactId>
<version>3.7.1-SNAPSHOT</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我没有测试过自己.
更新23. 2012年4月
更多运动(这次是在Eclipse方面)
http://www.eclipse.org/forums/index.php/m/845370/
=>期待6月,也许这次.
更新11. 2012年7月
仍然没有来自相关地方的有用的新信息
对于你们中的一些人:http://hartmann-schneevoigt.com/2012/04/04/eclipse-birt-3-7-2-with-maven/可能有帮助.(将jar从eclipse部署到artifactory/nexus,使用更少的efford)
这可能是解决方案:
https://bugs.eclipse.org/bugs/show_bug.cgi? id = 258911(滚动到底部)
<repository>
<id>sonatype-nexus-releases</id>
<name>Sonatype Nexus Releases</name>
<url>https://oss.sonatype.org/content/repositories/releases/</url>
</repository>
Run Code Online (Sandbox Code Playgroud)
最终更新
它在Birt 4.2中正式发布(查找段落'Maven支持')
http://www.eclipse.org/birt/phoenix/project/notable4.2.php
我已经在没有eclipse的情况下在本地设置了Maven项目,它已成功完成.现在我已经下载了Eclipse indgo 3.7.0.由于Eclipse-indigo正在使用m2e(maven 2 eclipse)插件
Eclipse-> help->安装新软件 - >使用(Indigo - http://download.eclipse.org/releases/indigo) - >通用工具 - > m2e(检查)并安装.
在eclipse中将项目添加为maven项目,但是在运行pom.xml文件时出现错误:
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.625s
[INFO] Finished at: Thu Sep 15 12:33:01 CEST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2): null to http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom: UnresolvedAddressException -> [Help 1]
[ERROR] …Run Code Online (Sandbox Code Playgroud) 我正在尝试根据某个Maven配置文件是否处于活动状态来配置具有数据库信息的Spring配置文件.我已经看到了这些问题的答案,但我无法将它们整合在一起.
我有一个像这样的Maven个人资料:
<profiles>
<profile>
<id>production</id>
<activation>
<property>
<name>environment.type</name>
<value>prod</value>
</property>
</activation>
</profile>
<profile>
<id>development</id>
<activation>
<property>
<name>environment.type</name>
<value>dev</value>
</property>
</activation>
<!-- Database properties for Spring -->
<properties>
<db.driver>oracle.jdbc.driver.OracleDriver</db.driver>
<db.type>oracle</db.type>
<db.host>192.168.0.0</db.host>
<db.port>1521</db.port>
<db.name>myDb</db.name>
<db.url>jdbc:${db.type}:thin:@${db.host}:${db.port}:${db.name}</db.url>
</properties>
Run Code Online (Sandbox Code Playgroud)
还有一个这样的settings.xml文件:
<servers>
<server>
<id>development</id>
<username>jsmith</username>
<password>secret</password>
</server>
</servers>
....
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<environment.type>dev</environment.type>
</properties>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
在servlet-context.xml中:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>${db.driver}</value>
</property>
<property name="url">
<value>${db.url}</value>
</property>
<property name="username">
<value>${db.username}</value>
</property>
<property name="password">
<value>${db.password}</value>
</property>
<property name="maxActive">
<value>10</value>
</property>
<property name="maxIdle"> …Run Code Online (Sandbox Code Playgroud) 最近我从Archiva迁移到了Sonatype Nexus.
我正在尝试使用来自第三方存储库的Jars,而Nexus不会将其缓存到本地存储库中.
我已经在本节中搜索了答案,而且无法回答这个问题.
这就是我做的......
我正在使用settings.xml:
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://THE_URL:8080/nexus/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>admin</id>
<username>user</username>
<password>password</password>
</server>
</servers>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings> …Run Code Online (Sandbox Code Playgroud) 貌似官方招摇的OpenAPI的规范V3支持接近释放https://blog.readme.io/an-example-filled-guide-to-swagger-3-2/和招摇,代码生成了3.0.0支持开发并在分支上传递一定程度的测试https://github.com/swagger-api/swagger-codegen3.0.0
我有一个swagger规范(从我现有的2.0规范通过https://github.com/mermade/swagger2openapi生成,输出看起来不错)
是否有一种简单的方法来运行swagger-codegen而无需自己打包jar?
[main] INFO io.swagger.parser.Swagger20Parser - 从/input/myspec.openapi3.json读取[main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - 找不到.swagger-codegen-ignore文件.线程"main"中的异常java.lang.RuntimeException:缺少swagger输入或配置!at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:685)at io.swagger.codegen.cmd.Generate.run(Generate.java:285)at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java) :35)
看起来swagger-codegen repo 在你构建之后运行一个docker容器有一些支持的方式; 我只是希望/猜测有一种支持的方法来做到这一点,而不需要在本地编译,因为我需要在几个地方设置它.
maven ×6
eclipse ×3
swagger ×3
android ×1
birt ×1
caching ×1
datasource ×1
java ×1
jdbc ×1
jsonschema ×1
mysql ×1
nexus ×1
openapi ×1
orm ×1
repository ×1
spring ×1
swagger-2.0 ×1
yaml ×1