Re: [Nix-dev] buildMaven usage

2017-02-19 Thread laverne
 On Wed, 15 Feb 2017 13:08:07 -0600 zimbatm  
wrote 



Hi laverne,



did you manage to figure it out?



I think the usage would be to run https://github.com/NixOS/mvn2nix-maven-plugin 
on your project and then in your default.nix add something like:

```

{ pkgs ? import  {}

, buildMaven ? pkgs.buildMaven

}:

buildMaven ./infofile

```



Where the `./infofile` is the file generated by mvn2nix (it should be a JSON 
file).



As you can see not a lot of people are packaging java apps :)



Cheers,

z




On Fri, 10 Feb 2017 at 05:47 laverne  wrote:







Hi,



I have a question about the function defined at 
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/build-maven.nix



I wanted to use it to build Spark Frame (http://sparkjava.com/), however, while 
the function is in all-packages, it isn't doesn't seem to be used anywhere else 
in nixpkgs. Is anyone here using the function in other projects that they would 
be willing to link to so that I could get a feel for how to use it?



Thanks,

Laverne






No, I never did get it to work, but I hadn't tried the exact code that you 
recommend. Giving it a try produced the same results as other attempts:





building path(s) 
‘/nix/store/4swv9zdqzclsfafp0j1hcks3xj47chgh-spark-core-2.5.4.jar’

unpacking sources

unpacking source archive /nix/store/i9zn88vg2s50a6nx5g0wy1xnn1j6rflb-spark

source root is spark

patching sources

configuring

no configure script, doing nothing

building

[INFO] Scanning for projects...

[ERROR] [ERROR] Some problems were encountered while processing the POMs:

[FATAL] Non-resolvable parent POM for com.sparkjava:spark-core:2.5.4: Cannot 
access central (https://repo.maven.apache.org/maven2) in offline mode and the 
artifact org.sonatype.oss:oss-parent:pom:7 has not been downloaded from it 
before. and 'parent.relativePath' points at wrong local POM @ line 4, column 13

@

[ERROR] The build could not read 1 project -> [Help 1]

[ERROR]  

[ERROR]   The project com.sparkjava:spark-core:2.5.4 
(/tmp/nix-build-spark-core-2.5.4.jar.drv-0/spark/pom.xml) has 1 error

[ERROR] Non-resolvable parent POM for com.sparkjava:spark-core:2.5.4: 
Cannot access central (https://repo.maven.apache.org/maven2) in offline mode 
and the artifact org.sonatype.oss:oss-parent:pom:7 has not been downloaded from 
it before. 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://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

[ERROR] [Help 2] 
http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

builder for 
‘/nix/store/1ygg32yq12p4x5dwqyd23drpkv8ynyc7-spark-core-2.5.4.jar.drv’ failed 
with exit code 1

error: build of 
‘/nix/store/1ygg32yq12p4x5dwqyd23drpkv8ynyc7-spark-core-2.5.4.jar.drv’ failed



So I'm thinking that I'm calling the buildMaven function correctly, but that it 
(or the mvn2nix plugin) doesn't support some of the features used in this 
pom.xml.

 




___
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] buildMaven usage

2017-02-15 Thread zimbatm
Hi laverne,

did you manage to figure it out?

I think the usage would be to run
https://github.com/NixOS/mvn2nix-maven-plugin on your project and then in
your default.nix add something like:
```
{ pkgs ? import  {}
, buildMaven ? pkgs.buildMaven
}:
buildMaven ./infofile
```

Where the `./infofile` is the file generated by mvn2nix (it should be a
JSON file).

As you can see not a lot of people are packaging java apps :)

Cheers,
z

On Fri, 10 Feb 2017 at 05:47 laverne  wrote:

> Hi,
>
> I have a question about the function defined at
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/build-maven.nix
>
> I wanted to use it to build Spark Frame (http://sparkjava.com/), however,
> while the function is in all-packages, it isn't doesn't seem to be used
> anywhere else in nixpkgs. Is anyone here using the function in other
> projects that they would be willing to link to so that I could get a feel
> for how to use it?
>
> Thanks,
> Laverne
> ___
> nix-dev mailing list
> [email protected]
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] buildMaven usage

2017-02-09 Thread laverne
Hi,



I have a question about the function defined at 
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/build-maven.nix



I wanted to use it to build Spark Frame (http://sparkjava.com/), however, while 
the function is in all-packages, it isn't doesn't seem to be used anywhere else 
in nixpkgs. Is anyone here using the function in other projects that they would 
be willing to link to so that I could get a feel for how to use it?



Thanks,

Laverne


___
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev