building a java project depends on jars in ear

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

building a java project depends on jars in ear

Garner, Shawn

Hello,

 

I’m using gradle 1.0 milestone 3.

 

I’m trying to build a java project which depends on jars in the EAR.

I seems like it’s not resolving my dependency and finding the jar using:

 

dependencies {

            runtime fileTree(dir: 'C:/Workspaces/GradlePOC/MyEar/EarContent', include: '*.jar')

}

 

I’d appreciate any help.

 

Shawn


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [hidden email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.





	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: building a java project depends on jars in ear

evgenyg
How about
 
include: '**/*.jar' ?


On Sat, Sep 10, 2011 at 17:54, Garner, Shawn <[hidden email]> wrote:

Hello,

 

I’m using gradle 1.0 milestone 3.

 

I’m trying to build a java project which depends on jars in the EAR.

I seems like it’s not resolving my dependency and finding the jar using:

 

dependencies {

            runtime fileTree(dir: 'C:/Workspaces/GradlePOC/MyEar/EarContent', include: '*.jar')

}

 

I’d appreciate any help.

 

Shawn


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [hidden email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.

Best regards,
Evgeny
evgeny-goldin.com
Reply | Threaded
Open this post in threaded view
|

RE: building a java project depends on jars in ear

Garner, Shawn

That  didn’t work either.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:03 AM
To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

How about

 

include: '**/*.jar' ?

 

On Sat, Sep 10, 2011 at 17:54, Garner, Shawn <[hidden email]> wrote:

Hello,

 

I’m using gradle 1.0 milestone 3.

 

I’m trying to build a java project which depends on jars in the EAR.

I seems like it’s not resolving my dependency and finding the jar using:

 

dependencies {

            runtime fileTree(dir: 'C:/Workspaces/GradlePOC/MyEar/EarContent', include: '*.jar')

}

 

I’d appreciate any help.

 

Shawn


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [hidden email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.

 

Reply | Threaded
Open this post in threaded view
|

Re: building a java project depends on jars in ear

evgenyg
Do you really need to use a "runtime" configuration and not "compile"?
"runtime" dependencies can't be used for compilation.


On Sat, Sep 10, 2011 at 18:09, Garner, Shawn <[hidden email]> wrote:

That  didn’t work either.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:03 AM
To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

How about

 

include: '**/*.jar' ?

 

On Sat, Sep 10, 2011 at 17:54, Garner, Shawn <[hidden email]> wrote:

Hello,

 

I’m using gradle 1.0 milestone 3.

 

I’m trying to build a java project which depends on jars in the EAR.

I seems like it’s not resolving my dependency and finding the jar using:

 

dependencies {

            runtime fileTree(dir: 'C:/Workspaces/GradlePOC/MyEar/EarContent', include: '*.jar')

}

 

I’d appreciate any help.

 

Shawn


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [hidden email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.

 


Best regards,
Evgeny
evgeny-goldin.com
Reply | Threaded
Open this post in threaded view
|

RE: building a java project depends on jars in ear

Garner, Shawn

My understanding is runtime is the same as compile but signifies you depend on that jar at runtime and not just compile time.

So I would say use it is a runtime dependency.

Provided means the same thing as runtime but the environment provides it and shouldn’t be bundled.

Runtime and Provided are all compile time dependencies because they all extend compile.

 

The documentation even shows:

 

dependencies {
    runtime files('libs/a.jar', 'libs/b.jar')
    runtime fileTree(dir: 'libs', include: '*.jar')
}

 

So I’m not sure how you can say runtime dependencies can’t be used to compile.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:32 AM
To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

Do you really need to use a "runtime" configuration and not "compile"?

"runtime" dependencies can't be used for compilation.

 

 

On Sat, Sep 10, 2011 at 18:09, Garner, Shawn <[hidden email]> wrote:

That  didn’t work either.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:03 AM
To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

How about

 

include: '**/*.jar' ?

 

On Sat, Sep 10, 2011 at 17:54, Garner, Shawn <[hidden email]> wrote:

Hello,

 

I’m using gradle 1.0 milestone 3.

 

I’m trying to build a java project which depends on jars in the EAR.

I seems like it’s not resolving my dependency and finding the jar using:

 

dependencies {

            runtime fileTree(dir: 'C:/Workspaces/GradlePOC/MyEar/EarContent', include: '*.jar')

}

 

I’d appreciate any help.

 

Shawn


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [hidden email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.

 

 

Reply | Threaded
Open this post in threaded view
|

Re: building a java project depends on jars in ear

evgenyg
"runtime" indeed extends "compile" but you only see "compile" when you compile the sources.
"runtime" dependencies are those that should be packed but not compiled with, like "logback-classic" if you compile with "slf4j-api".

If you change the configuration to "compile", does it make any difference?


On Sat, Sep 10, 2011 at 18:50, Garner, Shawn <[hidden email]> wrote:

My understanding is runtime is the same as compile but signifies you depend on that jar at runtime and not just compile time.

So I would say use it is a runtime dependency.

Provided means the same thing as runtime but the environment provides it and shouldn’t be bundled.

Runtime and Provided are all compile time dependencies because they all extend compile.

 

The documentation even shows:

 

dependencies {
    runtime files('libs/a.jar', 'libs/b.jar')
    runtime fileTree(dir: 'libs', include: '*.jar')
}

 

So I’m not sure how you can say runtime dependencies can’t be used to compile.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:32 AM


To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

Do you really need to use a "runtime" configuration and not "compile"?

"runtime" dependencies can't be used for compilation.

 

 

On Sat, Sep 10, 2011 at 18:09, Garner, Shawn <[hidden email]> wrote:

That  didn’t work either.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:03 AM
To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

How about

 

include: '**/*.jar' ?

 

On Sat, Sep 10, 2011 at 17:54, Garner, Shawn <[hidden email]> wrote:

Hello,

 

I’m using gradle 1.0 milestone 3.

 

I’m trying to build a java project which depends on jars in the EAR.

I seems like it’s not resolving my dependency and finding the jar using:

 

dependencies {

            runtime fileTree(dir: 'C:/Workspaces/GradlePOC/MyEar/EarContent', include: '*.jar')

}

 

I’d appreciate any help.

 

Shawn


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [hidden email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.

 

 


Best regards,
Evgeny
evgeny-goldin.com
Reply | Threaded
Open this post in threaded view
|

RE: building a java project depends on jars in ear

Garner, Shawn

Yeah, I changed it to compile so it is now finding my ear libraries.

Now it’s failing on shared libraries which is a different issue.  They are “compile” and “provided” jars.

 

I’ll have to think how I want to do those.   I may want to use an ivy file system resolver for those because they are actually external and named artifacts.

If you have any suggestions they are welcome.

 

Thanks,

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 11:09 AM
To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

"runtime" indeed extends "compile" but you only see "compile" when you compile the sources.

"runtime" dependencies are those that should be packed but not compiled with, like "logback-classic" if you compile with "slf4j-api".

 

If you change the configuration to "compile", does it make any difference?

 

 

On Sat, Sep 10, 2011 at 18:50, Garner, Shawn <[hidden email]> wrote:

My understanding is runtime is the same as compile but signifies you depend on that jar at runtime and not just compile time.

So I would say use it is a runtime dependency.

Provided means the same thing as runtime but the environment provides it and shouldn’t be bundled.

Runtime and Provided are all compile time dependencies because they all extend compile.

 

The documentation even shows:

 

dependencies {
    runtime files('libs/a.jar', 'libs/b.jar')
    runtime fileTree(dir: 'libs', include: '*.jar')
}

 

So I’m not sure how you can say runtime dependencies can’t be used to compile.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:32 AM


To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

Do you really need to use a "runtime" configuration and not "compile"?

"runtime" dependencies can't be used for compilation.

 

 

On Sat, Sep 10, 2011 at 18:09, Garner, Shawn <[hidden email]> wrote:

That  didn’t work either.

 

Shawn

 


From: Evgeny Goldin [mailto:[hidden email]]
Sent: Saturday, September 10, 2011 10:03 AM
To: [hidden email]
Subject: Re: [gradle-user] building a java project depends on jars in ear

 

How about

 

include: '**/*.jar' ?

 

On Sat, Sep 10, 2011 at 17:54, Garner, Shawn <[hidden email]> wrote:

Hello,

 

I’m using gradle 1.0 milestone 3.

 

I’m trying to build a java project which depends on jars in the EAR.

I seems like it’s not resolving my dependency and finding the jar using:

 

dependencies {

            runtime fileTree(dir: 'C:/Workspaces/GradlePOC/MyEar/EarContent', include: '*.jar')

}

 

I’d appreciate any help.

 

Shawn


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [hidden email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.