8000 how to tell t7 that client side is somewhere else other than webapp · Issue #64 · t7mp/t7mp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

how to tell t7 that client side is somewhere else other than webapp #64

Open
fchis3pg opened this issue Sep 10, 2012 · 13 comments
Open

Comments

@fchis3pg
Copy link
  1. Hi, is there a way to tell t7 that the client side is somewhere else and to use that as ROOT in tomcat? I can copy the client content from mvn to ROOT for example, but then if I make a change I must copy the client content again. For example jetty plugin has something like
  2. In future versions it would be nice for example that the context path to be taken from context.xml instead of manually define it with
    Tks
@jbellmann
Copy link
Member

Hi Florian,

can you please explain it a bit more what you mean with ' ... client side is somewhere else and to use that as ROOT in tomcat ...'? I don't understand what you are trying to do.
And for 2), do you mean context.xml under $CATALINA_HOME/conf or in your War-File? Maybe you can provide a small example?

Cheers
Joerg

@fchis3pg
Copy link
Author

Hi Jorg,

The client side is not included in war file only the server side. The server
side is deployed in let's say /API and the client side in /. Basically now I
copy through maven the client side in tomcat ROOT folder
(${basedir}/target/tomcat/webapps/ROOT) when I do t7:run
This configuration works and is ok.

The only inconvenience is that the the javascript guys were used to tell when
jetty was around that they develop in different directory and jetty used that
directory as a "resource". That means they just modify some js file and refresh
the page and are not forced to deploy each time they modify something

I tried to use but it does not seem to work

Regarding 2'nd point: The path defined in the context.xml from the war file

În ziua de Lun 10 Sep 2012, la 11:26:18, Jörg Bellmann a scris:

Hi Florian,
can you please explain it a bit more what you mean with ' ... client side is
somewhere else and to use that as ROOT in tomcat ...'? I don't understand what
you are trying to do.
And for 2), do you mean context.xml under $CATALINA_HOME/conf or in your War-
File? Maybe you can provide a small example?
Cheers
Joerg

Reply to this email directly or view it on GitHub.

Florian Chis| SWD
Three Pillar Global Romania| Timisoara
florian.chis@threepillarglobal.com | www.threepillarglobal.com

@jbellmann
8000
Copy link
Member

Hi Florian,

sorry for the delay.
I hope I can give you an example for what you are looking for. In the 'exmamples'-project for the plugin you can find now an maven-sub-module where I tried to make it working.
So please have a look at it here.
Hope that helps.

Cheers
Jörg

@fchis3pg
Copy link
Author

Hi Jorg,

Is there a way to specify external.client.directory from the custom catalina.properties into pom.xml?

Regards,
Florian

@jbellmann
Copy link
Member

Yes, it should be possible to use 'maven-resource-filtering'. You just has to configure the resources-filtering in the pom.xml for the 'catalina.properties'.

Please share your solution here.

Cheers
Jörg

@jbellmann
Copy link
Member

Hi Florian,

I tried it with filtering, but it does not work.
So I implemented that in the plugin itself. Now all configured 'systemProperties' will be written to the 'catalina.properties' before startup. That means, you can use any configured property there in the 'server.xml'. You have to use the latest SNAPSHOT for that behavior.
Use the following repository-url in your pom to resolve an updated snapshot:

https://oss.sonatype.org/content/repositories/snapshots

I will release a new version of the plugin in the next days, so you don't depend on an SNAPSHOT. Have a look at the 'example'-project. I updated the 'provide-from-external'-module as a showcase for that feature.

Cheers
Jörg

@fchis3pg
Copy link
Author
fchis3pg commented Nov 6, 2012

Hi Jorg,

