ant-contrib 最新版本是ant-contrib-1.0b3.jar?
http://ant-contrib.sourceforge.net/tasks/tasks/more_conditions.html
本文件显示endsWith状况
但我使用ant 1.8.2 并且ant-contrib-1.0b3.jar,我找不到endsWith条件
<if>
<endswith string="D:\FeiLong Soft\Essential\Development\repository\org\springframework\spring-beans" with="spring-beans" />
<then>
<echo>equals</echo>
</then>
<else>
<echo>not equals</echo>
</else>
</if>
Run Code Online (Sandbox Code Playgroud)
但结果:
BUILD FAILED
E:\Workspaces\feilong\feilong-platform\tools\feilong-tools-ant\build.xml:32: if
doesn't support the nested "endswith" element.
Total time: 1 second
Run Code Online (Sandbox Code Playgroud) 在构建文件中使用Ant - 如何解析文件路径并获取其父级的父目录?
<target name="test">
<property name="jar"
value="D:\F\D\r\org\springframework\spring-beans\3.0.7.R\spring-beans.jar" />
<echo>${jar}</echo>
</target>
Run Code Online (Sandbox Code Playgroud)
我想得到这个结果:
D:\F\D\r\org\springframework\spring-beans
Run Code Online (Sandbox Code Playgroud) 我有一个请求,在浏览器地址栏中输入:
http://localhost:8888/cmens-tops-outwear/t-b-f-a-c-s-fLoose-p-g-e-i-o.htm?'"--></style></script><script>netsparker(0x0000E1)</script>=
Run Code Online (Sandbox Code Playgroud)
Tomcat6.0.35 我已经设定 URIEncoding="UTF-8"
request.getQueryString()在servlet中使用:
如果chrome,我明白了
'%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x0000E1)%3C/script%3E=
Run Code Online (Sandbox Code Playgroud)
如果ie,我明白了
'"--></style></script><script>netsparker(0x0000E1)</script>=
Run Code Online (Sandbox Code Playgroud)
为什么?
额外
我想request.getQueryString()创建一个uri
URI uri = URI.create(url)
Run Code Online (Sandbox Code Playgroud)
如果是:
java.net.URISyntaxException: Illegal character in query at index 36: /cmens/t-b-f-a-c-s-f-p-g-e-i-o.htm?'"--></style></script><script>netsparker(0x0000E1)</script>
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parseHierarchical(URI.java:3072)
at java.net.URI$Parser.parse(URI.java:3024)
at java.net.URI.<init>(URI.java:578)
at java.net.URI.create(URI.java:840)
Run Code Online (Sandbox Code Playgroud)
如何确定queryString是否已被编码?
我在我的maven私人服务器(nexus)中有一个名为brandstore-repository的jar,
为什么maven每次都会从maven中心服务器上搜索它?
[artifact:mvn] Downloading: http://search.maven.org/remotecontent?filepath=/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] Downloading: http://repository.jboss.com/maven2/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] Downloading: https://oss.sonatype.org/content/repositories/snapshots//com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] Downloading: http://10.8.12.100/nexus/content/groups/public/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] 1K downloaded
[artifact:mvn] Downloading: http://search.maven.org/remotecontent?filepath=/com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] Downloading: http://repository.jboss.com/maven2/com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] Downloading: https://oss.sonatype.org/content/repositories/snapshots//com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] Downloading: http://10.8.12.100/nexus/content/groups/public/com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] 17K downloaded
[artifact:mvn] Downloading: http://search.maven.org/remotecontent?filepath=/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] Downloading: http://repository.jboss.com/maven2/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] Downloading: https://oss.sonatype.org/content/repositories/snapshots//com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] Downloading: http://10.8.12.100/nexus/content/groups/public/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] 913K downloaded
Run Code Online (Sandbox Code Playgroud)
在我的setting.xml文件中,我已经在顶部设置了我的私人服务器(nexus)"http://10.8.12.100/nexus/content/groups/public"
和activeProfiles我在"maven-home"之前设置了"profile-baozun"
<profiles>
<profile>
<id>profile-baozun</id>
<repositories>
<repository>
<id>public</id>
<url>http://10.8.12.100/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>loxia2</id>
<url>http://loxia2.googlecode.com/svn/repository</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
</repositories>
</profile>
<profile>
<id>maven-home</id>
<repositories>
<repository>
<id>central</id>
<url>http://search.maven.org/remotecontent?filepath=</url>
</repository> …Run Code Online (Sandbox Code Playgroud) 在我的tomcat server.xml中,我设置了 JAVA_OPTS -Xmx3072m;
top命令,为什么显示"DATA"列值为3.8G?
