Sam Ritter

Ranch Hand
+ Follow
since Jan 23, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sam Ritter

I saw that but best I can tell, I am not using any of those features. I am using maven-ant-tasks-2.1.3.jar which seems to be still supported.
1 week ago
I just realized I posted the wrong link. The one I posted refered to the link I actually used. While still 9 years old this is what I used.
1 week ago
Not that I've been able to find so far.
1 week ago
It turns out that I don't need Ivy or even mvn. I found this article for using maven from ant. It seems to build successfully however there is a dependency that cannot be resolved. When I run the jar file I get this error:


I would have thought that the build would fail if that dependency was missing. In any case I can run it successfully from Eclipse so it can find that dependency in the library. Here is the entry in pom.xml:

Is it possible for the build to be successful and it not find that dependency at all? Can someone tell me how to debug this? TIA.
1 week ago
I been looking at converting from ant to maven but it is still pretty fuzzy to me. I'll look into Ivy. Thanks.
2 weeks ago

Tim Moores wrote:Now that you have a Maven build, why still use Ant at all?


Mostly because I don't know what I am doing with maven. As you can see from the posted ant build script I obtain certain variables from the ant command line. Those variables are extracted from MySQL and passed to ant in a script I wrote to generate the jar. I can find nothing in maven that does the equivalent nor can I find how to put all those various tests into a maven build xml (which I assume is pom.xml). As a maven noob I am having trouble finding what I need in the docs nor can I find any examples that help me. I guess my build script is a bit complicated for a noob.
2 weeks ago
I may have found what I need but being a maven noob I'm not sure what I am seeing. I am looking at this article. I don't see how pom.xml fits into this for the maven dependencies and it is not clear if maven winds up with the correctly named jar file from the embedded ant build xml.
2 weeks ago
This is a bit confusing. How does your suggestion fit into the posted ant build.xml? I've never used maven before other then via my IDE.
2 weeks ago
I have a java application that I build with ant. I've had to convert my application to a Maven project in order to use some maven dependencies. So now my project has a pom.xml file. When I run using Eclipse everything is fine. But when I run my build xml with ant the maven dependencies are missing. I am guessing I need to somehow include the pom.xml file into the build file and that is where I need help. Is there some xml syntax that simply includes the pom.xml or to I somehow need to physically merge the two files? TIA
Here is my current build file:

Here is the pom.xml that I now need to include:
2 weeks ago
Well, I finally returned to this project. Fortunately (for me), I had to make some seemingly unrelated changes and can no longer reproduce the problem. Obviously those changes were not entirely unrelated somehow but it is not worth pursuing at this point.
2 weeks ago
I haven't had a chance to get back to it yet.
3 weeks ago
Thanks for the reply. I will when I get back to that.
1 month ago
I am trying to learn about the Cipher library and discovered something that to me seems strange. Playing around I inadvertently encrypted my encryption key. I then discovered that if I try to decrypt that, the result is null (no exception thrown). In other words decrypting the encryption key resulted in a null decrypted string. I don't know why that would be a practical thing to do but from an academic standpoint, would one expect that to be normal behavior? Logically I don't see why that would happen. A string is a string. TIA.
1 month ago
Thanks. Doh! Of course, I just need to get the content type and there is a method for that. No need to parse. Sorry.
1 month ago
I am trying to parse an HttpResponse string. It looks to me kind of like a JSON string:


However all the suggestions for doing this, that I've found, do not work. I can't seem to convert it to a JSON string (assuming that is the right way to parse it):

This code produces an exception:

Unexpected character (H) at position 1.

I thought that was because of the leading substring "HttpResponseProxy" which is why I tried to remove it but I still get the same error. I suppose it is now the 'H' in HTTP which implies it may not be JSON. Can someone help me figure out how to parse an HttpResponse. TIA.
1 month ago