maven-jaxb2-plugin: Error in parsing schema location even when xsd and xjb files are in same location

2017-06-12 Thread Debraj Manna
I am having a pom.xml which looks like below:-

http://maven.apache.org/POM/4.0.0;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0


com.eros
model
0.001-SNAPSHOT


nato-model
jar
nato-model



com.eros
core-model
${main.version}






org.jvnet.jaxb2.maven2
maven-jaxb2-plugin
0.13.1

false
false
true





b

generate



com.eros.model.nato.n5k

${project.build.directory}/generated-sources/jaxb


${project.basedir}/../../schema/src/main/xsd/com/eros/model/nato/custom_xsds


n5k.xsd


${project.basedir}/../../schema/src/main/xsd/com/eros/model/nato/custom_xsds

n5k.xjb

false
true



n7k

generate



com.eros.model.nato.n7k

${project.build.directory}/generated-sources/jaxb


${project.basedir}/../../schema/src/main/xsd/com/eros/model/nato/custom_xsds


n7k.xsd


${project.basedir}/../../schema/src/main/xsd/com/eros/model/nato/custom_xsds
false
true









My n5k.xjb file looks like below:-

http://java.sun.com/xml/ns/jaxb;
schemaLocation="./n5k.xsd">




My n7k.xjb looks like below:-

http://java.sun.com/xml/ns/jaxb; schemaLocation="n7k.xsd">




But on compiling I am getting the below error:-

Error while parsing schema(s).Location [
file:/Users/tuk/code/github/eros/main/schema/src/main/xsd/com/eros/model/nato/custom_xsds/n5k.xjb{2,102}].
com.sun.istack.SAXParseException2; systemId:
file:/Users/tuk/code/github/eros/main/schema/src/main/xsd/com/eros/model/nato/custom_xsds/n5k.xjb;
lineNumber: 2; columnNumber: 102;
"file:/Users/tuk/code/github/eros/main/schema/src/main/xsd/com/eros/model/nato/custom_xsds/n5k.xsd"
is not a part of this compilation. Is this a mistake for
"file:/Users/tuk/code/github/eros/main/schema/src/main/xsd/com/eros/model/nato/custom_xsds/n7k.xsd"

Can someone let me know what I am doing wrong?

Environment:-

   - Java 8
   - Maven 3.5


Re: If anyone ever wanted to download a bunch of deps specified in a Maven POM for an Ant build

2017-06-12 Thread Paul Hammant
Looks good. My Google fu let me down!

On Mon, Jun 12, 2017 at 11:41 AM, Manfred Moser 
wrote:

> Why not use the Maven Resolver (formerly Eclipse Aether) Ant Tasks?
>
> https://maven.apache.org/resolver-archives/resolver-ant-tasks-LATEST/
>
> Paul Hammant wrote on 2017-06-11 11:53:
>
> > If your 'current directory' is a Maven checkout, I have a Python script
> > that will download the dependencies into a libs/ folder. Well,
> > libs/compile/ libs/test/ etc - one subfolder per scope.
> >
> > See here:
> > https://github.com/paul-hammant/spring-jetty-
> integrationtest-ant-example/blob/master/mavdl.py
> >
> > I asked a question on Stackoverflow then answered it myself when my bash
> > skills fell short of a bash one-liner for the same: -
> > https://stackoverflow.com/questions/44390253
> >
> > In the case of my demo project 'spring-jetty-integrationtest-ant-example'
> I
> > checked all the jars into Git again, like it was still the early 2000's
> :)
> >
> > - Paul
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: If anyone ever wanted to download a bunch of deps specified in a Maven POM for an Ant build

2017-06-12 Thread Manfred Moser
Why not use the Maven Resolver (formerly Eclipse Aether) Ant Tasks? 

https://maven.apache.org/resolver-archives/resolver-ant-tasks-LATEST/

Paul Hammant wrote on 2017-06-11 11:53:

> If your 'current directory' is a Maven checkout, I have a Python script
> that will download the dependencies into a libs/ folder. Well,
> libs/compile/ libs/test/ etc - one subfolder per scope.
> 
> See here:
> https://github.com/paul-hammant/spring-jetty-integrationtest-ant-example/blob/master/mavdl.py
> 
> I asked a question on Stackoverflow then answered it myself when my bash
> skills fell short of a bash one-liner for the same: -
> https://stackoverflow.com/questions/44390253
> 
> In the case of my demo project 'spring-jetty-integrationtest-ant-example' I
> checked all the jars into Git again, like it was still the early 2000's :)
> 
> - Paul
> 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Avoid Unnecessary regeneration in jaxb2-maven-plugin

2017-06-12 Thread Debraj Manna
Hi

Is it possible to avoid unnecessary regeneration in jaxb2-maven-plugin?
Basically I want to generate the sources only when underlying schema has
changed?

 It seems maven-jaxb2-plugin has an option force-regenerate
.
Do similar option exist in jaxb2-maven-plugin? If not can someone suggest
me some way to achieve this?


Re: Producing java8 and java7 versions

2017-06-12 Thread Christofer Dutz
Hi Laurent,

I love bleeding edge stuff, but I don’t like SM stuff … guess java 9 multi-jars 
sound more SM than bleeding edge for me.

Guess it would not be good to base the build of an Apache project on that ;-)

Chris

Am 10.06.17, 09:31 schrieb "Laurent Perez" :

On a side note, in a few months, if you like to live dangerously, java9
comes with built-in support for multijar :
http://in.relation.to/2017/02/13/building-multi-release-jars-with-maven/

laurent


2017-06-09 14:07 GMT+02:00 Jörg Schaible :

> Hi Paul,
>
> Paul Hammant wrote:
>
> > Older releases tried to have a single jar that had adaptive bytecode
> > within, right Jörg
> >
> > Specifically, class file formats 49, 50, 51 in one Jar.
>
> This is still the case. The -java7 version just omits class files
> targetting
> Java 8, because in some environments they cause harm if the runtime is not
> yet Java 8 compatible (Android, app servers scanning jars for annotations
> ...).
>
> Cheers,
> Jörg
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-- 
http://blog.jdeuxe.info/;>http://blog.jdeuxe.info/ - Java
entreprise tips & tricks



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org