我们有:Eclipse 3.6,Maven(M2Eclipse),两个项目(ProjectA和ProjectB)和pom.xml.
ProjectB依赖于ProjectA(使用maven).
如果我们将ProjectA安装到本地存储库(maven安装),ProjectB解决依赖关系确定.
如果我们不将ProjectA安装到本地存储库.在Maven POM编辑器中,我们将ProjectA添加为ProjectB的依赖项(M2Eclipse使用"工作区项目"存储库来解决此依赖关系).
好的,补充道.但是,如果我们做"maven包"或其他插件目标...依赖性没有解决.我们有这样的事情:
正在下载:http://repo1.maven.org/maven2/Artifact/ProjectA/maven-metadata.xml
当然,它无法解决.
现在是问题.构建ProjectB时如何使用"Workspace项目"?
PS为什么我不使用"maven install"?好的,它是100%的方法,但是当我做了很多小的改变时,它太长了做多余的操作.
PSS"工作区项目"我们可以看到Window - > Show View - > Maven Repositories.
1)运行Git Bash(C:\ Program Files(x86)\ Git\bin\sh.exe --login)
$ ssh -v git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/Alexander Fedorov/.ssh/config
debug1: Applying options for github.com
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
...
Hi xpoft! You've successfully authenticated, but GitHub does not provide shell access.
...
Run Code Online (Sandbox Code Playgroud)
好的!ssh配置好读.
2)从cmd.exe运行
C:\Users\Alexander Fedorov>ssh.exe -v git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [207.97.227.239] port 22.
...
debug1: No more authentication methods to try.
Permission denied …Run Code Online (Sandbox Code Playgroud) 如何生成List<Type>ArrayOf {Type}?例如方法返回
[WebMethod]
public List<long> GetSimple()
Run Code Online (Sandbox Code Playgroud)
WSDL2Java将生成:
public ru.test.ws.ArrayOfLong GetSimple();
Run Code Online (Sandbox Code Playgroud)
ArrayOfLong:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ArrayOfLong", propOrder = {
"_long"
})
public class ArrayOfLong
implements Serializable
{
@XmlElement(name = "long", type = Long.class)
protected List<Long> _long;
public List<Long> getLong() {
if (_long == null) {
_long = new ArrayList<Long>();
}
return this._long;
}
}
Run Code Online (Sandbox Code Playgroud)
如何配置CXF和JAXB来List<Long>代替ArrayOfLong?
Type是对象中的枚举属性.
JSP:
<form:radiobutton path="type" value="Male" />
Run Code Online (Sandbox Code Playgroud)
Java的:
public enum TestType
{
Male, Female;
}
Run Code Online (Sandbox Code Playgroud)
并得到错误
无法将'male'从'java.lang.String'类型转换为'java.lang.Enum'类型; reason ='java.lang.Enum不是枚举类型'
如何配置freemarker来搜索几个罐子中的模板?随着春天.
<!-- freemarker config -->
<bean id="freemarkerConfig"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPaths" value="classpath:/freemarker/" />
</bean>
Run Code Online (Sandbox Code Playgroud)
一个war文件(要部署)和jar文件(在依赖项中).
One.war
/freemarker/simple.ftl
Two.jar
/freemarker/test.ftl
工作.
ModelAndView mav = new ModelAndView();
mav.setViewName("simple");
Run Code Online (Sandbox Code Playgroud)
不工作.找不到test.ftl
ModelAndView mav = new ModelAndView();
mav.setViewName("test");
Run Code Online (Sandbox Code Playgroud)
如果设置为:
<property name="templateLoaderPaths" value="classpath:/freemarker/,classpath:/freemarker2/" />
Run Code Online (Sandbox Code Playgroud)
One.war
/freemarker/simple.ftl
Two.jar
/freemarker2/test.ftl
工作.
ModelAndView mav = new ModelAndView();
mav.setViewName("simple");
Run Code Online (Sandbox Code Playgroud)
工作.
ModelAndView mav = new ModelAndView();
mav.setViewName("test");
Run Code Online (Sandbox Code Playgroud)
还有问题!如何配置freemarker在同一路径中的几个jar(war)中搜索(classpath:/ freemarker /)?
Spring WebFlow中的默认日期格式为"yyyy-MM-dd".
如何更改为其他格式?"dd.mm.yyyy"例如.
有人知道如何project reference在ASP.NETvNext中添加吗?
project.json
{
"dependencies": {
"myProject": ""
},
"configurations" : {
"net45" : { },
"k10" : { }
}
}
Run Code Online (Sandbox Code Playgroud)
它不起作用:(