I managed to get it work partially. Here are my thoughts:

  1. I don't know how tell t7 not to deploy the default tomcat applications.
    I don't need them and I want to deploy the client to / which is a lot of
    pain due to the fact the root is taken by Welcome to Tomcat app.
  2. For externalClientDirectory another externalClientContextPath is
    welcomed so I don't need to edit the custom server.xml
  3. Finally, my thought is to embed the default configuration of
    catalina.properties and server.xml in the plugin so that I don't need to
    copy them from project to project just to have the externalClientDirectory.
    It's a great feature that I can supply custom tomcat configuration in my
    project but it should be used in exceptional cases

Regards,
Florian

On Fri, Oct 26, 2012 at 2:15 AM, Jörg Bellmann notifications@github.comwrote:

Hi Florian,

I tried it with filtering, but it does not work.
So I implemented that in the plugin itself. Now all configured
'systemProperties' will be written to the 'catalina.properties' before
startup. That means, you can use any configured property there in the
'server.xml'. You have to use the latest SNAPSHOT for that behavior.
I will release a new version of the plugin in the next days, so you don't
depend on an SNAPSHOT. Have a look at the 'example'-project. I updated the
'provide-from-external'-module as a showcase for that feature.

Cheers
Jörg


Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-9797902.

@jbellmann
Copy link
Member

Hi Florian,

well there are features someone is missing. And we will try to bring solutions around if we have some time. So, sometimes it needs a bit longer. Sorry.
To your points:

  1. That should not be a problem. Maybe you can provide a Step as a solution?
  2. I don't get this. Can you please explain it a bit more?
  3. We provide a feature, that it is possible to declare an 'configuration-jar', so you can share this 'configuration-jar' to multiple projects and use normal maven version and naming features for that. See this pom from the integration-tests

Best Regards
Jörg

@fchis3pg
Copy link
Author

Hi Jorg,

About the 2'nd point:
In src/main/tomcat/conf/server.xml there is this line:

This means that ${externalClientDirectory} is filled by tag in

What I meant to say was something like this:

where ${externalClientContextPath} is also a tag in under in pom.xml

About the Step thing, think I'll try it.

With thanks,
Florian

@fchis3pg
Copy link
Author

Hi Jorg,

I want to contribute a little piece of code to the project. It resolves my first issue that of telling t7 in pom not to export tomcat's default web apps. It's similar to DeleteDocsAndExamplesStep but for that I need write access to the project.

I also want to put an extra parameter similar to (if you did not start to work on this allready). The thing is, I don't know where to look for the code that maps to ${externalClientDirectory} is server.xml. A little help is welcomed

Regards,
Florian

@jbellmann
Copy link
Member

Hello,

please raise an Pull Request. If don't know how to do that, you will find more informations here. I will have a look at your contributions and then will merge it.

Jörg

@fchis3pg
Copy link
Author

ERROR: Permission to t7mp/maven-t7-plugin.git denied to fchis3pg.
fatal: The remote end hung up unexpectedly

and of course there is no Pull Request button for me :)

@jbellmann
Copy link
Member

Hi Florian,

as I can see on your account, you don't made a fork. Did you read the documentation about code contributions with github? Here is a short (and hopefully working description ;-) ).
You are signed in to github.

You browse to the repo you want to contribute here. On the upper right side is a button 'Fork'. Klick it.

You then have a forked repository in your space. You can do whatever you want with that repo. You have total access to that forked repository. It is in you hand.

Please do that now. I will help you to go further in the next 30 min. I will update this comment.

Ok, you got it.

So, I assume you have some codechanges on your workstation, You checked out from T7MP, right? So go to the directory and add an new remote to your forked repository on github.

git add remote myOwnRepository https://github.com/fchis3pg/maven-t7-plugin.git

I hope you made your changes in separat branch? Then:

git push myOwnRepository theBranchName

Try that. Does it work?

Yes, I can see your branch. Cool.

If everything goes fine, you should see an Pull-Request-Button on the top-right side. Use it. Fill out the description. Choose the branches you want me to merge from you.

That's it. Good Luck. :-)

Jörg

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0