How do I do mvn and ant a second time ?

36 views
Skip to first unread message

Ashim Kapoor

unread,
Mar 2, 2020, 11:54:27 AM3/2/20
to DSpace Technical Support
Dear All,

How can I clean up and run mvn and ant after I have run it once ?

Suppose in my local.cfg I have to modify dspace.dir or the ip address in dspace.hostname. How do I re-run mvn and ant after modifying one or both of them ?

Many thanks,
Ashim

Sean Carte

unread,
Mar 3, 2020, 1:27:06 AM3/3/20
to Ashim Kapoor, DSpace Technical Support
This may help:

cd [dspace-source]/dspace/
mvn -U clean package

cd [dspace-source]/dspace/target/dspace-installer
ant update


--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAGEJAoEeAFTytTf0wTYhN6ZkR5XAwY0Pq%3D0TaGnAVJW_%3D6AYJw%40mail.gmail.com.


--

Ashim Kapoor

unread,
Mar 4, 2020, 8:32:38 AM3/4/20
to Sean Carte, DSpace Technical Support
Dear Sean,

Many thanks for your reply.

I have another query.  What if I have only run maven and not ant ?

I ran mvn package.

I got 3 warnings which I wanted to see again

so I did :-

mvn -U clean package

I got the 3 warnings :-

INFO] Scanning for projects...
[WARNING] The project org.dspace:dspace-parent:pom:6.3 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

[WARNING] The following patterns were never triggered in this artifact exclusion filter:
o  'org.glassfish.hk2.external:bean-validator:jar:*'

[WARNING] The following patterns were never triggered in this artifact exclusion filter:
o  'org.dspace.modules:xmlui-mirage2:war:*'

[WARNING] The following patterns were never triggered in this artifact exclusion filter:
o  'org.glassfish.hk2.external:bean-validator:jar:*'

Are they a big  deal ? Can I see these warnings in some log file somewhere ?

Many thanks,
Ashim


Mark H. Wood

unread,
Mar 4, 2020, 9:46:53 AM3/4/20
to DSpace Technical Support
On Wed, Mar 04, 2020 at 07:02:23PM +0530, Ashim Kapoor wrote:
> I have another query. What if I have only run maven and not ant ?
>
> I ran mvn package.
>
> I got 3 warnings which I wanted to see again
>
> so I did :-
>
> mvn -U clean package
>
> I got the 3 warnings :-
>
> INFO] Scanning for projects...
> [WARNING] The project org.dspace:dspace-parent:pom:6.3 uses prerequisites
> which is only intended for maven-plugin projects but not for non
> maven-plugin projects. For such purposes you should use the
> maven-enforcer-plugin. See
> https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

This is harmless. You can ignore it. It has already been fixed in
DSpace 7: https://jira.lyrasis.org/browse/DS-4385

> [WARNING] The following patterns were never triggered in this artifact
> exclusion filter:
> o 'org.glassfish.hk2.external:bean-validator:jar:*'
>
> [WARNING] The following patterns were never triggered in this artifact
> exclusion filter:
> o 'org.dspace.modules:xmlui-mirage2:war:*'
>
> [WARNING] The following patterns were never triggered in this artifact
> exclusion filter:
> o 'org.glassfish.hk2.external:bean-validator:jar:*'
>
> Are they a big deal ? Can I see these warnings in some log file somewhere
> ?

Everyone gets these warnings. They are harmless. I think they may
have been fixed in DSpace 7.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Ashim Kapoor

unread,
Mar 6, 2020, 4:01:10 AM3/6/20
to Sean Carte, DSpace Technical Support
Dear Sean,

I have a query.

On Tue, 3 Mar 2020 at 11:57, Sean Carte <sean....@gmail.com> wrote:
This may help:

cd [dspace-source]/dspace/
mvn -U clean package

cd [dspace-source]
mvn package

Query : What is the right directory for running mvn? [dspace-source] or [dspace-source]/dspace/ ?


cd [dspace-source]/dspace/target/dspace-installer
ant update

After do the ant update above, am I supposed to do this:-

cp -R [dspace]/webapps/* [tomcat]/webapps*

Please clarify.

Sean Carte

unread,
Mar 6, 2020, 4:05:03 AM3/6/20
to Ashim Kapoor, DSpace Technical Support
Do as the documentation instructs: run mvn package from the dspace-source directory.

The ant update command should copy everything from your build directory to your tomcat directory. No need for manual copying.
--

Ashim Kapoor

unread,
Aug 10, 2021, 6:38:21 AM8/10/21
to Sean Carte, DSpace Technical Support
Dear Sean,

I am a beginner with DSpace. Only now do I understand a little bit as
to how to set it up.
I was reading :-
https://wiki.lyrasis.org/display/DSDOC6x/Ant+targets+and+options

Can you please clarify if I understand the following correctly?

On Fri, 6 Mar 2020 at 14:35, Sean Carte <sean....@gmail.com> wrote:
>
> Do as the documentation instructs: run mvn package from the dspace-source directory.
>
> The ant update command should copy everything from your build directory to your tomcat directory. No need for manual copying.
>

I think it works like this:-

`ant update`

will update the [dspace]/{config,etc,lib}

It will NOT affect the [dspace]/webapps directory.

That's the reason we don't have to manually copy the webapps folder after

`ant update`

It is NOT the case that :

The ant update command should copy everything from your build
directory to your tomcat directory.


Reply all
Reply to author
Forward
0 new messages