SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread ml
Hi, I am using jenkins as a build server that uses an apache archiva repository as default repository. That repository is specified by a custom settings.xml I provide to the build. Now when building such a maven project it tries to download the dependencies from apache archiva, but fails, because

Re: SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread Anton Tanasenko
I observe this happening from time to time when both maven2 and maven3 builds are using the same local repository. Maven2 seems to modify metadata files in a way that maven3 fails to work with. Cleaning bogus artifacts from local repo makes the problem go away. 2015-11-09 12:31 GMT+02:00 : > Hi,

Re: SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread ml
Hmm, the metadata files seems correct. It references the file with the timestamp. Also on the workstation if works well. A difference I see is that the build on the workstation downloads the maven-metadata.xml, but the jenkins build doesn't. I assume this can be the problem. But why is this the c

Re: SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread Bernd Eckenfels
Hello, check the /opt/jenkins/mvn-settings.xml files, if it specifies anything for the repo or distributions or proxy or similiar. Gruss Bernd Am Mon, 9 Nov 2015 12:07:35 +0100 schrieb m...@mherrn.de: > Hmm, the metadata files seems correct. It references the file with the > timestamp. Also on

Re: SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread ml
Hi Bernd, yes, it does. This is the settings file I provided to access my repository. It looks like this: / /tmp/mvn-repo MYREPO * http://192.168.30.10:5501/repository/MYREPO MYREPO cen

Re: SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread ml
Hi all, I have now modified my jenkins build to include the -U option to force checking for new snapshots. And now it works. So it really seems to be the problem, that maven doesn't check for the artifact (not even if hasn't the jar in the local repository). What are the possible reasons for thi

Re: SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread Bernd
Your settings.xml do not contain your own repo, only a mirror for central. It might be that with this setting metadata is handled differently. Have you tried to build locally using the settings file (-s option) and see if it behaves wrong, too? I generally always add a release and snapshot company

Re: SNAPSHOT jar incorrectly downloaded

2015-11-09 Thread ml
The local build I am doing is already using the same settings.xml. The only difference is that the local one doesn't explicitly specify the location of the local repository. But I don't expect that to be the problem. How do you handle the additional company repo entry? As I understand maven only l

Maven stops building class files after Enum file added to project.

2015-11-09 Thread Jarl
The build succeeds but the target/classes directory is empty of any class files. -Jarl - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Karl Heinz Marbaise
Error messages ? Log output ? Kind regards Karl Heinz Marbaise On 11/9/15 7:59 PM, Jarl wrote: The build succeeds but the target/classes directory is empty of any class files. -Jarl - To unsubscribe, e-mail: users-unsubscr

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Jarl
No error messages. [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ myProject--- [INFO] Changes detected - recompiling the module! [INFO] Compiling 295 source files to C:\myProject\target\classes [INFO] [INFO] --- maven-war-plugin:2.3:war (default-war) @ myProject--- [INFO] Pack

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Karl Heinz Marbaise
Hi, those lines: [INFO] Assembling webapp [myProject] in [C:\myProject\target\myProject-2.1.0] [INFO] Processing war project [INFO] Copying webapp resources [C:\myProject\src\main\webapp] [INFO] Webapp assembled in [661 msecs] [INFO] Building war: C:\apache-tomcat-7.0.64\webapps\myProject-2.1.

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Jarl
The war file is first built and then copied to tomcat.This is done after the class building steps so it shouldn't affect the preceding steps. Yes a mvn clean removes the target directory which it does but a subsequent mvn install leaves the classes directory empty of any class files. On

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Jarl
Once a 'clean' is performed all subsequent builds leave classes directory empty. I can copy a working project to a new directory but i can only get the first build to work. Is there way to actually clean maven build artifacts other than mvn clean? On 11/9/2015 8:30 PM, Karl Heinz Marbaise

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Wayne Fay
Can you make it work with plain "javac -cp ..."? Have you tried? There may be some "hidden" javac error that Maven is not showing you, for some reason. Wayne On Mon, Nov 9, 2015 at 2:00 PM, Jarl wrote: > Once a 'clean' is performed all subsequent builds leave classes directory > empty. I can c

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Mark Eggers
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jarl, Why is the war file being built in Tomcat's webapps directory? Could you please post your pom.xml file? Also, you might want to run with the -X script to see what's going on. I think in general if you want to deploy from Maven to Tomcat, it is

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Jarl
I am still working on getting it to compile with javac. My local tomcat is where I need the war file. I could use a copy plugin but it isn't obvious(at least not yet) how to do that with maven. Other than copying the file, what would the tomcat plugin do? Continuous deployment isn't worth the

Re: Maven stops building class files after Enum file added to project.

2015-11-09 Thread Mark Eggers
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jarl, A lot of things to comment about here. 1. Tomcat 7 does not support j2ee7 - servlet specification 3.1 If you are coding against that, you'll need to run on Tomcat 8. See below for what each version of Tomcat supports. http://tomcat.apache.org