This is not exactly a question, as I'll move on not wainting for an answer.
Rather a log of an unsolved issue. So, I'd be glad if somebody can explain.
Writing this down may even help me to find the explanation myself.

I decided to build some understanding of maven by debugging it with jdb.
This led me to checkout in subversion the wagon-2.2 tag, and to build it.
Now, this would not build it, but rather download the jar from our cache of
central.
So, I changed the 'version' field to 2.2.1-SNAPSHOT in the wagon-http pom
file.
I had to force 2.2 for the parent.
I attempted to build: mvn install.

The build failed, because of a surefile test for HTTP Provider.
I decided this might be caused by a proxy configuration (?) so that I
decided to skip this.
I tried next: mvn install::install

This failed for API 2.2 with the error:

Failed to execute goal
org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-cli)
on project wagon-provider-api: 
The packaging for this project did not assign a file to the build artifact

Armed with my debugger, I trace the issue down to InstallMojo:97
(maven-install-plugin-2.3.1)

                File file = artifact.getFile();

And indeed, 'dumping' the 'artifact' variable, I could check that its 'file'
field was null:

main[1] dump artifact
 artifact = {
    groupId: "org.apache.maven.wagon"
    artifactId: "wagon-provider-api"
    baseVersion: "2.2"
    type: "jar"
    classifier: null
    scope: null
    file: null
...

Now, I also checked that the jar was found in the target directory of my
build tree:

./wagon-provider-api/target/wagon-provider-api-2.2.jar

and even that setting it as value to file under the debugger was enough to
pass over the error:

main[1] set artifact.file = new
java.io.File("wagon-provider-api/target/wagon-provider-api-2.2.jar")
 artifact.file = new
java.io.File("wagon-provider-api/target/wagon-provider-api-2.2.jar") =
"wagon-provider-api/target/wagon-provider-api-2.2.jar"
main[1] dump artifact
 artifact = {
    groupId: "org.apache.maven.wagon"
    artifactId: "wagon-provider-api"
    baseVersion: "2.2"
    type: "jar"
    classifier: null
    scope: null
    file: instance of java.io.File(id=2871)
...

Now, why was it not set, I didn't understand.
Thanks
Marc

--
View this message in context: 
http://maven.40175.n5.nabble.com/Fail-to-build-snapshot-tp5713546.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to