Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building project from the command line #109

Closed
dblock opened this issue Jul 9, 2014 · 23 comments
Closed

Building project from the command line #109

dblock opened this issue Jul 9, 2014 · 23 comments
Assignees
Labels

Comments

@dblock
Copy link
Collaborator

dblock commented Jul 9, 2014

Running build all no longer works, we don't use ant. Needs to be updated with Maven.

@dblock
Copy link
Collaborator Author

dblock commented Jul 9, 2014

@hazendaz care to take a look?

@hazendaz
Copy link
Member

hazendaz commented Jul 9, 2014

Yes I'll look at this tonight

--- Original Message ---

From: "Daniel Doubrovkine (dB.) @dblockdotorg" [email protected]
Sent: July 9, 2014 4:18 PM
To: "dblock/waffle" [email protected]
Cc: "Jeremy Landis" [email protected]
Subject: Re: [waffle] Building project from the command line (#109)

@hazendaz care to take a look?


Reply to this email directly or view it on GitHub:
#109 (comment)

@hazendaz
Copy link
Member

I tried installing all the items noted in the setting up development environment. At the moment, I'm running into msbuild errors. Not sure if it has to do with windows 8 since I could only find the windows 7 install files. Here is the output. Any ideas?

Microsoft Windows Version 6.3.9600 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd C:\Users\Jeremy\Documents\GitHub\waffle

C:\Users\Jeremy\Documents\GitHub\waffle>dir
Volume in drive C has no label.
Volume Serial Number is 4683-0D66

Directory of C:\Users\Jeremy\Documents\GitHub\waffle

07/06/2014 07:16 PM

.
07/06/2014 07:16 PM ..
07/09/2014 10:34 PM .git
06/13/2014 09:11 PM 505 .gitattributes
06/13/2014 09:11 PM 266 .gitignore
06/13/2014 09:11 PM 1,242 build.cmd
07/09/2014 09:40 PM 12,879 CHANGELOG.md
06/13/2014 09:11 PM Docs
06/13/2014 09:11 PM 1,198 HISTORY.md
06/13/2014 09:12 PM 11,368 LICENSE
07/09/2014 09:18 PM 5,486 README.md
06/13/2014 09:11 PM Source
06/13/2014 09:11 PM 4,097 Version.proj
06/13/2014 09:11 PM 21,899 waffle.jpg
07/09/2014 10:11 PM 6,364 Waffle.proj
06/13/2014 09:11 PM 4,917 Waffle.sln
12/16/2013 04:17 AM 596 Waffle.snk
12 File(s) 70,817 bytes
5 Dir(s) 1,329,960,747,008 bytes free

C:\Users\Jeremy\Documents\GitHub\waffle>build all
Microsoft (R) Build Engine Version 3.5.30729.7903
[Microsoft .NET Framework, Version 2.0.50727.8000]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 7/9/2014 10:38:12 PM.
Project "C:\Users\Jeremy\Documents\GitHub\waffle\Waffle.proj" on node 0 (all ta
rget(s)).
Cleaning project, Release ...
C:\Users\Jeremy\Documents\GitHub\waffle\Waffle.proj(36,5): error MSB4062: The "
MSBuild.Community.Tasks.DeleteTree" task could not be loaded from the assembly
\MSBuild.Community.Tasks.dll)). Could not load file or assembly 'file:https:///C:\MSB
uild.Community.Tasks.dll))' or one of its dependencies. The system cannot find
the file specified. Confirm that the declaration is correct, and th
at the assembly and all its dependencies are available.
Done Building Project "C:\Users\Jeremy\Documents\GitHub\waffle\Waffle.proj" (al
l target(s)) -- FAILED.

Build FAILED.

"C:\Users\Jeremy\Documents\GitHub\waffle\Waffle.proj" (all target) (1) ->
(clean target) ->
C:\Users\Jeremy\Documents\GitHub\waffle\Waffle.proj(36,5): error MSB4062: The
"MSBuild.Community.Tasks.DeleteTree" task could not be loaded from the assembl
y \MSBuild.Community.Tasks.dll)). Could not load file or assembly 'file:https:///C:\M
SBuild.Community.Tasks.dll))' or one of its dependencies. The system cannot fin
d the file specified. Confirm that the declaration is correct, and
that the assembly and all its dependencies are available.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.11

C:\Users\Jeremy\Documents\GitHub\waffle>

@dblock
Copy link
Collaborator Author

dblock commented Jul 10, 2014

Did you install MSBuild community tasks?

https://github.com/loresoft/msbuildtasks

@hazendaz
Copy link
Member

I do have that installed. I even tried the latest based off the link you provided. Still not having luck there. I did review the current zip file. I assume that is what the intent of the msbuild is. That said, at least for the java side, I'm going to write a maven assembly to put all that part together. That will at least resolve a large portion of the issue. I should be able to get that together over the weekend. It will be part of the waffle-parent pom. I have verified that maven build itself does work from command line as expected so this will be a good win even if not the full solution at the moment..

@hazendaz
Copy link
Member

I have the multi-module maven assembly up and working. I think to make it work properly I need to mavenize all the demos. I definitely should have a PR by the end of the weekend. This is moving faster than expected. Before I ultimately PR this, can you take a look at the current PR I have for the Negotiate failure / NTLM working test case issue?

@dblock
Copy link
Collaborator Author

dblock commented Jul 11, 2014

As long as I can run mvn test from the top of the 'JNA' folder, we're good. I can check the rest.

@hazendaz
Copy link
Member

The location to run maven from the msbuild would now be 'Source/JNA/waffle-parent'.

Other than that there are a lot of expectations of what is getting built out under the tree which is no longer true. So the assembly I have will be able to take over for that piece. Essentially it will be placing a zip file under 'Source/JNA/waffle-distro/target' that will need picked up by the msbuild piece. So much less java related items in the msbuild will be required. It will just need to issue the build command then copy the resulting zip file. I'm using a zip file at the moment but that could as easily be a directory.

@dblock
Copy link
Collaborator Author

dblock commented Jul 12, 2014

I tried running mvn clean install from waffle-parent:

[ERROR] [Help 2] http:https://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
C:\Users\dblock\source\waffle\dblock\Source\JNA\waffle-parent>mvn clean install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.github.dblock.waffle:waffle-demo-parent:1.7-SNAPSHOT (C:\Users\dblock\source\waffle\dblock\Source\JNA\waffle-demo\waffle-demo-parent\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact com.github.dblock.waffle:waffle-parent:pom:1.7-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help
2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http:https://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http:https://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

@hazendaz
Copy link
Member

Got it! This clued me into the issue. I deleted my waffle repo entries and tried command line again. Now I get the error you have. This gives me a clear jumping off point to fix. Thanks.

@hazendaz
Copy link
Member

And just like that, fixed. If you want to test without taking the current pull request for initial verification, go into the 'Source/JNA/waffle-demo/waffle-demo-parent' and change the parent relative path from '../waffle-parent' to '../../waffle-parent'.

@hazendaz
Copy link
Member

New pull request will be made that fully mavenizes everything. See that request...

@hazendaz
Copy link
Member

I got the msbuild working finally. .net 3.5 appears to be a problem at least for me. So switched to 4.0 framework and it is now building. Test cases fail under .net side so skipped those to see if I could at least get a full build and ensure all else is working. Got through build but java stuff not getting copied properly. So working on that at the moment.

@dblock
Copy link
Collaborator Author

dblock commented Jul 14, 2014

Can you update the development environment docs for whatever you had to do for the MSBuild build to work? Clearly it was harder than we thought :)

@dblock
Copy link
Collaborator Author

dblock commented Jul 14, 2014

Failure doing build all from the top:

  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO]
  [INFO] waffle-parent ..................................... SUCCESS [2.855s]
  [INFO] waffle-jna ........................................ SUCCESS [0.408s]
  [INFO] waffle-tests ...................................... FAILURE [1.233s]
  [INFO] waffle-tomcat6 .................................... SKIPPED
  [INFO] waffle-demo-parent ................................ SKIPPED
  [INFO] waffle-filter ..................................... SKIPPED
  [INFO] waffle-form ....................................... SKIPPED
  [INFO] waffle-jaas ....................................... SKIPPED
  [INFO] waffle-mixed ...................................... SKIPPED
  [INFO] waffle-mixed-post ................................. SKIPPED
  [INFO] waffle-negotiate .................................. SKIPPED
  [INFO] waffle-spring-security3 ........................... SKIPPED
  [INFO] waffle-spring-filter .............................. SKIPPED
  [INFO] waffle-spring-form ................................ SKIPPED
  [INFO] waffle-jetty ...................................... SKIPPED
  [INFO] waffle-shiro ...................................... SKIPPED
  [INFO] waffle-spring-security2 ........................... SKIPPED
  [INFO] waffle-spring-security4 ........................... SKIPPED
  [INFO] waffle-tomcat5 .................................... SKIPPED
  [INFO] waffle-tomcat7 .................................... SKIPPED
  [INFO] waffle-tomcat8 .................................... SKIPPED
  [INFO] waffle-distro ..................................... SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 5.894s
  [INFO] Finished at: Mon Jul 14 07:43:26 EDT 2014
  [INFO] Final Memory: 15M/36M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal on project waffle-tests: Could not resolve dependencies for project com.github.dblock.waffle:waffle-tests:jar:1.7-SNAPSHOT: Could not find artifact com.github.dblock.
  waffle:waffle-jna:jar:1.7-SNAPSHOT in sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http:https://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
  [ERROR]
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn <goals> -rf :waffle-tests
C:\Users\dblock\source\waffle\dblock\Waffle.proj(38,5): error MSB3073: The command "mvn clean" exited with code 1.
Done Building Project "C:\Users\dblock\source\waffle\dblock\Waffle.proj" (all target(s)) -- FAILED.


Build FAILED.

"C:\Users\dblock\source\waffle\dblock\Waffle.proj" (all target) (1) ->
(clean target) ->
  C:\Users\dblock\source\waffle\dblock\Waffle.proj(38,5): error MSB3073: The command "mvn clean" exited with code 1.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:10.06

@hazendaz
Copy link
Member

Strange that it cannot find the module that shows success. Does this happen each time you try to build? Maybe a second try would work. I'll try to reproduce tonight.

--- Original Message ---

From: "Daniel Doubrovkine (dB.) @dblockdotorg" [email protected]
Sent: July 14, 2014 7:44 AM
To: "dblock/waffle" [email protected]
Cc: "Jeremy Landis" [email protected]
Subject: Re: [waffle] Building project from the command line (#109)

Failure doing build all from the top:

  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO]
  [INFO] waffle-parent ..................................... SUCCESS [2.855s]
  [INFO] waffle-jna ........................................ SUCCESS [0.408s]
  [INFO] waffle-tests ...................................... FAILURE [1.233s]
  [INFO] waffle-tomcat6 .................................... SKIPPED
  [INFO] waffle-demo-parent ................................ SKIPPED
  [INFO] waffle-filter ..................................... SKIPPED
  [INFO] waffle-form ....................................... SKIPPED
  [INFO] waffle-jaas ....................................... SKIPPED
  [INFO] waffle-mixed ...................................... SKIPPED
  [INFO] waffle-mixed-post ................................. SKIPPED
  [INFO] waffle-negotiate .................................. SKIPPED
  [INFO] waffle-spring-security3 ........................... SKIPPED
  [INFO] waffle-spring-filter .............................. SKIPPED
  [INFO] waffle-spring-form ................................ SKIPPED
  [INFO] waffle-jetty ...................................... SKIPPED
  [INFO] waffle-shiro ...................................... SKIPPED
  [INFO] waffle-spring-security2 ........................... SKIPPED
  [INFO] waffle-spring-security4 ........................... SKIPPED
  [INFO] waffle-tomcat5 .................................... SKIPPED
  [INFO] waffle-tomcat7 .................................... SKIPPED
  [INFO] waffle-tomcat8 .................................... SKIPPED
  [INFO] waffle-distro ..................................... SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 5.894s
  [INFO] Finished at: Mon Jul 14 07:43:26 EDT 2014
  [INFO] Final Memory: 15M/36M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal on project waffle-tests: Could not resolve dependencies for project com.github.dblock.waffle:waffle-tests:jar:1.7-SNAPSHOT: Could not find artifact com.github.dblock.
  waffle:waffle-jna:jar:1.7-SNAPSHOT in sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http:https://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
  [ERROR]
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn <goals> -rf :waffle-tests
C:\Users\dblock\source\waffle\dblock\Waffle.proj(38,5): error MSB3073: The command "mvn clean" exited with code 1.
Done Building Project "C:\Users\dblock\source\waffle\dblock\Waffle.proj" (all target(s)) -- FAILED.


Build FAILED.

"C:\Users\dblock\source\waffle\dblock\Waffle.proj" (all target) (1) ->
(clean target) ->
  C:\Users\dblock\source\waffle\dblock\Waffle.proj(38,5): error MSB3073: The command "mvn clean" exited with code 1.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:10.06

Reply to this email directly or view it on GitHub:
#109 (comment)

@hazendaz
Copy link
Member

This problem appears to be maven related. I've solved the problem by combining the 'mvn clean' and 'mvn install' into the jar section only as 'mvn clean install'. No real good reason to keep those apart anyway. I'll research this a bit more but after isolating the problem and running various things, I was able to reproduce this even using eclipse by just running 'mvn clean'. I'll do a pull request on this one tomorrow sometime. In the meantime, you can just switch the 'waffle.proj' file to skip the first 'mvn clean' call and then add the 'clean' first in the second maven call under jar section. That should get it working for you.

@hazendaz
Copy link
Member

This problem seems to be overall in maven issue. Probably something I hadn't noticed before since I almost always am in eclipse when running and have had prior builds first. Basically in multi module, anything without existing items in the .m2 seem to cause problems. So the above proposed solution will solve the issue.

@dblock
Copy link
Collaborator Author

dblock commented Jul 15, 2014

This got me further. I changed the .proj target to just not clean in clean and do clean install in the build.

I had two failures in the .NET tests, one of which was legit, now fixed.

Tomcat5 giving me trouble:

C:\Users\dblock\source\waffle\dblock\Source\JNA\waffle-tomcat5>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building waffle-tomcat5 1.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for tomcat:catalina:jar:5.5.36 is missing, no dependency information available
[WARNING] The POM for tomcat:servlet-api:jar:5.5.36 is missing, no dependency information available
[WARNING] The POM for tomcat:tomcat-util:jar:5.5.36 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.734s
[INFO] Finished at: Tue Jul 15 07:02:29 EDT 2014
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project waffle-tomcat5: Could not resolve dependencies for project com.github.dblock.waffle:waffle-tomcat5:jar:1.7-SNAPSHOT: The following artifacts could not be reso
lved: tomcat:catalina:jar:5.5.36, tomcat:servlet-api:jar:5.5.36, tomcat:tomcat-util:jar:5.5.36: Failure to find tomcat:catalina:jar:5.5.36 in http:https://repo.maven.apache.org/maven2 was cached in the loca
l repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

@hazendaz
Copy link
Member

K there is a bat file under third party now. Run that and it will install the third party items. Then build should be good. I'm going to add that to maven tonight so it is automatic.

You also mentioned updating docs. Most already are. I did find a few old ant related items so will get that updated tonight.

--- Original Message ---

From: "Daniel Doubrovkine (dB.) @dblockdotorg" [email protected]
Sent: July 15, 2014 7:03 AM
To: "dblock/waffle" [email protected]
Cc: "Jeremy Landis" [email protected]
Subject: Re: [waffle] Building project from the command line (#109)

This got me further. I changed the .proj target to just not clean in clean and do clean install in the build.

I had two failures in the .NET tests, one of which was legit, now fixed.

Tomcat5 giving me trouble:

C:\Users\dblock\source\waffle\dblock\Source\JNA\waffle-tomcat5>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building waffle-tomcat5 1.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for tomcat:catalina:jar:5.5.36 is missing, no dependency information available
[WARNING] The POM for tomcat:servlet-api:jar:5.5.36 is missing, no dependency information available
[WARNING] The POM for tomcat:tomcat-util:jar:5.5.36 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.734s
[INFO] Finished at: Tue Jul 15 07:02:29 EDT 2014
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project waffle-tomcat5: Could not resolve dependencies for project com.github.dblock.waffle:waffle-tomcat5:jar:1.7-SNAPSHOT: The following artifacts could not be reso
lved: tomcat:catalina:jar:5.5.36, tomcat:servlet-api:jar:5.5.36, tomcat:tomcat-util:jar:5.5.36: Failure to find tomcat:catalina:jar:5.5.36 in http:https://repo.maven.apache.org/maven2 was cached in the loca
l repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

Reply to this email directly or view it on GitHub:
#109 (comment)

@dblock
Copy link
Collaborator Author

dblock commented Jul 15, 2014

Ok, good. I fixed its relative paths in d865a01.

Try to really get a "build all" to succeed from top without anything preinstalled. This probably means calling out this batch as well.

@hazendaz
Copy link
Member

Good catch there. Definitely didn't want my machine... I'll try to get this all completed tonight.

--- Original Message ---

From: "Daniel Doubrovkine (dB.) @dblockdotorg" [email protected]
Sent: July 15, 2014 7:58 AM
To: "dblock/waffle" [email protected]
Cc: "Jeremy Landis" [email protected]
Subject: Re: [waffle] Building project from the command line (#109)

Ok, good. I fixed its relative paths in d865a01.

Try to really get a "build all" to succeed from top without anything preinstalled. This probably means calling out this batch as well.


Reply to this email directly or view it on GitHub:
#109 (comment)

@dblock
Copy link
Collaborator Author

dblock commented Jul 17, 2014

This now works and passes all tests locally for me, closing.

@dblock dblock closed this as completed Jul 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants